@photon-ai/pho-ui 4.18.4 → 4.18.6
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/README.md +1 -1
- package/dist/chunks/{IconAlertCircleFilled-VxKU8TYK.js → IconAlertCircleFilled-D6mUlVaE.js} +2 -2
- package/dist/chunks/IconAlertCircleFilled-D6mUlVaE.js.map +1 -0
- package/dist/chunks/{IconArrowUpRight-DGgKzQwV.js → IconArrowUpRight-OK8Fp0KQ.js} +2 -2
- package/dist/chunks/IconArrowUpRight-OK8Fp0KQ.js.map +1 -0
- package/dist/chunks/{IconCheck-D2WuculQ.js → IconCheck-DwSMn1wK.js} +2 -2
- package/dist/chunks/IconCheck-DwSMn1wK.js.map +1 -0
- package/dist/chunks/{IconChevronDown-CZilB71T.js → IconChevronDown-Cd68NnX2.js} +2 -2
- package/dist/chunks/IconChevronDown-Cd68NnX2.js.map +1 -0
- package/dist/chunks/{IconChevronLeft-CSWMKQ4C.js → IconChevronLeft-CptqhdxO.js} +2 -2
- package/dist/chunks/IconChevronLeft-CptqhdxO.js.map +1 -0
- package/dist/chunks/{IconChevronRight-CzoJnYNI.js → IconChevronRight-BNkXCTk6.js} +2 -2
- package/dist/chunks/IconChevronRight-BNkXCTk6.js.map +1 -0
- package/dist/chunks/{IconChevronUp-CrpWSgIl.js → IconChevronUp-Bxllwz8J.js} +2 -2
- package/dist/chunks/IconChevronUp-Bxllwz8J.js.map +1 -0
- package/dist/chunks/{IconInfoCircle-L0zfhg7R.js → IconInfoCircle-CTAynhe8.js} +2 -2
- package/dist/chunks/IconInfoCircle-CTAynhe8.js.map +1 -0
- package/dist/chunks/{IconSearch-BKAHkLyX.js → IconSearch-DkcWWZ1H.js} +2 -2
- package/dist/chunks/IconSearch-DkcWWZ1H.js.map +1 -0
- package/dist/chunks/{IconX-pZ9vrtSr.js → IconX-DnPlFC68.js} +2 -2
- package/dist/chunks/IconX-DnPlFC68.js.map +1 -0
- package/dist/chunks/animated-height-zr7BmFY1.js.map +1 -1
- package/dist/chunks/{avatar-BkmGDIqf.js → avatar-PgBOfszL.js} +4 -4
- package/dist/chunks/avatar-PgBOfszL.js.map +1 -0
- package/dist/chunks/{badge-DlLJPLeZ.js → badge-CVViIYj_.js} +2 -2
- package/dist/chunks/badge-CVViIYj_.js.map +1 -0
- package/dist/chunks/{bar-chart-CNCmuhQV.js → bar-chart-ZNuOoH7c.js} +2 -2
- package/dist/chunks/bar-chart-ZNuOoH7c.js.map +1 -0
- package/dist/chunks/{basic-page-D_Wgu2pJ.js → basic-page-BKvtEQkZ.js} +20 -20
- package/dist/chunks/basic-page-BKvtEQkZ.js.map +1 -0
- package/dist/chunks/{box-search-C9EVZgcb.js → box-search-CMl5bQ7Y.js} +5 -5
- package/dist/chunks/box-search-CMl5bQ7Y.js.map +1 -0
- package/dist/chunks/{bubble-eaoLJP4N.js → bubble-D88Edlgj.js} +2 -2
- package/dist/chunks/bubble-D88Edlgj.js.map +1 -0
- package/dist/chunks/{button-C9VqBBIr.js → button-CLfWdqm-.js} +3 -3
- package/dist/chunks/button-CLfWdqm-.js.map +1 -0
- package/dist/chunks/{calendar-4OFiCLAv.js → calendar-DDWITGo4.js} +7 -7
- package/dist/chunks/calendar-DDWITGo4.js.map +1 -0
- package/dist/chunks/{card-N-tvFsuV.js → card-zyRAihYE.js} +2 -2
- package/dist/chunks/{card-N-tvFsuV.js.map → card-zyRAihYE.js.map} +1 -1
- package/dist/chunks/{chart-B5wjhkBu.js → chart-Btnw7KXV.js} +3 -3
- package/dist/chunks/chart-Btnw7KXV.js.map +1 -0
- package/dist/chunks/{chat-Bu8UyIbT.js → chat-ZUzGmTWE.js} +11 -11
- package/dist/chunks/chat-ZUzGmTWE.js.map +1 -0
- package/dist/chunks/{checkbox-CwvoEJhd.js → checkbox-DpWLbKVS.js} +2 -2
- package/dist/chunks/checkbox-DpWLbKVS.js.map +1 -0
- package/dist/chunks/choice-card-_Ocs0iUj.js.map +1 -1
- package/dist/chunks/chrome-Ds7WykBJ.js.map +1 -1
- package/dist/chunks/{close-button-GvqWbLl0.js → close-button-Ck4rY1Fp.js} +3 -3
- package/dist/chunks/close-button-Ck4rY1Fp.js.map +1 -0
- package/dist/chunks/{cn-ChIgwEl3.js → cn-CPbhpG1q.js} +162 -83
- package/dist/chunks/cn-CPbhpG1q.js.map +1 -0
- package/dist/chunks/{code-block-DekLMMtV.js → code-block-Yxg2wZGJ.js} +10 -10
- package/dist/chunks/code-block-Yxg2wZGJ.js.map +1 -0
- package/dist/chunks/{collapsible-Dv306QOT.js → collapsible-C2tn_b1Q.js} +2 -2
- package/dist/chunks/collapsible-C2tn_b1Q.js.map +1 -0
- package/dist/chunks/{combobox-BJusx5b2.js → combobox-OQOi5hlB.js} +2 -2
- package/dist/chunks/combobox-OQOi5hlB.js.map +1 -0
- package/dist/chunks/{copy-button-BmGshaq9.js → copy-button-BLvirhXk.js} +4 -4
- package/dist/chunks/copy-button-BLvirhXk.js.map +1 -0
- package/dist/chunks/{createReactComponent-BqCmnqfX.js → createReactComponent-yKZn9MIX.js} +6 -6
- package/dist/chunks/createReactComponent-yKZn9MIX.js.map +1 -0
- package/dist/chunks/{data-table-T4QKnrxQ.js → data-table-CAz_8HQw.js} +8 -8
- package/dist/chunks/data-table-CAz_8HQw.js.map +1 -0
- package/dist/chunks/{date-picker-CZbcNIe-.js → date-picker-vJQrTol9.js} +5 -5
- package/dist/chunks/date-picker-vJQrTol9.js.map +1 -0
- package/dist/chunks/{description-list-BRRQ0oF6.js → description-list-Duhhralt.js} +3 -3
- package/dist/chunks/description-list-Duhhralt.js.map +1 -0
- package/dist/chunks/{dialog-12foDiQb.js → dialog-DORIrfyJ.js} +102 -101
- package/dist/chunks/dialog-DORIrfyJ.js.map +1 -0
- package/dist/chunks/{error-D5SzZ0ev.js → error-yAVi4cBu.js} +8 -8
- package/dist/chunks/error-yAVi4cBu.js.map +1 -0
- package/dist/chunks/{filter-bar-upeYW4dQ.js → filter-bar-qqCZf1x4.js} +9 -9
- package/dist/chunks/filter-bar-qqCZf1x4.js.map +1 -0
- package/dist/chunks/{form-AiHbbw4m.js → form-CXT6ayt0.js} +2 -2
- package/dist/chunks/{form-AiHbbw4m.js.map → form-CXT6ayt0.js.map} +1 -1
- package/dist/chunks/{ghost-search-8PzP73zS.js → ghost-search-CMUI2UH0.js} +4 -4
- package/dist/chunks/ghost-search-CMUI2UH0.js.map +1 -0
- package/dist/chunks/{input-fFWvPJOf.js → input-DWnb33UF.js} +4 -4
- package/dist/chunks/input-DWnb33UF.js.map +1 -0
- package/dist/chunks/{input-group-fc9_jD4d.js → input-group-C3upo2OU.js} +39 -37
- package/dist/chunks/input-group-C3upo2OU.js.map +1 -0
- package/dist/chunks/is-react-component-DSnjtBmo.js.map +1 -1
- package/dist/chunks/{kbd-DNI10uy7.js → kbd-DWDs_6U1.js} +2 -2
- package/dist/chunks/kbd-DWDs_6U1.js.map +1 -0
- package/dist/chunks/{line-chart-BODTNBrX.js → line-chart-pOwE2_Oz.js} +2 -2
- package/dist/chunks/line-chart-pOwE2_Oz.js.map +1 -0
- package/dist/chunks/link-provider-DXzDQ08N.js.map +1 -1
- package/dist/chunks/{log-list-tNuCFGlP.js → log-list-QbSYHZu3.js} +8 -8
- package/dist/chunks/log-list-QbSYHZu3.js.map +1 -0
- package/dist/chunks/{menu-CoMrYnd1.js → menu-CC3fhf83.js} +3 -3
- package/dist/chunks/menu-CC3fhf83.js.map +1 -0
- package/dist/chunks/{message-Dz2-numf.js → message-DRAWQlW-.js} +2 -2
- package/dist/chunks/message-DRAWQlW-.js.map +1 -0
- package/dist/chunks/{popover-BhBJO346.js → popover-B0NBrYV5.js} +2 -2
- package/dist/chunks/popover-B0NBrYV5.js.map +1 -0
- package/dist/chunks/popup-anchor-C3_iXdbh.js.map +1 -1
- package/dist/chunks/resolve-variant-CcD8iG5l.js.map +1 -1
- package/dist/chunks/{scroll-area-DSwD9th7.js → scroll-area-Dhl5hqay.js} +2 -2
- package/dist/chunks/scroll-area-Dhl5hqay.js.map +1 -0
- package/dist/chunks/{select-DU_0zVbn.js → select-xhSvDNbw.js} +3 -3
- package/dist/chunks/select-xhSvDNbw.js.map +1 -0
- package/dist/chunks/{sidebar-BP39w1iA.js → sidebar-CgaSEWVr.js} +11 -11
- package/dist/chunks/sidebar-CgaSEWVr.js.map +1 -0
- package/dist/chunks/{skeleton-DwjSl4vC.js → skeleton-CqZlGphn.js} +2 -2
- package/dist/chunks/skeleton-CqZlGphn.js.map +1 -0
- package/dist/chunks/{spinner-BzLUo4Xk.js → spinner-BSutFL4l.js} +2 -2
- package/dist/chunks/spinner-BSutFL4l.js.map +1 -0
- package/dist/chunks/{stat-hnNqjWVG.js → stat-BXBfMQ9Q.js} +4 -4
- package/dist/chunks/stat-BXBfMQ9Q.js.map +1 -0
- package/dist/chunks/{status-view-C8tabjDu.js → status-view-I_Y6eEyX.js} +2 -2
- package/dist/chunks/status-view-I_Y6eEyX.js.map +1 -0
- package/dist/chunks/{toast-BACxYsv6.js → toast-DrLKzrDJ.js} +7 -7
- package/dist/chunks/toast-DrLKzrDJ.js.map +1 -0
- package/dist/chunks/{toggle-o84tawXy.js → toggle-Ca4SS3YD.js} +2 -2
- package/dist/chunks/toggle-Ca4SS3YD.js.map +1 -0
- package/dist/chunks/{tooltip-BTF7GChl.js → tooltip-4J1PUJmB.js} +2 -2
- package/dist/chunks/tooltip-4J1PUJmB.js.map +1 -0
- package/dist/chunks/{trace-DyjsBY-S.js → trace-D9F0sne7.js} +11 -11
- package/dist/chunks/trace-D9F0sne7.js.map +1 -0
- package/dist/chunks/use-copy-D6JwKUll.js.map +1 -1
- package/dist/chunks/use-press-pulse-IbNstUT0.js.map +1 -1
- package/dist/components/accordion.js +1 -1
- package/dist/components/accordion.js.map +1 -1
- package/dist/components/autocomplete.js +1 -1
- package/dist/components/autocomplete.js.map +1 -1
- package/dist/components/avatar.js +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/bar-chart.js +1 -1
- package/dist/components/bubble.js +1 -1
- package/dist/components/button.js +2 -2
- package/dist/components/calendar.js +1 -1
- package/dist/components/card.js +1 -1
- package/dist/components/chart.js +1 -1
- package/dist/components/chat.js +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/code-block.js +1 -1
- package/dist/components/collapsible.js +1 -1
- package/dist/components/combobox.js +1 -1
- package/dist/components/command.js +4 -4
- package/dist/components/command.js.map +1 -1
- package/dist/components/context-menu.js +2 -2
- package/dist/components/context-menu.js.map +1 -1
- package/dist/components/copy-button.js +1 -1
- package/dist/components/data-table.js +2 -2
- package/dist/components/date-picker.js +1 -1
- package/dist/components/description-list.js +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/drawer.js +1 -1
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/error.js +1 -1
- package/dist/components/field.js +1 -1
- package/dist/components/field.js.map +1 -1
- package/dist/components/fieldset.js +1 -1
- package/dist/components/fieldset.js.map +1 -1
- package/dist/components/filter-bar.js +1 -1
- package/dist/components/form.js +1 -1
- package/dist/components/input-group.js +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/kbd.js +1 -1
- package/dist/components/line-chart.js +1 -1
- package/dist/components/log-list.js +1 -1
- package/dist/components/menu.js +1 -1
- package/dist/components/menubar.js +1 -1
- package/dist/components/menubar.js.map +1 -1
- package/dist/components/message.js +1 -1
- package/dist/components/meter.js +1 -1
- package/dist/components/meter.js.map +1 -1
- package/dist/components/navigation-menu.js +1 -1
- package/dist/components/navigation-menu.js.map +1 -1
- package/dist/components/notification.js +4 -4
- package/dist/components/notification.js.map +1 -1
- package/dist/components/number-field.js +1 -1
- package/dist/components/number-field.js.map +1 -1
- package/dist/components/otp-field.js +1 -1
- package/dist/components/otp-field.js.map +1 -1
- package/dist/components/phone-input.js +35 -45
- package/dist/components/phone-input.js.map +1 -1
- package/dist/components/popover.js +1 -1
- package/dist/components/preview-card.js +1 -1
- package/dist/components/preview-card.js.map +1 -1
- package/dist/components/progress.js +1 -1
- package/dist/components/progress.js.map +1 -1
- package/dist/components/radio-group.js +1 -1
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/scope.js +10 -10
- package/dist/components/scope.js.map +1 -1
- package/dist/components/scroll-area.js +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/separator.js +1 -1
- package/dist/components/separator.js.map +1 -1
- package/dist/components/skeleton.js +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/slider.js.map +1 -1
- package/dist/components/spinner.js +1 -1
- package/dist/components/stat.js +1 -1
- package/dist/components/status-view.js +1 -1
- package/dist/components/switch.js +1 -1
- package/dist/components/switch.js.map +1 -1
- package/dist/components/tabs.js +1 -1
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/theme-toggle.js +2 -2
- package/dist/components/theme-toggle.js.map +1 -1
- package/dist/components/toast.js +1 -1
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/toggle-group.js.map +1 -1
- package/dist/components/toggle.js +1 -1
- package/dist/components/toolbar.js +1 -1
- package/dist/components/toolbar.js.map +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/components/trace.js +1 -1
- package/dist/icons.js.map +1 -1
- package/dist/index.js +27 -27
- package/dist/motion.js.map +1 -1
- package/dist/sections/basic-page.js +2 -2
- package/dist/sections/sidebar.js +1 -1
- package/dist/src/components/accordion/accordion.d.ts +5 -5
- package/dist/src/components/autocomplete/autocomplete.d.ts +9 -9
- package/dist/src/components/avatar/avatar.d.ts +3 -3
- package/dist/src/components/badge/badge.d.ts +1 -1
- package/dist/src/components/bar-chart/bar-chart.d.ts +1 -1
- package/dist/src/components/bubble/bubble.d.ts +3 -3
- package/dist/src/components/button/button.d.ts +4 -4
- package/dist/src/components/button/close-button.d.ts +1 -1
- package/dist/src/components/calendar/calendar.d.ts +1 -1
- package/dist/src/components/card/card.d.ts +7 -7
- package/dist/src/components/chart/chart.d.ts +1 -1
- package/dist/src/components/chart/legend.d.ts +2 -2
- package/dist/src/components/chart/shell.d.ts +1 -1
- package/dist/src/components/chart/skeleton.d.ts +1 -1
- package/dist/src/components/chart/tooltip.d.ts +1 -1
- package/dist/src/components/chat/chat.d.ts +17 -17
- package/dist/src/components/checkbox/check-glyph.d.ts +1 -1
- package/dist/src/components/checkbox/checkbox-card.d.ts +1 -1
- package/dist/src/components/checkbox/checkbox-group.d.ts +1 -1
- package/dist/src/components/checkbox/checkbox.d.ts +1 -1
- package/dist/src/components/code-block/code-block.d.ts +1 -1
- package/dist/src/components/code-block/languages.d.ts +27 -27
- package/dist/src/components/collapsible/collapsible.d.ts +2 -2
- package/dist/src/components/combobox/combobox.d.ts +15 -15
- package/dist/src/components/command/command.d.ts +12 -12
- package/dist/src/components/context-menu/context-menu.d.ts +48 -0
- package/dist/src/components/copy-button/copy-button.d.ts +1 -1
- package/dist/src/components/data-table/data-table.d.ts +1 -1
- package/dist/src/components/date-picker/date-picker.d.ts +1 -1
- package/dist/src/components/description-list/description-list.d.ts +2 -2
- package/dist/src/components/dialog/dialog.d.ts +13 -11
- package/dist/src/components/drawer/drawer.d.ts +6 -6
- package/dist/src/components/error/error.d.ts +2 -2
- package/dist/src/components/field/field.d.ts +6 -6
- package/dist/src/components/fieldset/fieldset.d.ts +2 -2
- package/dist/src/components/filter-bar/filter-bar.d.ts +1 -1
- package/dist/src/components/form/form.d.ts +1 -1
- package/dist/src/components/input/input.d.ts +1 -1
- package/dist/src/components/input-group/box-search.d.ts +1 -1
- package/dist/src/components/input-group/input-group.d.ts +6 -5
- package/dist/src/components/kbd/kbd.d.ts +1 -1
- package/dist/src/components/line-chart/line-chart.d.ts +1 -1
- package/dist/src/components/log-list/log-list.d.ts +7 -7
- package/dist/src/components/menu/menu-pending.d.ts +3 -4
- package/dist/src/components/menu/menu.d.ts +81 -0
- package/dist/src/components/menubar/menubar.d.ts +1 -1
- package/dist/src/components/message/message.d.ts +7 -7
- package/dist/src/components/meter/meter.d.ts +5 -5
- package/dist/src/components/navigation-menu/navigation-menu.d.ts +8 -8
- package/dist/src/components/notification/notification.d.ts +1 -1
- package/dist/src/components/number-field/number-field.d.ts +6 -6
- package/dist/src/components/otp-field/otp-field.d.ts +1 -1
- package/dist/src/components/phone-input/phone-input.d.ts +2 -2
- package/dist/src/components/popover/popover.d.ts +4 -4
- package/dist/src/components/preview-card/preview-card.d.ts +3 -3
- package/dist/src/components/progress/progress.d.ts +5 -5
- package/dist/src/components/radio-group/radio-card.d.ts +1 -1
- package/dist/src/components/radio-group/radio-group.d.ts +2 -2
- package/dist/src/components/scope/scope.d.ts +1 -1
- package/dist/src/components/scroll-area/scroll-area-edges.d.ts +1 -1
- package/dist/src/components/scroll-area/scroll-area.d.ts +5 -5
- package/dist/src/components/select/select.d.ts +9 -9
- package/dist/src/components/separator/separator.d.ts +1 -1
- package/dist/src/components/slider/slider.d.ts +7 -7
- package/dist/src/components/spinner/spinner.d.ts +1 -1
- package/dist/src/components/stat/stat.d.ts +2 -2
- package/dist/src/components/status-view/status-view.d.ts +1 -1
- package/dist/src/components/switch/switch.d.ts +1 -1
- package/dist/src/components/tabs/tabs.d.ts +4 -4
- package/dist/src/components/theme-toggle/theme-toggle.d.ts +1 -1
- package/dist/src/components/toast/toast.d.ts +7 -7
- package/dist/src/components/toggle/toggle.d.ts +1 -1
- package/dist/src/components/toggle-group/toggle-group.d.ts +1 -1
- package/dist/src/components/toolbar/toolbar.d.ts +6 -6
- package/dist/src/components/tooltip/tooltip.d.ts +3 -3
- package/dist/src/components/trace/span-primitive.d.ts +3 -3
- package/dist/src/components/trace/trace.d.ts +3 -3
- package/dist/src/icons/discord.d.ts +1 -1
- package/dist/src/icons/github.d.ts +1 -1
- package/dist/src/icons/google.d.ts +1 -1
- package/dist/src/icons/imessage.d.ts +1 -1
- package/dist/src/icons/photon-mark.d.ts +1 -1
- package/dist/src/icons/reddit.d.ts +1 -1
- package/dist/src/icons/slack.d.ts +1 -1
- package/dist/src/icons/telegram.d.ts +1 -1
- package/dist/src/icons/whatsapp.d.ts +1 -1
- package/dist/src/icons/x.d.ts +1 -1
- package/dist/src/icons/youtube.d.ts +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/sections/basic-page/basic-page.d.ts +46 -46
- package/dist/src/sections/sidebar/sidebar.d.ts +11 -11
- package/dist/src/utils/animated-height.d.ts +1 -1
- package/dist/src/utils/ghost-search.d.ts +1 -1
- package/dist/src/utils/link-provider.d.ts +1 -1
- package/dist/src/utils/popup-anchor.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/package.json +24 -24
- package/src/styles/pho.css +1 -1
- package/src/styles/theme.css +1 -1
- package/dist/chunks/IconAlertCircleFilled-VxKU8TYK.js.map +0 -1
- package/dist/chunks/IconArrowUpRight-DGgKzQwV.js.map +0 -1
- package/dist/chunks/IconCheck-D2WuculQ.js.map +0 -1
- package/dist/chunks/IconChevronDown-CZilB71T.js.map +0 -1
- package/dist/chunks/IconChevronLeft-CSWMKQ4C.js.map +0 -1
- package/dist/chunks/IconChevronRight-CzoJnYNI.js.map +0 -1
- package/dist/chunks/IconChevronUp-CrpWSgIl.js.map +0 -1
- package/dist/chunks/IconInfoCircle-L0zfhg7R.js.map +0 -1
- package/dist/chunks/IconSearch-BKAHkLyX.js.map +0 -1
- package/dist/chunks/IconX-pZ9vrtSr.js.map +0 -1
- package/dist/chunks/avatar-BkmGDIqf.js.map +0 -1
- package/dist/chunks/badge-DlLJPLeZ.js.map +0 -1
- package/dist/chunks/bar-chart-CNCmuhQV.js.map +0 -1
- package/dist/chunks/basic-page-D_Wgu2pJ.js.map +0 -1
- package/dist/chunks/box-search-C9EVZgcb.js.map +0 -1
- package/dist/chunks/bubble-eaoLJP4N.js.map +0 -1
- package/dist/chunks/button-C9VqBBIr.js.map +0 -1
- package/dist/chunks/calendar-4OFiCLAv.js.map +0 -1
- package/dist/chunks/chart-B5wjhkBu.js.map +0 -1
- package/dist/chunks/chat-Bu8UyIbT.js.map +0 -1
- package/dist/chunks/checkbox-CwvoEJhd.js.map +0 -1
- package/dist/chunks/close-button-GvqWbLl0.js.map +0 -1
- package/dist/chunks/cn-ChIgwEl3.js.map +0 -1
- package/dist/chunks/code-block-DekLMMtV.js.map +0 -1
- package/dist/chunks/collapsible-Dv306QOT.js.map +0 -1
- package/dist/chunks/combobox-BJusx5b2.js.map +0 -1
- package/dist/chunks/copy-button-BmGshaq9.js.map +0 -1
- package/dist/chunks/createReactComponent-BqCmnqfX.js.map +0 -1
- package/dist/chunks/data-table-T4QKnrxQ.js.map +0 -1
- package/dist/chunks/date-picker-CZbcNIe-.js.map +0 -1
- package/dist/chunks/description-list-BRRQ0oF6.js.map +0 -1
- package/dist/chunks/dialog-12foDiQb.js.map +0 -1
- package/dist/chunks/error-D5SzZ0ev.js.map +0 -1
- package/dist/chunks/filter-bar-upeYW4dQ.js.map +0 -1
- package/dist/chunks/ghost-search-8PzP73zS.js.map +0 -1
- package/dist/chunks/input-fFWvPJOf.js.map +0 -1
- package/dist/chunks/input-group-fc9_jD4d.js.map +0 -1
- package/dist/chunks/kbd-DNI10uy7.js.map +0 -1
- package/dist/chunks/line-chart-BODTNBrX.js.map +0 -1
- package/dist/chunks/log-list-tNuCFGlP.js.map +0 -1
- package/dist/chunks/menu-CoMrYnd1.js.map +0 -1
- package/dist/chunks/message-Dz2-numf.js.map +0 -1
- package/dist/chunks/popover-BhBJO346.js.map +0 -1
- package/dist/chunks/scroll-area-DSwD9th7.js.map +0 -1
- package/dist/chunks/select-DU_0zVbn.js.map +0 -1
- package/dist/chunks/sidebar-BP39w1iA.js.map +0 -1
- package/dist/chunks/skeleton-DwjSl4vC.js.map +0 -1
- package/dist/chunks/spinner-BzLUo4Xk.js.map +0 -1
- package/dist/chunks/stat-hnNqjWVG.js.map +0 -1
- package/dist/chunks/status-view-C8tabjDu.js.map +0 -1
- package/dist/chunks/toast-BACxYsv6.js.map +0 -1
- package/dist/chunks/toggle-o84tawXy.js.map +0 -1
- package/dist/chunks/tooltip-BTF7GChl.js.map +0 -1
- package/dist/chunks/trace-DyjsBY-S.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as m } from "./cn-
|
|
3
|
-
import { t as d } from "./IconSearch-
|
|
4
|
-
import { t as f } from "./IconX-
|
|
5
|
-
import { t } from "./input-group-
|
|
2
|
+
import { t as m } from "./cn-CPbhpG1q.js";
|
|
3
|
+
import { t as d } from "./IconSearch-DkcWWZ1H.js";
|
|
4
|
+
import { t as f } from "./IconX-DnPlFC68.js";
|
|
5
|
+
import { t } from "./input-group-C3upo2OU.js";
|
|
6
6
|
import { useRef as x } from "react";
|
|
7
7
|
import { jsx as e, jsxs as b } from "react/jsx-runtime";
|
|
8
8
|
var y = "has-[:focus-visible]:ring-1 has-[:focus-visible]:ring-pho-primary has-[input:focus-visible]:ring-1 has-[input:focus-visible]:ring-pho-primary", g = "my-0.5 w-full min-w-0 flex-1 bg-transparent py-1.5 text-pho-primary outline-none placeholder:text-pho-placeholder disabled:cursor-not-allowed [&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none";
|
|
@@ -53,4 +53,4 @@ export {
|
|
|
53
53
|
A as t
|
|
54
54
|
};
|
|
55
55
|
|
|
56
|
-
//# sourceMappingURL=box-search-
|
|
56
|
+
//# sourceMappingURL=box-search-CMl5bQ7Y.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"box-search-CMl5bQ7Y.js","names":["cn","IconSearch","IconX","useRef","jsx","jsxs","QUIET_SEARCH_FOCUS","BOX_SEARCH_INPUT","BoxSearch","className","onClear","trailing","value","onChange","disabled","ref","props","inputRef","filled","InputGroup","node","event"],"sources":["../../src/components/input-group/box-search.tsx"],"sourcesContent":["import { useRef, type ComponentProps, type ReactNode } from \"react\";\nimport { IconSearch, IconX } from \"@tabler/icons-react\";\nimport { cn } from \"../../utils/cn\";\nimport { InputGroup } from \"./input-group\";\n\n/**\n * The quiet focus of a search riding on a list or table. The field keeps\n * its resting hairline when it takes focus: the list it narrows is where\n * the eye goes, and a ring would box the field off from it. Focus shows\n * in the caret and in the magnifier, which takes the primary ink. Put it\n * on the field's surface after the surface's own classes (an `Input`'s\n * `wrapperClassName`, an `InputGroup.Root`'s `className`): tailwind-merge\n * keeps the ring at its rest width and ink.\n */\nexport const QUIET_SEARCH_FOCUS =\n \"has-[:focus-visible]:ring-1 has-[:focus-visible]:ring-pho-primary has-[input:focus-visible]:ring-1 has-[input:focus-visible]:ring-pho-primary\";\n\n/**\n * The text control: `InputGroup.Input`'s `sm` classes on a plain input.\n * Not a Base UI `Field.Control` — inside a host's `Field` that would make\n * the search the field's control, taking its name and its label. The\n * browser's own clear glyph gives way to the field's.\n */\nconst BOX_SEARCH_INPUT =\n \"my-0.5 w-full min-w-0 flex-1 bg-transparent py-1.5 text-pho-primary outline-none placeholder:text-pho-placeholder disabled:cursor-not-allowed [&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none\";\n\nexport interface BoxSearchProps extends Omit<\n ComponentProps<\"input\">,\n \"type\" | \"size\" | \"children\"\n> {\n /**\n * Empties the query from the field's own clear button, shown while the\n * field holds text; focus stays in the field. Without it, no button.\n */\n onClear?: () => void;\n /** Quiet words at the field's end, before the clear button — a count. */\n trailing?: ReactNode;\n /** Classes for the field's surface: its width, its place in a row. */\n className?: string;\n}\n\n/**\n * The boxed search over a list or table — an `sm` field with the\n * magnifier leading, a `trailing` slot, and a clear button. Its focus is\n * quiet (see `QUIET_SEARCH_FOCUS`). Shared by `BasicPage.Search`,\n * `FilterBar`, and `Scope`; the boxless face is `GhostSearch`.\n */\nexport function BoxSearch({\n className,\n onClear,\n trailing,\n value,\n onChange,\n disabled,\n ref,\n ...props\n}: BoxSearchProps) {\n const inputRef = useRef<HTMLInputElement | null>(null);\n const filled = value != null && String(value) !== \"\";\n return (\n <InputGroup.Root\n size=\"sm\"\n className={cn(\"group/search\", QUIET_SEARCH_FOCUS, className)}\n >\n <InputGroup.Addon>\n <IconSearch\n aria-hidden\n className=\"text-pho-description group-focus-within/search:text-pho-primary transition-colors duration-100 ease-linear\"\n />\n </InputGroup.Addon>\n <input\n ref={(node) => {\n inputRef.current = node;\n if (typeof ref === \"function\") ref(node);\n else if (ref != null) ref.current = node;\n }}\n type=\"search\"\n value={value}\n // The query is the list's, not a form's: an enclosing form that\n // saves on change or shows a save row once dirty never hears it.\n onChange={(event) => {\n event.stopPropagation();\n onChange?.(event);\n }}\n disabled={disabled}\n autoComplete=\"off\"\n spellCheck={false}\n className={BOX_SEARCH_INPUT}\n {...props}\n />\n {trailing != null ? (\n <InputGroup.Addon className=\"text-pho-description text-xs tabular-nums\">\n {trailing}\n </InputGroup.Addon>\n ) : null}\n {onClear != null && filled && !disabled ? (\n <InputGroup.Addon>\n <button\n type=\"button\"\n aria-label=\"Clear search\"\n // Reachable by click, skipped by Tab: `Escape` clears from the\n // keyboard, and Tab moves on to the list.\n tabIndex={-1}\n onClick={() => {\n onClear();\n inputRef.current?.focus();\n }}\n className=\"text-pho-secondary hover:text-pho-secondary-hover flex cursor-pointer items-center transition-colors duration-100 ease-linear\"\n >\n <IconX aria-hidden />\n </button>\n </InputGroup.Addon>\n ) : null}\n </InputGroup.Root>\n );\n}\n"],"mappings":";;;;;;;AAcA,IAAaM,IACX,iJAQIC,IACJ;AAuBF,SAAgBC,EAAU,EACxB,WAAAC,GACA,SAAAC,GACA,UAAAC,GACA,OAAAC,GACA,UAAAC,GACA,UAAAC,GACA,KAAAC,GACA,GAAGC,EAAA,GACc;AACjB,QAAMC,IAAWd,EAAgC,IAAI,GAC/Ce,IAASN,KAAS,QAAQ,OAAOA,CAAK,MAAM;AAClD,SACE,gBAAAP,EAACc,EAAW,MAAZ;AAAA,IACE,MAAK;AAAA,IACL,WAAWnB,EAAG,gBAAgBM,GAAoBG,CAAS;AAAA,IAF7D,UAAA;AAAA,MAIE,gBAAAL,EAACe,EAAW,OAAZ,EAAA,UACE,gBAAAf,EAACH,GAAD;AAAA,QACE,eAAA;AAAA,QACA,WAAU;AAAA,MACX,CAAA,EACe,CAAA;AAAA,MAClB,gBAAAG,EAAC,SAAD;AAAA,QACE,KAAA,CAAMgB,MAAS;AACb,UAAAH,EAAS,UAAUG,GACf,OAAOL,KAAQ,aAAYA,EAAIK,CAAI,IAC9BL,KAAO,SAAMA,EAAI,UAAUK;AAAA,QACtC;AAAA,QACA,MAAK;AAAA,QACE,OAAAR;AAAA,QAGP,UAAA,CAAWS,MAAU;AACnB,UAAAA,EAAM,gBAAgB,GACtBR,IAAWQ,CAAK;AAAA,QAClB;AAAA,QACU,UAAAP;AAAA,QACV,cAAa;AAAA,QACb,YAAY;AAAA,QACZ,WAAWP;AAAA,QACX,GAAIS;AAAA,MACL,CAAA;AAAA,MACAL,KAAY,OACX,gBAAAP,EAACe,EAAW,OAAZ;AAAA,QAAkB,WAAU;AAAA,QACzB,UAAAR;AAAA,MACe,CAAA,IAChB;AAAA,MACHD,KAAW,QAAQQ,KAAU,CAACJ,IAC7B,gBAAAV,EAACe,EAAW,OAAZ,EAAA,UACE,gBAAAf,EAAC,UAAD;AAAA,QACE,MAAK;AAAA,QACL,cAAW;AAAA,QAGX,UAAU;AAAA,QACV,SAAA,MAAe;AACb,UAAAM,EAAQ,GACRO,EAAS,SAAS,MAAM;AAAA,QAC1B;AAAA,QACA,WAAU;AAAA,QAEV,UAAA,gBAAAb,EAACF,GAAD,EAAO,eAAA,GAAa,CAAA;AAAA,MACd,CAAA,EACQ,CAAA,IAChB;AAAA,IACW;AAAA,E;AAErB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as r } from "./cn-
|
|
2
|
+
import { t as r } from "./cn-CPbhpG1q.js";
|
|
3
3
|
import { t as u } from "./resolve-variant-CcD8iG5l.js";
|
|
4
4
|
import { createContext as l, useContext as p } from "react";
|
|
5
5
|
import { jsx as i } from "react/jsx-runtime";
|
|
@@ -85,4 +85,4 @@ export {
|
|
|
85
85
|
c as t
|
|
86
86
|
};
|
|
87
87
|
|
|
88
|
-
//# sourceMappingURL=bubble-
|
|
88
|
+
//# sourceMappingURL=bubble-D88Edlgj.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bubble-D88Edlgj.js","names":["cn","resolveVariant","createContext","useContext","jsx","useRender","BUBBLE_VARIANTS","BubbleContext","Group","className","props","Root","variant","align","Content","render","selected","Reactions","side","bubble","corner","Bubble"],"sources":["../../src/components/bubble/bubble.tsx"],"sourcesContent":["import {\n createContext,\n useContext,\n type ComponentProps,\n type Ref,\n} from \"react\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { cn } from \"../../utils/cn\";\nimport { resolveVariant, type VariantMap } from \"../../utils/resolve-variant\";\n\n/**\n * Bubble — one message's surface: the rounded chip that carries the text,\n * an image, or a line of prose, aligned to whichever side its author sits\n * on. It knows nothing about who sent it or when; `Message` owns the row\n * (avatar, header, footer) and `Chat` owns the thread.\n *\n * Design notes:\n * - Monochrome, like every Pho surface. The received message is the card\n * surface with the site hairline; the sent message is the inverted chip\n * (the site's \"msgbbl\" token — literally its message bubble). There is\n * no tinted brand bubble because there is no brand hue.\n * - `base` radius with a `sm` tail corner on the author's side, so the\n * bubble points at its sender the way the dashboard's already does.\n * - `Content` renders through Base UI's `render`, so a bubble can be a\n * `button` (open the message's record) or a link without a wrapper;\n * the hover wash and focus ring only apply then.\n */\n\n/* ------------------------------- variants ------------------------------- */\n\n/**\n * Surface axis — a closed monochrome set. `outlined` is the default:\n * the received message. `inverse` is the sent one.\n */\nexport const BUBBLE_VARIANTS = {\n outlined: {\n classes: cn(\n \"bg-pho-primary text-pho-primary ring-1 ring-pho-secondary ring-inset\",\n \"[&:is(button,a):hover]:bg-pho-primary-hover\",\n ),\n description:\n \"Default — the card surface with the hairline; a message received\",\n },\n inverse: {\n classes: cn(\n \"bg-pho-inverse text-pho-inverse\",\n \"[&:is(button,a):hover]:opacity-90\",\n ),\n description: \"The inverted chip — a message sent\",\n },\n subtle: {\n classes: cn(\n \"bg-pho-secondary text-pho-primary\",\n \"[&:is(button,a):hover]:bg-pho-primary-hover\",\n ),\n description: \"The quiet surface — a note, a system line, a quote\",\n },\n ghost: {\n classes: cn(\n \"rounded-none bg-transparent p-0 text-pho-primary\",\n \"[&:is(button,a):hover]:bg-pho-ghost-hover\",\n ),\n description: \"No surface — prose from an assistant, full width\",\n },\n error: {\n classes: cn(\n \"bg-pho-error-primary text-pho-error\",\n \"[&:is(button,a):hover]:bg-pho-error-primary\",\n ),\n description: \"Something failed — the send that did not go through\",\n },\n} satisfies VariantMap;\n\nexport type BubbleVariant = keyof typeof BUBBLE_VARIANTS;\nexport type BubbleAlign = \"start\" | \"end\";\n\nconst BubbleContext = createContext<{\n variant: BubbleVariant;\n align: BubbleAlign;\n}>({ variant: \"outlined\", align: \"start\" });\n\n/* --------------------------------- group -------------------------------- */\n\n/**\n * Consecutive bubbles from one author — a tighter stack than the gap\n * between messages, so they read as one turn.\n */\nfunction Group({ className, ...props }: ComponentProps<\"div\">) {\n return (\n <div\n data-bubble-group=\"\"\n className={cn(\"flex min-w-0 flex-col gap-1\", className)}\n {...props}\n />\n );\n}\n\n/* --------------------------------- root --------------------------------- */\n\nexport interface BubbleRootProps extends ComponentProps<\"div\"> {\n /** Surface. @default \"outlined\" */\n variant?: BubbleVariant;\n /** Which side the author sits on. @default \"start\" */\n align?: BubbleAlign;\n ref?: Ref<HTMLDivElement>;\n}\n\n/**\n * The bubble's column: the surface (`Content`) with anything anchored to\n * it (`Reactions`). Caps at 80% of the row so the other side stays open;\n * `ghost` runs full width.\n */\nfunction Root({\n variant = \"outlined\",\n align = \"start\",\n className,\n ...props\n}: BubbleRootProps) {\n return (\n <BubbleContext.Provider value={{ variant, align }}>\n <div\n data-bubble=\"\"\n data-variant={variant}\n data-align={align}\n className={cn(\n \"group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1\",\n align === \"end\" && \"items-end self-end\",\n variant === \"ghost\" && \"max-w-full\",\n className,\n )}\n {...props}\n />\n </BubbleContext.Provider>\n );\n}\n\n/* -------------------------------- content ------------------------------- */\n\nexport interface BubbleContentProps extends useRender.ComponentProps<\"div\"> {\n /**\n * The bubble whose record is open beside the thread — a brand ring\n * lifts it off the page. Pair with `aria-pressed` or `aria-current`\n * on an interactive bubble so the state is announced too.\n */\n selected?: boolean;\n}\n\n/**\n * The surface itself. Text wraps and keeps its line breaks. Pass\n * `render={<button type=\"button\" />}` (or a router link) to make the\n * bubble the control that opens the message — it then takes the hover\n * wash and the focus ring.\n */\nfunction Content({\n className,\n render,\n selected,\n ...props\n}: BubbleContentProps) {\n const { variant, align } = useContext(BubbleContext);\n return useRender({\n defaultTagName: \"div\",\n render,\n props: {\n ...props,\n className: cn(\n \"rounded-base w-fit max-w-full min-w-0 overflow-hidden px-3.5 py-2 text-left text-base leading-normal break-words whitespace-pre-wrap\",\n // The tail: a tighter corner on the author's side.\n align === \"end\" ? \"rounded-br-sm\" : \"rounded-bl-sm\",\n resolveVariant(BUBBLE_VARIANTS, variant),\n // Interactive bubbles — a button or a link — take the ring.\n \"outline-none [&:is(button,a)]:cursor-pointer [&:is(button,a)]:transition-[background-color,opacity,box-shadow] [&:is(button,a)]:duration-100 [&:is(button,a)]:ease-linear\",\n \"[&:is(button,a)]:focus-visible:ring-pho-brand [&:is(button,a)]:focus-visible:ring-2 [&:is(button,a)]:focus-visible:ring-offset-2 [&:is(button,a)]:focus-visible:ring-offset-(--pho-bubble-backdrop,var(--background-color-pho-primary))\",\n selected &&\n \"ring-pho-brand ring-2 ring-offset-2 ring-offset-(--pho-bubble-backdrop,var(--background-color-pho-primary))\",\n className,\n ),\n \"data-bubble-content\": \"\",\n \"data-selected\": selected ? \"\" : undefined,\n },\n });\n}\n\n/* ------------------------------- reactions ------------------------------ */\n\nexport interface BubbleReactionsProps extends ComponentProps<\"div\"> {\n /** Which edge of the bubble the pill hangs from. @default \"bottom\" */\n side?: \"top\" | \"bottom\";\n /** Which corner. Defaults to the corner away from the tail. */\n align?: BubbleAlign;\n}\n\n/**\n * A small pill hanging off a corner of the bubble — an emoji tapback, a\n * count. The bubble's column reserves no room for it: it overlaps the\n * edge, as tapbacks do.\n */\nfunction Reactions({\n side = \"bottom\",\n align,\n className,\n ...props\n}: BubbleReactionsProps) {\n const bubble = useContext(BubbleContext);\n const corner = align ?? (bubble.align === \"end\" ? \"start\" : \"end\");\n return (\n <div\n data-bubble-reactions=\"\"\n data-side={side}\n data-align={corner}\n className={cn(\n \"bg-pho-primary text-pho-primary ring-pho-secondary absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full px-1.5 py-0.5 text-xs leading-none ring-1 has-[button]:p-0\",\n side === \"top\" ? \"top-0 -translate-y-3/4\" : \"bottom-0 translate-y-3/4\",\n corner === \"start\" ? \"left-2\" : \"right-2\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * A message's surface. `Root` takes the `variant` and `align`; `Content`\n * is the chip (a `div`, or a `button` / link through `render`);\n * `Reactions` hangs off a corner. Stack one author's consecutive bubbles\n * in a `Group`.\n *\n * ```tsx\n * <Bubble.Root variant=\"inverse\" align=\"end\">\n * <Bubble.Content>On my way.</Bubble.Content>\n * <Bubble.Reactions>👍</Bubble.Reactions>\n * </Bubble.Root>\n * ```\n */\nexport const Bubble = { Root, Content, Reactions, Group };\n"],"mappings":";;;;;;AAkCA,IAAaM,IAAkB;AAAA,EAC7B,UAAU;AAAA,IACR,SAASN,EACP,wEACA,6CACF;AAAA,IACA,aACE;AAAA,EACJ;AAAA,EACA,SAAS;AAAA,IACP,SAASA,EACP,mCACA,mCACF;AAAA,IACA,aAAa;AAAA,EACf;AAAA,EACA,QAAQ;AAAA,IACN,SAASA,EACP,qCACA,6CACF;AAAA,IACA,aAAa;AAAA,EACf;AAAA,EACA,OAAO;AAAA,IACL,SAASA,EACP,oDACA,2CACF;AAAA,IACA,aAAa;AAAA,EACf;AAAA,EACA,OAAO;AAAA,IACL,SAASA,EACP,uCACA,6CACF;AAAA,IACA,aAAa;AAAA,EACf;AACF,GAKMO,IAAgBL,EAGnB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B,EAAWI,CAAa,GACjCa,IAASP,MAAUM,EAAO,UAAU,QAAQ,UAAU;AAC5D,SACE,gBAAAf,EAAC,OAAD;AAAA,IACE,yBAAsB;AAAA,IACtB,aAAWc;AAAA,IACX,cAAYE;AAAA,IACZ,WAAWpB,EACT,kMACAkB,MAAS,QAAQ,2BAA2B,4BAC5CE,MAAW,UAAU,WAAW,WAChCX,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AAeA,IAAaW,IAAS;AAAA,EAAE,MAAAV;AAAA,EAAM,SAAAG;AAAA,EAAS,WAAAG;AAAA,EAAW,OAAAT;AAAM"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as l } from "./cn-
|
|
2
|
+
import { t as l } from "./cn-CPbhpG1q.js";
|
|
3
3
|
import { t as A } from "./is-react-component-DSnjtBmo.js";
|
|
4
4
|
import { t as R } from "./resolve-variant-CcD8iG5l.js";
|
|
5
5
|
import { n as Z } from "./link-provider-DXzDQ08N.js";
|
|
6
6
|
import { SPRING_PRESS as Q } from "../motion.js";
|
|
7
|
-
import { n as C } from "./spinner-
|
|
7
|
+
import { n as C } from "./spinner-BSutFL4l.js";
|
|
8
8
|
import { isValidElement as I, useEffect as $, useMemo as J, useRef as X, useState as Y } from "react";
|
|
9
9
|
import { Fragment as z, jsx as s, jsxs as ee } from "react/jsx-runtime";
|
|
10
10
|
import { motion as w, useReducedMotion as oe } from "motion/react";
|
|
@@ -469,4 +469,4 @@ export {
|
|
|
469
469
|
F as u
|
|
470
470
|
};
|
|
471
471
|
|
|
472
|
-
//# sourceMappingURL=button-
|
|
472
|
+
//# sourceMappingURL=button-CLfWdqm-.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-CLfWdqm-.js","names":["Icon","_Fragment","cn","isReactComponent","resolveVariant","useLinkComponent","SPRING_PRESS","Spinner","isValidElement","useEffect","useMemo","useRef","useState","Fragment$1","jsx","jsxs","motion","useReducedMotion","COMMON_ROOT","BUTTON_SIZES","BUTTON_SHAPES","SQUARE_LG_RADIUS","EFFECT_OPTICAL_PAD","BUTTON_VARIANTS","BUTTON_COLORS","BUTTON_LOOKS","buttonVariants","opts","variant","color","size","shapeOpt","className","shape","look","SLOT_CLASS","Slot","position","children","renderSlot","icon","warnMissingLabel","svgOnly","label","BUTTON_SPRING","EFFECT_SHEEN_REST","EFFECT_SHEEN_HOVER","EFFECT_SHEEN_PRESS","BUTTON_PRESS_SCALE","EFFECT_SHEEN_WAKE","WAKE_TRANSITION","useWakeOnEnable","inert","sheen","waking","setWaking","prevInert","reduceMotion","definition","ICON_REVEAL_VARIANTS","ICON_REVEAL_PAD_RESTORE","RevealSlot","wrapRevealIcon","buttonInner","loading","prefix","suffix","iconReveal","reveal","buttonRootMotionProps","rest","hover","press","wake","buttonClassName","Button","ref","props","onWakeComplete","cls","inner","ButtonLink","disabled","href","Link","MotionLink","shared","event","EFFECT_BUTTON_SIZES","effectButtonVariants","fullWidth","EffectButton","animated","EffectButtonLink"],"sources":["../../src/components/button/button.tsx"],"sourcesContent":["import {\n isValidElement,\n useEffect,\n useMemo,\n useRef,\n useState,\n type AnchorHTMLAttributes,\n type ButtonHTMLAttributes,\n type ComponentType,\n type FC,\n type MouseEvent as ReactMouseEvent,\n type ReactNode,\n type Ref,\n} from \"react\";\nimport { motion, useReducedMotion } from \"motion/react\";\nimport { SPRING_PRESS } from \"../../motion\";\nimport { cn } from \"../../utils/cn\";\nimport { resolveVariant, type VariantMap } from \"../../utils/resolve-variant\";\nimport { isReactComponent } from \"../../utils/is-react-component\";\nimport { useLinkComponent } from \"../../utils/link-provider\";\nimport { Spinner } from \"../spinner/spinner\";\n\n/**\n * Design notes:\n * - TWO visual axes: `variant` is the surface (filled / outlined / ghost /\n * effect) and `color` is the semantic ink (default / destructive). Dialog\n * confirms use the default `effect`; danger-zone triggers are `ghost` +\n * `destructive`. `effect` is the marketing pill: same-hue 1.5px outer rim\n * plus inset sheen that springs on hover.\n * - `iconReveal` is a separate boolean: on hover, prefix/suffix icons spring\n * in from collapsed — works with any variant, independent of `effect`.\n * - Press scale (Motion `whileTap` → 0.97) is shared by every variant; only\n * `effect` also springs its inset sheen on hover/press, and replays a\n * one-shot sheen glint when it leaves `disabled`/`loading` (wake).\n * - THREE sizes (`sm` / `md` / `lg`, default `md`). No `xs` / `xl`.\n * - `prefix` / `suffix` are generic slots (icon, spinner, count…), not\n * icon-only props. `svgOnly` makes an icon button and *requires* an\n * `aria-label`. `loading` is declarative. Effect’s rim/sheen are\n * box-shadow layers (not layout `border`).\n * - Navigation belongs to `ButtonLink`; an inline text link is an anchor.\n */\n\nconst COMMON_ROOT = cn(\n // Transition colors/shadows in CSS; transform (press scale) is owned by Motion.\n // Inset focus so the ring stays inside a clipping ancestor (a card, a\n // scrollport) and inside the pill itself — never drop the ring.\n \"group relative inline-flex h-max cursor-pointer items-center justify-center whitespace-nowrap outline-pho-brand transition-[color,background-color,border-color,opacity,box-shadow,outline-color] duration-100 ease-linear focus-visible:outline-2 focus-visible:-outline-offset-2\",\n // Disabled (native `disabled` on <button>, `aria-disabled` on links).\n \"disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:pointer-events-none\",\n);\n\n/**\n * Size axis — padding, text size, and icon-only (svgOnly) padding.\n *\n * Icon-side tuck (optical correction): a side that carries an icon sits 4px\n * closer to its edge than the label does to the other — sm 12/16 · md 14/18 ·\n * lg 18/22. An icon's box brings its own whitespace, so equal padding reads\n * as a looser icon side; the tuck is small enough to look equal, not measured\n * to be. Selected structurally via `:has()` on the slot markers (`data-icon`\n * is `prefix`, `suffix`, or `loading` — the spinner is an icon too). The\n * label has no padding of its own: its inset from an icon is the `gap`.\n */\nexport const BUTTON_SIZES = {\n sm: {\n classes: cn(\n \"gap-1.5 px-4 py-1.5 text-base font-medium data-svg-only:p-2\",\n \"has-[[data-icon=prefix]]:pl-3 has-[[data-icon=loading]]:pl-3 has-[[data-icon=suffix]]:pr-3\",\n ),\n description: \"Small — compact rows, tables, and toolbars\",\n },\n md: {\n classes: cn(\n \"gap-1.5 px-4.5 py-2 text-base font-medium data-svg-only:p-2.5\",\n \"has-[[data-icon=prefix]]:pl-3.5 has-[[data-icon=loading]]:pl-3.5 has-[[data-icon=suffix]]:pr-3.5\",\n ),\n description: \"Medium — the default\",\n },\n lg: {\n classes: cn(\n \"gap-2 px-5.5 py-2.5 text-md font-medium data-svg-only:p-3\",\n \"has-[[data-icon=prefix]]:pl-4.5 has-[[data-icon=loading]]:pl-4.5 has-[[data-icon=suffix]]:pr-4.5\",\n ),\n description: \"Large — prominent and marketing actions\",\n },\n} satisfies VariantMap;\n\n/** Shape axis — corner treatment. Pills are the photon.codes default. */\nexport const BUTTON_SHAPES = {\n rounded: {\n classes: \"rounded-full\",\n description: \"Pill — the default; every button on photon.codes\",\n },\n square: {\n classes: \"rounded-base\",\n description: \"Gently rounded corners for dense app chrome\",\n },\n circle: {\n classes: \"rounded-full\",\n description: \"Circular — pair with svgOnly for round icon buttons\",\n },\n} satisfies VariantMap;\n\n/**\n * At `lg`, square buttons add squircle smoothing on top of `rounded-base`\n * (12px) — the same treatment as Input `lg`, so 44px buttons and fields share\n * a corner language. 12/44 ≈ 0.272 — LiftKit's half-step decimal (√φ − 1).\n */\nconst SQUARE_LG_RADIUS = \"squircle\";\n\n/**\n * Optical pad for `effect`: the 1.5px outer rim is a box-shadow (no layout\n * cost), so without this the painted height reads ~3px taller than filled /\n * outlined / ghost. Subtract 1.5px from each side so fill+rim matches siblings.\n */\nconst EFFECT_OPTICAL_PAD: Record<ButtonSize, string> = {\n sm: \"py-[4.5px] data-svg-only:p-[6.5px]\",\n md: \"py-[6.5px] data-svg-only:p-[8.5px]\",\n lg: \"py-[8.5px] data-svg-only:p-[10.5px]\",\n};\n\n/** Surface axis — how the control is drawn. `effect` is the default. */\nexport const BUTTON_VARIANTS = {\n effect: {\n classes: \"\",\n description:\n \"Default — marketing pill with same-hue outer rim and inset sheen\",\n },\n filled: {\n classes: \"\",\n description: \"Solid fill without sheen\",\n },\n outlined: {\n classes: \"\",\n description: \"Hairline ring — supporting action\",\n },\n ghost: {\n classes: \"\",\n description: \"Borderless — quiet / inline action\",\n },\n} satisfies VariantMap;\n\n/** Color axis — semantic ink. `default` is the default. */\nexport const BUTTON_COLORS = {\n default: {\n classes: \"\",\n description: \"Neutral / brand contrast\",\n },\n destructive: {\n classes: \"\",\n description: \"Destructive intent (delete, discard)\",\n },\n} satisfies VariantMap;\n\n/**\n * Surface × color looks. Kept as a matrix so each cell can own its tokens\n * (filled destructive is solid red; ghost destructive is red text only).\n */\nconst BUTTON_LOOKS: Record<\n keyof typeof BUTTON_VARIANTS,\n Record<keyof typeof BUTTON_COLORS, string>\n> = {\n // Icons inherit the label ink (currentColor) — no separate opacity/tint.\n // The rim replicates photon.codes' Framer CTA border: 1.5px in the fill hue\n // at 62% alpha, reading as a soft same-hue edge (the site has NO outer\n // glow — verified against live computed styles). Sheen geometry is CSS\n // vars that Motion springs on hover (see Button). All edges are shadows —\n // never a layout `border` — so height stays paired with other variants.\n effect: {\n default: cn(\n \"squircle overflow-visible bg-pho-brand-solid text-pho-on-brand transition-none\",\n \"hover:bg-pho-brand-solid data-loading:bg-pho-brand-solid\",\n \"[--pho-rim:color-mix(in_oklab,var(--background-color-pho-brand-solid)_62%,transparent)]\",\n \"[--pho-sheen:light-dark(rgba(255,255,255,0.5),rgba(0,0,0,0.12))]\",\n \"shadow-[0_0_0_1.5px_var(--pho-rim),inset_0_0_0_1px_var(--border-color-pho-on-brand),inset_0_var(--pho-sheen-y,0px)_var(--pho-sheen-blur,5px)_var(--pho-sheen-spread,2px)_var(--pho-sheen)]\",\n ),\n destructive: cn(\n \"squircle overflow-visible bg-pho-error-solid text-white outline-pho-error transition-none\",\n \"hover:bg-pho-error-solid data-loading:bg-pho-error-solid\",\n \"[--pho-rim:color-mix(in_oklab,var(--background-color-pho-error-solid)_62%,transparent)]\",\n \"[--pho-sheen:light-dark(rgba(255,255,255,0.45),rgba(0,0,0,0.18))]\",\n \"shadow-[0_0_0_1.5px_var(--pho-rim),inset_0_0_0_1px_oklch(1_0_0/0.2),inset_0_var(--pho-sheen-y,0px)_var(--pho-sheen-blur,5px)_var(--pho-sheen-spread,2px)_var(--pho-sheen)]\",\n ),\n },\n filled: {\n default:\n \"bg-pho-brand-solid text-pho-on-brand hover:bg-pho-brand-solid-hover data-loading:bg-pho-brand-solid-hover\",\n destructive:\n \"bg-pho-error-solid text-white outline-pho-error hover:bg-pho-error-solid-hover data-loading:bg-pho-error-solid-hover\",\n },\n outlined: {\n default:\n // Rest hairline is the card stroke; hover climbs to primary ink so the\n // edge reads as black (white in dark), matching the label's hover lift.\n // The ring spans the full ladder, so ease it in gently — 200ms ease-out\n // approximates the effect variant's soft spring instead of base's\n // 100ms linear snap. Prefer the named `ring-pho-ink` token over an\n // arbitrary value so consumers' Tailwind scanners pick it up reliably.\n \"bg-pho-primary text-pho-secondary ring-1 ring-pho-secondary ring-inset duration-200 ease-out hover:bg-pho-primary-hover hover:text-pho-secondary-hover hover:ring-pho-ink data-loading:bg-pho-primary-hover\",\n destructive:\n \"bg-pho-primary text-pho-error outline-pho-error ring-1 ring-pho-error ring-inset duration-200 ease-out hover:bg-pho-error-primary hover:text-pho-error-hover data-loading:bg-pho-error-primary\",\n },\n ghost: {\n default:\n \"text-pho-secondary hover:bg-pho-ghost-hover hover:text-pho-secondary-hover data-loading:bg-pho-ghost-hover\",\n destructive:\n \"text-pho-error outline-pho-error hover:bg-pho-error-primary hover:text-pho-error-hover data-loading:bg-pho-error-primary\",\n },\n};\n\nexport type ButtonSize = keyof typeof BUTTON_SIZES;\nexport type ButtonShape = keyof typeof BUTTON_SHAPES;\nexport type ButtonVariant = keyof typeof BUTTON_VARIANTS;\nexport type ButtonColor = keyof typeof BUTTON_COLORS;\n\n/** Compose the full class string for a button — exported for reuse/testing. */\nexport function buttonVariants(opts?: {\n variant?: ButtonVariant;\n color?: ButtonColor;\n size?: ButtonSize;\n shape?: ButtonShape;\n className?: string;\n}): string {\n const {\n variant = \"effect\",\n color = \"default\",\n size = \"md\",\n shape: shapeOpt = \"rounded\",\n className,\n } = opts ?? {};\n // Effect pills are always fully rounded — shape is ignored.\n const shape = variant === \"effect\" ? \"rounded\" : shapeOpt;\n const look =\n BUTTON_LOOKS[variant as keyof typeof BUTTON_LOOKS]?.[\n color as keyof (typeof BUTTON_LOOKS)[\"effect\"]\n ] ?? \"\";\n return cn(\n COMMON_ROOT,\n resolveVariant(BUTTON_SHAPES, shape),\n shape === \"square\" && size === \"lg\" && SQUARE_LG_RADIUS,\n resolveVariant(BUTTON_SIZES, size),\n // Outer rim is a 1.5px box-shadow (no layout cost). Shrink padding by the\n // same amount so fill+rim paints at the same visual size as filled /\n // outlined / ghost siblings of the same `size`.\n variant === \"effect\" && EFFECT_OPTICAL_PAD[size],\n look,\n className,\n );\n}\n\n/** An icon/element slot rendered before or after the label. */\ntype Slottable = ReactNode | FC<{ className?: string }>;\n\ninterface ButtonBaseProps {\n /** Surface variant. @default \"effect\" */\n variant?: ButtonVariant;\n /** Semantic color. @default \"default\" */\n color?: ButtonColor;\n /** Size variant. @default \"md\" */\n size?: ButtonSize;\n /** Corner shape. @default \"rounded\" */\n shape?: ButtonShape;\n /** Slot before the label — a component (`Plus`) or element (`<Plus />`). */\n prefix?: Slottable;\n /** Slot after the label. */\n suffix?: Slottable;\n /**\n * Reveal prefix/suffix icons on hover — collapsed and invisible at rest,\n * spring in on hover. Independent of `variant` (including `effect`).\n * Ignored when `svgOnly`. @default false\n */\n iconReveal?: boolean;\n /** Render as an icon-only button. Requires an `aria-label`. */\n svgOnly?: boolean;\n /** Show a spinner and block interaction while staying readable. */\n loading?: boolean;\n children?: ReactNode;\n className?: string;\n}\n\n/**\n * DOM event handlers whose React signatures clash with Motion's gesture\n * props of the same name (Motion re-types these on `motion.*` elements).\n * Excluded from the public API — Button renders through Motion when the\n * sheen or icon reveal is active, so these handlers would be intercepted.\n */\ntype MotionHandlerConflicts =\n | \"onAnimationStart\"\n | \"onAnimationEnd\"\n | \"onAnimationIteration\"\n | \"onDrag\"\n | \"onDragStart\"\n | \"onDragEnd\"\n | \"onDragEnter\"\n | \"onDragExit\"\n | \"onDragLeave\"\n | \"onDragOver\"\n | \"onDrop\";\n\nexport interface ButtonProps\n extends\n ButtonBaseProps,\n Omit<\n ButtonHTMLAttributes<HTMLButtonElement>,\n keyof ButtonBaseProps | MotionHandlerConflicts\n > {\n ref?: Ref<HTMLButtonElement>;\n}\n\nexport interface ButtonLinkProps\n extends\n ButtonBaseProps,\n Omit<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n keyof ButtonBaseProps | MotionHandlerConflicts\n > {\n /** Navigate to this URL (rendered via the host's `LinkProvider`). */\n href: string;\n /** Visually and semantically disable the link. */\n disabled?: boolean;\n}\n\nconst SLOT_CLASS =\n // Icons scale with the label: 1.125em tracks the button's font size\n // (16px icon beside 14px text, 18px beside 16px) so small buttons never\n // carry an oversized glyph.\n \"transition-inherit-all pointer-events-none inline-flex shrink-0 items-center [&>svg]:size-[1.125em] [&>svg]:shrink-0\";\n\nfunction Slot({\n position,\n children,\n}: {\n position: \"prefix\" | \"suffix\" | \"loading\";\n children: ReactNode;\n}) {\n return (\n <span data-icon={position} className={SLOT_CLASS}>\n {children}\n </span>\n );\n}\n\nfunction renderSlot(icon: Slottable, position: \"prefix\" | \"suffix\") {\n if (icon == null || icon === false) return null;\n if (isReactComponent(icon)) {\n const Icon = icon;\n return (\n <Slot position={position}>\n <Icon />\n </Slot>\n );\n }\n if (isValidElement(icon)) return <Slot position={position}>{icon}</Slot>;\n return null;\n}\n\nfunction warnMissingLabel(svgOnly: boolean | undefined, label: unknown) {\n if (\n svgOnly &&\n !label &&\n typeof process !== \"undefined\" &&\n process.env?.NODE_ENV !== \"production\"\n ) {\n console.warn(\n \"Button: `svgOnly` buttons require an `aria-label` that names the action.\",\n );\n }\n}\n\n/* ======================== Motion: sheen + icon reveal ======================== */\n\n/** Framer source transition: `spring-physics 200 30 0.1`. */\nconst BUTTON_SPRING = SPRING_PRESS;\n\nconst EFFECT_SHEEN_REST = {\n \"--pho-sheen-y\": \"0px\",\n \"--pho-sheen-blur\": \"5px\",\n \"--pho-sheen-spread\": \"2px\",\n} as const;\n\n/** Per-size sheen hover targets. */\nconst EFFECT_SHEEN_HOVER = {\n sm: {\n \"--pho-sheen-y\": \"-3px\",\n \"--pho-sheen-blur\": \"8px\",\n \"--pho-sheen-spread\": \"2px\",\n },\n md: {\n \"--pho-sheen-y\": \"-3px\",\n \"--pho-sheen-blur\": \"8px\",\n \"--pho-sheen-spread\": \"2px\",\n },\n lg: {\n \"--pho-sheen-y\": \"-6px\",\n \"--pho-sheen-blur\": \"14px\",\n \"--pho-sheen-spread\": \"1px\",\n },\n} as const;\n\n/**\n * Per-size sheen press targets — the inverse gesture of hover: the light\n * drops back below the rest line and tightens while the pill compresses\n * slightly, so hover → press reads as \"lift, then push in\".\n */\nconst EFFECT_SHEEN_PRESS = {\n sm: {\n \"--pho-sheen-y\": \"1.5px\",\n \"--pho-sheen-blur\": \"4px\",\n \"--pho-sheen-spread\": \"1px\",\n },\n md: {\n \"--pho-sheen-y\": \"1.5px\",\n \"--pho-sheen-blur\": \"4px\",\n \"--pho-sheen-spread\": \"1px\",\n },\n lg: {\n \"--pho-sheen-y\": \"3px\",\n \"--pho-sheen-blur\": \"7px\",\n \"--pho-sheen-spread\": \"1px\",\n },\n} as const;\n\n/** Pill compression while pressed — subtle, transform-only; every variant. */\nconst BUTTON_PRESS_SCALE = 0.97;\n\n/**\n * One-shot \"wake\" glint when an effect pill re-enables (disabled / loading →\n * interactive). The keyframes replay the pill's own gesture in reverse: the\n * sheen starts from its pressed-in position (low, tight — the dormant read),\n * springs up past the hover line, and settles at rest. Shadow-only, so the\n * pill never moves or resizes next to its neighbours.\n */\nconst EFFECT_SHEEN_WAKE = {\n sm: {\n \"--pho-sheen-y\": [\"1.5px\", \"-4px\", \"0px\"],\n \"--pho-sheen-blur\": [\"4px\", \"9px\", \"5px\"],\n \"--pho-sheen-spread\": [\"1px\", \"2px\", \"2px\"],\n },\n md: {\n \"--pho-sheen-y\": [\"1.5px\", \"-4px\", \"0px\"],\n \"--pho-sheen-blur\": [\"4px\", \"9px\", \"5px\"],\n \"--pho-sheen-spread\": [\"1px\", \"2px\", \"2px\"],\n },\n lg: {\n \"--pho-sheen-y\": [\"3px\", \"-8px\", \"0px\"],\n \"--pho-sheen-blur\": [\"7px\", \"16px\", \"5px\"],\n \"--pho-sheen-spread\": [\"1px\", \"1px\", \"2px\"],\n },\n} as const;\n\n/**\n * Wake timing: a short delay lets the 100ms opacity fade land first, then a\n * quick rise (feedback) and a relaxed settle. Keyframes need a tween — the\n * shared spring only animates between two values.\n */\nconst WAKE_TRANSITION = {\n duration: 0.6,\n delay: 0.05,\n times: [0, 0.4, 1],\n ease: [\"easeOut\", \"easeInOut\"],\n} as const;\n\n/**\n * Fire the wake glint on the disabled/loading → enabled edge (never on\n * mount), skipped under reduced motion. `data-waking` mirrors the window so\n * tests and styling can observe it.\n */\nfunction useWakeOnEnable(inert: boolean, sheen: boolean) {\n const [waking, setWaking] = useState(false);\n const prevInert = useRef(inert);\n const reduceMotion = useReducedMotion();\n\n useEffect(() => {\n if (prevInert.current && !inert && sheen && !reduceMotion) {\n setWaking(true);\n } else if (inert) {\n setWaking(false);\n }\n prevInert.current = inert;\n }, [inert, sheen, reduceMotion]);\n\n return {\n waking,\n onWakeComplete: (definition: unknown) => {\n if (definition === \"wake\") setWaking(false);\n },\n };\n}\n\n/**\n * Icon reveal sizes — collapsed at rest, full on hover. `lg` matches the\n * Framer 20×21 source; `sm`/`md` scale with the 14px label.\n */\nconst ICON_REVEAL_VARIANTS = {\n sm: {\n rest: { opacity: 0, width: 1, height: 9 },\n hover: { opacity: 1, width: 17, height: 18 },\n },\n md: {\n rest: { opacity: 0, width: 1, height: 9 },\n hover: { opacity: 1, width: 17, height: 18 },\n },\n lg: {\n rest: { opacity: 0, width: 1, height: 10 },\n hover: { opacity: 1, width: 20, height: 21 },\n },\n} as const;\n\n/**\n * When icons are hidden at rest, undo Button's icon-side padding tuck so the\n * pill doesn't look lopsided. Same `:has()` keys as the tuck (later wins).\n */\nconst ICON_REVEAL_PAD_RESTORE: Record<ButtonSize, string> = {\n sm: \"has-[[data-icon=prefix]]:pl-4 has-[[data-icon=loading]]:pl-4 has-[[data-icon=suffix]]:pr-4\",\n md: \"has-[[data-icon=prefix]]:pl-4.5 has-[[data-icon=loading]]:pl-4.5 has-[[data-icon=suffix]]:pr-4.5\",\n lg: \"has-[[data-icon=prefix]]:pl-5.5 has-[[data-icon=loading]]:pl-5.5 has-[[data-icon=suffix]]:pr-5.5\",\n};\n\nfunction RevealSlot({\n position,\n size,\n children,\n}: {\n position: \"prefix\" | \"suffix\";\n size: ButtonSize;\n children: ReactNode;\n}) {\n return (\n <motion.span\n data-icon={position}\n variants={ICON_REVEAL_VARIANTS[size]}\n transition={BUTTON_SPRING}\n style={{\n display: \"inline-flex\",\n flex: \"none\",\n alignItems: \"center\",\n overflow: \"hidden\",\n }}\n className=\"pointer-events-none [&>svg]:block [&>svg]:size-full\"\n >\n {children}\n </motion.span>\n );\n}\n\nfunction wrapRevealIcon(\n icon: Slottable,\n position: \"prefix\" | \"suffix\",\n size: ButtonSize,\n): ReactNode | undefined {\n if (icon == null || icon === false) return undefined;\n if (isReactComponent(icon)) {\n const Icon = icon;\n return (\n <RevealSlot position={position} size={size}>\n <Icon />\n </RevealSlot>\n );\n }\n if (isValidElement(icon)) {\n return (\n <RevealSlot position={position} size={size}>\n {icon}\n </RevealSlot>\n );\n }\n return (\n <RevealSlot position={position} size={size}>\n {icon}\n </RevealSlot>\n );\n}\n\nfunction buttonInner({\n svgOnly,\n loading,\n prefix,\n suffix,\n children,\n iconReveal,\n size,\n}: Pick<\n ButtonBaseProps,\n | \"svgOnly\"\n | \"loading\"\n | \"prefix\"\n | \"suffix\"\n | \"children\"\n | \"iconReveal\"\n | \"size\"\n> & { size: ButtonSize }) {\n if (svgOnly) {\n return loading ? <Spinner /> : children;\n }\n const reveal = Boolean(iconReveal);\n return (\n <>\n {loading ? (\n <Slot position=\"loading\">\n <Spinner />\n </Slot>\n ) : reveal ? (\n wrapRevealIcon(prefix, \"prefix\", size)\n ) : (\n renderSlot(prefix, \"prefix\")\n )}\n {children != null && children !== false && (\n <span data-text className=\"transition-inherit-all\">\n {children}\n </span>\n )}\n {reveal\n ? wrapRevealIcon(suffix, \"suffix\", size)\n : renderSlot(suffix, \"suffix\")}\n </>\n );\n}\n\n/**\n * Root Motion props — press scale on every variant; sheen + icon-reveal gap\n * only when those features are on. Press composes over hover (`whileTap` >\n * `whileHover`): effect sheen inverts while the pill compresses; other\n * variants get the same scale with no sheen change. `waking` plays the\n * one-shot re-enable glint; a real hover mid-glint takes over seamlessly.\n */\nfunction buttonRootMotionProps(\n size: ButtonSize,\n inert: boolean | undefined,\n opts: { sheen: boolean; iconReveal: boolean; waking?: boolean },\n) {\n const rest: Record<string, string | number> = {\n scale: 1,\n ...(opts.sheen ? EFFECT_SHEEN_REST : {}),\n };\n const hover: Record<string, string | number> = opts.sheen\n ? { ...EFFECT_SHEEN_HOVER[size] }\n : {};\n const press: Record<string, string | number> = {\n scale: BUTTON_PRESS_SCALE,\n ...(opts.sheen ? EFFECT_SHEEN_PRESS[size] : {}),\n };\n const wake = opts.sheen\n ? { ...EFFECT_SHEEN_WAKE[size], transition: WAKE_TRANSITION }\n : {};\n if (opts.iconReveal) {\n // Collapse gap at rest so the hidden icon leaves no hole; hover opens it.\n rest.gap = 0;\n hover.gap = size === \"lg\" ? 6 : 2;\n }\n return {\n initial: false as const,\n animate: opts.waking && opts.sheen ? \"wake\" : \"rest\",\n whileHover: inert ? undefined : \"hover\",\n whileTap: inert ? undefined : \"press\",\n variants: { rest, hover, press, wake },\n transition: BUTTON_SPRING,\n };\n}\n\nfunction buttonClassName({\n variant,\n color,\n size,\n shape,\n loading,\n svgOnly,\n className,\n}: {\n variant?: ButtonVariant;\n color?: ButtonColor;\n size?: ButtonSize;\n shape?: ButtonShape;\n loading?: boolean;\n svgOnly?: boolean;\n className?: string;\n}) {\n return cn(\n buttonVariants({ variant, color, size, shape }),\n loading && \"pointer-events-none\",\n svgOnly && \"[&>svg]:size-[1.25em] [&>svg]:shrink-0\",\n className,\n );\n}\n\n/**\n * Button — triggers an action that mutates state (submit, save, delete).\n * For navigation that changes the URL, use {@link ButtonLink}.\n *\n * Default surface is `effect` (same-hue 1.5px outer rim + inset sheen). Use\n * `filled` for a solid fill without those layers. `iconReveal` springs\n * prefix/suffix icons in on hover — independent of variant.\n */\nexport function Button({\n variant = \"effect\",\n color,\n size = \"md\",\n shape,\n prefix,\n suffix,\n iconReveal = false,\n svgOnly,\n loading,\n children,\n className,\n ref,\n ...props\n}: ButtonProps) {\n warnMissingLabel(svgOnly, props[\"aria-label\"]);\n const sheen = variant === \"effect\";\n const reveal = iconReveal && !svgOnly;\n const inert = Boolean(props.disabled || loading);\n const { waking, onWakeComplete } = useWakeOnEnable(inert, sheen);\n const cls = buttonClassName({\n variant,\n color,\n size,\n shape,\n loading,\n svgOnly,\n className: cn(reveal && ICON_REVEAL_PAD_RESTORE[size], className),\n });\n const inner = buttonInner({\n svgOnly,\n loading,\n prefix,\n suffix,\n children,\n iconReveal: reveal,\n size,\n });\n\n return (\n <motion.button\n ref={ref}\n type=\"button\"\n {...buttonRootMotionProps(size, inert, {\n sheen,\n iconReveal: reveal,\n waking,\n })}\n onAnimationComplete={onWakeComplete}\n {...props}\n aria-busy={loading || undefined}\n data-loading={loading ? \"true\" : undefined}\n data-svg-only={svgOnly ? \"true\" : undefined}\n data-waking={waking || undefined}\n className={cls}\n >\n {inner}\n </motion.button>\n );\n}\n\nButton.displayName = \"Button\";\n\n/**\n * ButtonLink — a link styled as a button, for navigation that changes the URL.\n * Shares every visual prop with {@link Button}; renders the host router's link\n * via `LinkProvider`.\n */\nexport function ButtonLink({\n variant = \"effect\",\n color,\n size = \"md\",\n shape,\n prefix,\n suffix,\n iconReveal = false,\n svgOnly,\n loading,\n disabled,\n href,\n children,\n className,\n ...props\n}: ButtonLinkProps) {\n warnMissingLabel(svgOnly, props[\"aria-label\"]);\n const Link = useLinkComponent();\n const sheen = variant === \"effect\";\n const reveal = iconReveal && !svgOnly;\n const cls = buttonClassName({\n variant,\n color,\n size,\n shape,\n loading,\n svgOnly,\n className: cn(reveal && ICON_REVEAL_PAD_RESTORE[size], className),\n });\n const inner = buttonInner({\n svgOnly,\n loading,\n prefix,\n suffix,\n children,\n iconReveal: reveal,\n size,\n });\n // Hooks must run unconditionally — only used when Motion is needed.\n const MotionLink = useMemo(\n // LinkProvider requires `href`; motion.create needs an open prop record —\n // bridge the two through `unknown` (props are supplied at the call site).\n () =>\n motion.create(Link as unknown as ComponentType<Record<string, unknown>>),\n [Link],\n );\n\n const inert = Boolean(disabled || loading);\n const { waking, onWakeComplete } = useWakeOnEnable(inert, sheen);\n const shared = {\n ...props,\n ...(inert ? {} : { href }),\n \"aria-disabled\": inert || undefined,\n \"aria-busy\": loading || undefined,\n \"data-loading\": loading ? (\"true\" as const) : undefined,\n \"data-svg-only\": svgOnly ? (\"true\" as const) : undefined,\n className: cls,\n tabIndex: inert ? -1 : props.tabIndex,\n onClick: inert\n ? (event: ReactMouseEvent<HTMLAnchorElement>) => {\n event.preventDefault();\n }\n : props.onClick,\n };\n\n if (inert) {\n return <span {...shared}>{inner}</span>;\n }\n\n return (\n <MotionLink\n {...buttonRootMotionProps(size, inert, {\n sheen,\n iconReveal: reveal,\n waking,\n })}\n onAnimationComplete={onWakeComplete}\n data-waking={waking || undefined}\n {...shared}\n >\n {inner}\n </MotionLink>\n );\n}\n\nButtonLink.displayName = \"ButtonLink\";\n\n/* ======================= EffectButton (compat alias) ======================= */\n\nexport const EFFECT_BUTTON_SIZES = BUTTON_SIZES;\nexport type EffectButtonSize = ButtonSize;\n\n/** Compose classes for an effect pill — `Button` with `variant=\"effect\"`. */\nexport function effectButtonVariants(opts?: {\n size?: EffectButtonSize;\n fullWidth?: boolean;\n className?: string;\n}): string {\n const { size = \"md\", fullWidth, className } = opts ?? {};\n return buttonVariants({\n variant: \"effect\",\n size,\n className: cn(fullWidth && \"w-full\", className),\n });\n}\n\n/**\n * Legacy EffectButton also reserved `style` (sheen variables lived there) and\n * never exposed the HTML `color` attribute — Button's semantic `color` prop\n * now occupies that name.\n */\ntype MotionConflicts = MotionHandlerConflicts | \"style\" | \"color\";\n\ninterface EffectButtonBaseProps {\n /** Size variant — Button's scale (32 / 36 / 44px). @default \"md\" */\n size?: EffectButtonSize;\n /** Stretch to the container's full width (stacked login / OAuth pills). */\n fullWidth?: boolean;\n /**\n * @deprecated Use `iconReveal` on `Button` instead. Mapped to `iconReveal`\n * when set.\n */\n animated?: boolean;\n /** @see ButtonBaseProps.iconReveal */\n iconReveal?: boolean;\n prefix?: Slottable;\n suffix?: Slottable;\n svgOnly?: boolean;\n loading?: boolean;\n children?: ReactNode;\n className?: string;\n}\n\nexport interface EffectButtonProps\n extends\n EffectButtonBaseProps,\n Omit<\n ButtonHTMLAttributes<HTMLButtonElement>,\n keyof EffectButtonBaseProps | MotionConflicts\n > {\n ref?: Ref<HTMLButtonElement>;\n}\n\nexport interface EffectButtonLinkProps\n extends\n EffectButtonBaseProps,\n Omit<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n keyof EffectButtonBaseProps | MotionConflicts\n > {\n href: string;\n disabled?: boolean;\n}\n\n/**\n * @deprecated Prefer `<Button variant=\"effect\">`. Thin alias that forwards to\n * Button with the sheen surface (no icon reveal).\n */\nexport function EffectButton({\n size = \"md\",\n fullWidth,\n animated,\n iconReveal,\n className,\n ...props\n}: EffectButtonProps) {\n return (\n <Button\n variant=\"effect\"\n size={size}\n iconReveal={iconReveal ?? animated ?? true}\n className={cn(fullWidth && \"w-full\", className)}\n {...props}\n />\n );\n}\n\nEffectButton.displayName = \"EffectButton\";\n\n/**\n * @deprecated Prefer `<ButtonLink variant=\"effect\">`.\n */\nexport function EffectButtonLink({\n size = \"md\",\n fullWidth,\n animated,\n iconReveal,\n className,\n ...props\n}: EffectButtonLinkProps) {\n return (\n <ButtonLink\n variant=\"effect\"\n size={size}\n iconReveal={iconReveal ?? animated ?? true}\n className={cn(fullWidth && \"w-full\", className)}\n {...props}\n />\n );\n}\n\nEffectButtonLink.displayName = \"EffectButtonLink\";\n"],"mappings":";;;;;;;;;;AA0CA,IAAMkB,KAAchB,EAIlB,sRAEA,6IACF,GAaaiB,IAAe;AAAA,EAC1B,IAAI;AAAA,IACF,SAASjB,EACP,+DACA,4FACF;AAAA,IACA,aAAa;AAAA,EACf;AAAA,EACA,IAAI;AAAA,IACF,SAASA,EACP,iEACA,kGACF;AAAA,IACA,aAAa;AAAA,EACf;AAAA,EACA,IAAI;AAAA,IACF,SAASA,EACP,6DACA,kGACF;AAAA,IACA,aAAa;AAAA,EACf;AACF,GAGakB,KAAgB;AAAA,EAC3B,SAAS;AAAA,IACP,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AAAA,EACA,QAAQ;AAAA,IACN,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AAAA,EACA,QAAQ;AAAA,IACN,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AACF,GAOMC,KAAmB,YAOnBC,KAAiD;AAAA,EACrD,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAGaC,KAAkB;AAAA,EAC7B,QAAQ;AAAA,IACN,SAAS;AAAA,IACT,aACE;AAAA,EACJ;AAAA,EACA,QAAQ;AAAA,IACN,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AAAA,EACA,UAAU;AAAA,IACR,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AAAA,EACA,OAAO;AAAA,IACL,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AACF,GAGaC,KAAgB;AAAA,EAC3B,SAAS;AAAA,IACP,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AA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I1B;AACT,QAAM,EAAE,MAAAG,IAAO,MAAM,WAAA4D,GAAW,WAAA1D,EAAA,IAAcL,KAAQ,CAAC;AACvD,SAAOD,EAAe;AAAA,IACpB,SAAS;AAAA,IACT,MAAAI;AAAA,IACA,WAAW5B,EAAGwF,KAAa,UAAU1D,CAAS;AAAA,EAChD,CAAC;AACH;AAsDA,SAAgB2D,GAAa,EAC3B,MAAA7D,IAAO,MACP,WAAA4D,GACA,UAAAE,GACA,YAAAzB,GACA,WAAAnC,GACA,GAAG6C,EAAA,GACiB;AACpB,SACE,gBAAA/D,EAAC6D,GAAD;AAAA,IACE,SAAQ;AAAA,IACF,MAAA7C;AAAA,IACN,YAAYqC,KAAcyB,KAAY;AAAA,IACtC,WAAW1F,EAAGwF,KAAa,UAAU1D,CAAS;AAAA,IAC9C,GAAI6C;AAAA,EACL,CAAA;AAEL;AAEAc,GAAa,cAAc;AAK3B,SAAgBE,GAAiB,EAC/B,MAAA/D,IAAO,MACP,WAAA4D,GACA,UAAAE,GACA,YAAAzB,GACA,WAAAnC,GACA,GAAG6C,EAAA,GACqB;AACxB,SACE,gBAAA/D,EAACmE,GAAD;AAAA,IACE,SAAQ;AAAA,IACF,MAAAnD;AAAA,IACN,YAAYqC,KAAcyB,KAAY;AAAA,IACtC,WAAW1F,EAAGwF,KAAa,UAAU1D,CAAS;AAAA,IAC9C,GAAI6C;AAAA,EACL,CAAA;AAEL;AAEAgB,GAAiB,cAAc"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as l } from "./cn-
|
|
3
|
-
import { t as J } from "./createReactComponent-
|
|
4
|
-
import { t as M } from "./IconChevronDown-
|
|
5
|
-
import { t as Z } from "./IconChevronLeft-
|
|
6
|
-
import { t as $ } from "./IconChevronRight-
|
|
7
|
-
import { t as q } from "./IconChevronUp-
|
|
2
|
+
import { t as l } from "./cn-CPbhpG1q.js";
|
|
3
|
+
import { t as J } from "./createReactComponent-yKZn9MIX.js";
|
|
4
|
+
import { t as M } from "./IconChevronDown-Cd68NnX2.js";
|
|
5
|
+
import { t as Z } from "./IconChevronLeft-CptqhdxO.js";
|
|
6
|
+
import { t as $ } from "./IconChevronRight-BNkXCTk6.js";
|
|
7
|
+
import { t as q } from "./IconChevronUp-Bxllwz8J.js";
|
|
8
8
|
import { createContext as I, useContext as v, useEffect as R, useMemo as k, useRef as E, useState as Y } from "react";
|
|
9
9
|
import { Fragment as K, jsx as r, jsxs as _ } from "react/jsx-runtime";
|
|
10
10
|
import { DayPicker as Q, useDayPicker as x } from "react-day-picker";
|
|
@@ -289,4 +289,4 @@ export {
|
|
|
289
289
|
me as t
|
|
290
290
|
};
|
|
291
291
|
|
|
292
|
-
//# sourceMappingURL=calendar-
|
|
292
|
+
//# sourceMappingURL=calendar-DDWITGo4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-DDWITGo4.js","names":["_Fragment","cn","createReactComponent","IconChevronDown","IconChevronLeft","IconChevronRight","IconChevronUp","createContext","useContext","useEffect","useMemo","useRef","useState","Fragment$1","jsx","jsxs","DayPicker","useDayPicker","__iconNode","IconPointFilled","DAY_SIZE","GRID_WIDTH","DROPDOWN_YEAR_REACH","NAV_BUTTON","CALENDAR_CLASS_NAMES","dayButtonClassName","modifiers","selectedEnd","CalendarDay","_day","className","props","inRange","CalendarDayButton","ref","CalendarChevron","orientation","startOfMonth","date","ViewContext","MonthContext","JUMP_BUTTON","JUMP_BUTTON_ON","useMonthYearWords","dayPickerProps","code","useNavYears","now","CalendarMonthCaption","calendarMonth","displayIndex","views","words","open","CAPTION_BUTTON","CAPTION_CHEVRON","MonthsView","index","goToMonth","first","last","year","today","span","reachable","month","lead","tail","_","when","outOfReach","YearsView","current","step","chosen","CalendarMonthWrapper","value","CalendarMonthGrid","showing","CalendarNav","onPreviousClick","onNextClick","previousMonth","nextMonth","navProps","classNames","components","labels","event","CALENDAR_COMPONENTS","JUMP_COMPONENTS","Calendar","showOutsideDays","captionLayout","startMonth","endMonth","todayLabel","jumps","view","setView","setIndex","next","at","bounded","thisYear","askedYear","navStart","navEnd","picker"],"sources":["../../../../node_modules/.pnpm/@tabler+icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconPointFilled.mjs","../../src/components/calendar/calendar.tsx"],"sourcesContent":["/**\n * @license @tabler/icons-react v3.49.0 - MIT\n *\n * This source code is licensed under the MIT license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createReactComponent from '../createReactComponent.mjs';\n\nconst __iconNode = [[\"path\", { \"d\": \"M12 7a5 5 0 1 1 -4.995 5.217l-.005 -.217l.005 -.217a5 5 0 0 1 4.995 -4.783z\", \"key\": \"svg-0\" }]];\nconst IconPointFilled = createReactComponent(\"filled\", \"point-filled\", \"PointFilled\", __iconNode);\n\nexport { __iconNode, IconPointFilled as default };\n","import {\n createContext,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n type TdHTMLAttributes,\n} from \"react\";\nimport {\n DayPicker,\n useDayPicker,\n type ChevronProps,\n type ClassNames,\n type CustomComponents,\n type DayButtonProps,\n type DayPickerProps,\n type DayProps,\n type Modifiers,\n type MonthCaptionProps,\n type MonthGridProps,\n type MonthProps,\n type NavProps,\n} from \"react-day-picker\";\nimport {\n IconChevronDown,\n IconChevronLeft,\n IconChevronRight,\n IconChevronUp,\n IconPointFilled,\n} from \"@tabler/icons-react\";\nimport { cn } from \"../../utils/cn\";\n\n/**\n * One square per day — the unit the whole grid is measured in. The header\n * cells share the width so the weekday initials sit over their column.\n */\nconst DAY_SIZE = \"size-9\";\n\n/**\n * Seven of those columns — the width the month grid comes to, and the width\n * the jump lists hold to, so the panel never changes shape under a tap.\n */\nconst GRID_WIDTH = \"w-63\";\n\n/**\n * How far the year dropdown reaches when the page has not bounded the\n * calendar: ten years back and ten on, which covers the dates a dashboard\n * asks for and still fits one glance. Set `startMonth` / `endMonth` for a\n * birthday, an archive, anything further out.\n */\nconst DROPDOWN_YEAR_REACH = 10;\n\n/** Ghost icon button — the month arrows, sized to the caption row. */\nconst NAV_BUTTON = cn(\n \"text-pho-secondary flex size-7 cursor-pointer items-center justify-center rounded-sm\",\n \"transition-[color,background-color] duration-150 ease-out\",\n \"hover:bg-pho-ghost-hover hover:text-pho-secondary-hover\",\n \"outline-pho-brand focus-visible:outline-2 focus-visible:outline-offset-1\",\n // Past the first or last navigable month the arrow stays put and dims.\n \"aria-disabled:pointer-events-none aria-disabled:opacity-30\",\n);\n\n/**\n * The structural classes. Every element DayPicker renders is named here — the\n * ones Pho dresses from the modifiers instead are named empty — so the\n * library's own stylesheet is never imported and no `rdp-*` class reaches the\n * DOM. A consumer's `classNames` merges over this map, element by element.\n */\nconst CALENDAR_CLASS_NAMES: Partial<ClassNames> = {\n root: \"text-pho-primary inline-block text-base\",\n // `relative` anchors the nav; months sit side by side once there is room.\n months: \"relative flex flex-col gap-6 sm:flex-row\",\n month: \"flex flex-col gap-2\",\n nav: \"absolute top-0 right-0 flex items-center gap-0.5\",\n button_previous: NAV_BUTTON,\n button_next: NAV_BUTTON,\n chevron: \"size-4\",\n // Matches the nav buttons' height so caption and arrows share a baseline.\n month_caption: \"flex h-7 items-center\",\n caption_label:\n \"text-pho-primary inline-flex items-center gap-0.5 font-medium\",\n dropdowns: \"flex items-center gap-1\",\n // The native select is a transparent overlay; the label under it is what shows.\n dropdown_root:\n \"relative -mx-1 inline-flex items-center rounded-sm px-1 hover:bg-pho-ghost-hover has-[select:focus-visible]:outline-pho-brand has-[select:focus-visible]:outline-2\",\n dropdown: \"absolute inset-0 cursor-pointer opacity-0\",\n months_dropdown: \"\",\n years_dropdown: \"\",\n // Separate borders so a range band's rounded ends actually round.\n month_grid: \"border-separate border-spacing-0\",\n weekdays: \"\",\n weekday: \"text-pho-description w-9 pb-1 text-xs font-normal\",\n weeks: \"\",\n week: \"\",\n week_number: \"text-pho-placeholder w-9 text-xs font-normal\",\n week_number_header: \"text-pho-description w-9 pb-1 text-xs font-normal\",\n footer: \"text-pho-description pt-3 text-base\",\n day: \"p-0 text-center align-middle\",\n // Day state is read off the modifiers in the two components below — as data\n // attributes on the cell and as classes on the button — so the library's own\n // state classes stay empty rather than doubling up.\n day_button: \"\",\n selected: \"\",\n range_start: \"\",\n range_middle: \"\",\n range_end: \"\",\n today: \"\",\n outside: \"\",\n focused: \"\",\n disabled: \"\",\n hidden: \"invisible\",\n};\n\n/** The day's own classes, resolved from the modifiers DayPicker hands down. */\nfunction dayButtonClassName(modifiers: Modifiers): string {\n const selectedEnd = Boolean(modifiers.selected && !modifiers.range_middle);\n\n return cn(\n \"relative flex cursor-pointer items-center justify-center rounded-sm tabular-nums select-none\",\n DAY_SIZE,\n \"text-pho-secondary\",\n \"transition-[color,background-color,box-shadow] duration-150 ease-out\",\n \"hover:bg-pho-ghost-hover hover:text-pho-primary\",\n \"outline-pho-brand focus-visible:outline-2 focus-visible:-outline-offset-1\",\n // A day from the neighbouring month is context, not a choice — it recedes\n // to the placeholder step but stays clickable.\n modifiers.outside && \"text-pho-placeholder\",\n // Today is marked with the field hairline, not a fill: the fill means\n // selected, and the two must never be confused.\n modifiers.today &&\n !modifiers.selected &&\n \"ring-pho-primary ring-1 ring-inset font-medium text-pho-primary\",\n // Inside a range the band behind carries the selection; the number just\n // reads as normal ink.\n modifiers.range_middle && \"text-pho-primary\",\n // The chosen day (and both ends of a range) takes the action fill.\n selectedEnd &&\n \"bg-pho-brand-solid text-pho-on-brand hover:bg-pho-brand-solid-hover hover:text-pho-on-brand font-medium ring-0\",\n \"disabled:pointer-events-none disabled:text-pho-disabled\",\n \"aria-disabled:pointer-events-none aria-disabled:text-pho-disabled\",\n );\n}\n\n/**\n * The grid cell. Carries the range band: a continuous wash behind the days\n * between both ends, rounded where the range starts and stops. The ends' own\n * buttons paint over their half of it, so the band reads as one shape.\n */\nfunction CalendarDay({\n // `day` is DayPicker's own object — kept out of the spread so it never\n // reaches the DOM as an attribute.\n day: _day,\n modifiers,\n className,\n ...props\n}: DayProps) {\n const inRange =\n modifiers.range_start || modifiers.range_middle || modifiers.range_end;\n\n return (\n <td\n {...(props as TdHTMLAttributes<HTMLTableCellElement>)}\n data-range-start={modifiers.range_start || undefined}\n data-range-middle={modifiers.range_middle || undefined}\n data-range-end={modifiers.range_end || undefined}\n className={cn(\n className,\n inRange && \"bg-pho-secondary\",\n modifiers.range_start && \"rounded-l-sm\",\n modifiers.range_end && \"rounded-r-sm\",\n )}\n />\n );\n}\n\n/**\n * The day button. Mirrors the library's own focus handover — roving tabindex\n * moves the `focused` modifier, and the newly focused day claims the caret —\n * then dresses itself from the modifiers.\n */\nfunction CalendarDayButton({\n day: _day,\n modifiers,\n className,\n ...props\n}: DayButtonProps) {\n const ref = useRef<HTMLButtonElement>(null);\n\n useEffect(() => {\n if (modifiers.focused) ref.current?.focus();\n }, [modifiers.focused]);\n\n return (\n <button\n ref={ref}\n {...props}\n className={cn(dayButtonClassName(modifiers), className)}\n />\n );\n}\n\n/** The system's stroke chevrons in place of the library's filled triangles. */\nfunction CalendarChevron({ orientation = \"left\", className }: ChevronProps) {\n const Icon =\n orientation === \"up\"\n ? IconChevronUp\n : orientation === \"down\"\n ? IconChevronDown\n : orientation === \"right\"\n ? IconChevronRight\n : IconChevronLeft;\n\n return <Icon className={className} aria-hidden />;\n}\n\n/* ------------------------------------------------- the caption's two views */\n\nconst startOfMonth = (date: Date) =>\n new Date(date.getFullYear(), date.getMonth(), 1);\n\n/** Which face the calendar is showing — the days, or a way to jump. */\ntype CalendarView = \"days\" | \"months\" | \"years\";\n\ninterface ViewState {\n view: CalendarView;\n /** Which displayed month opened it; only one view is up at a time. */\n index: number;\n show: (view: CalendarView, index: number) => void;\n /** The word on the button back to today, for the label and the tooltip. */\n todayLabel: string;\n}\n\n// Always provided, even where the caption only reads: the nav below needs the\n// today label whether or not the caption drills down.\nconst ViewContext = createContext<ViewState>({\n view: \"days\",\n index: 0,\n show: () => {},\n todayLabel: \"Today\",\n});\n\n/** The month a `Month` subtree belongs to — `MonthGrid` has no other way to know. */\nconst MonthContext = createContext<{ date: Date; index: number }>({\n date: new Date(0),\n index: 0,\n});\n\n/** A month or a year to jump to — the day button's manners at list size. */\nconst JUMP_BUTTON = cn(\n \"flex cursor-pointer items-center justify-center rounded-sm text-base tabular-nums select-none\",\n \"text-pho-secondary transition-[color,background-color] duration-150 ease-out\",\n \"hover:bg-pho-ghost-hover hover:text-pho-primary\",\n \"outline-pho-brand focus-visible:outline-2 focus-visible:-outline-offset-1\",\n \"disabled:pointer-events-none disabled:text-pho-disabled\",\n);\n\nconst JUMP_BUTTON_ON = cn(\n \"bg-pho-brand-solid text-pho-on-brand hover:bg-pho-brand-solid-hover\",\n \"hover:text-pho-on-brand font-medium\",\n);\n\n/** The words for a month and a year, in the calendar's own locale. */\nfunction useMonthYearWords() {\n const { dayPickerProps } = useDayPicker();\n const code = dayPickerProps.locale?.code;\n return useMemo(\n () => ({\n month: new Intl.DateTimeFormat(code, { month: \"short\" }),\n monthLong: new Intl.DateTimeFormat(code, { month: \"long\" }),\n }),\n [code],\n );\n}\n\n/** The first and last month the page allows, as plain years. */\nfunction useNavYears() {\n const { dayPickerProps } = useDayPicker();\n const now = dayPickerProps.today ?? new Date();\n const first =\n dayPickerProps.startMonth?.getFullYear() ??\n now.getFullYear() - DROPDOWN_YEAR_REACH;\n const last =\n dayPickerProps.endMonth?.getFullYear() ??\n now.getFullYear() + DROPDOWN_YEAR_REACH;\n return { first, last };\n}\n\n/**\n * The caption. Its month and its year are each a button into their own view,\n * so a date two years out is two taps: the year, then the month.\n */\nfunction CalendarMonthCaption({\n calendarMonth,\n displayIndex,\n className,\n ...props\n}: MonthCaptionProps) {\n const views = useContext(ViewContext);\n const words = useMonthYearWords();\n const open = views.index === displayIndex ? views.view : \"days\";\n\n return (\n // The buttons carry their own padding, so the row pulls back to keep the\n // month's first letter over the grid's left edge.\n <div className={cn(className, \"-ml-1.5 gap-0.5\")} {...props}>\n <button\n type=\"button\"\n aria-expanded={open === \"months\"}\n onClick={() =>\n views.show(open === \"months\" ? \"days\" : \"months\", displayIndex)\n }\n className={CAPTION_BUTTON}\n >\n {words.monthLong.format(calendarMonth.date)}\n <IconChevronDown\n aria-hidden\n className={cn(CAPTION_CHEVRON, open === \"months\" && \"rotate-180\")}\n />\n </button>\n <button\n type=\"button\"\n aria-expanded={open === \"years\"}\n onClick={() =>\n views.show(open === \"years\" ? \"days\" : \"years\", displayIndex)\n }\n className={CAPTION_BUTTON}\n >\n {calendarMonth.date.getFullYear()}\n <IconChevronDown\n aria-hidden\n className={cn(CAPTION_CHEVRON, open === \"years\" && \"rotate-180\")}\n />\n </button>\n </div>\n );\n}\n\n/** The twelve months of the year on screen. Picking one lands on the days. */\nfunction MonthsView() {\n const views = useContext(ViewContext);\n const { date, index } = useContext(MonthContext);\n const { goToMonth, dayPickerProps } = useDayPicker();\n const words = useMonthYearWords();\n const { first, last } = useNavYears();\n const year = date.getFullYear();\n const today = dayPickerProps.today ?? new Date();\n const span = dayPickerProps.numberOfMonths ?? 1;\n\n /**\n * The first month `goToMonth` would be given for a choice, and whether the\n * whole strip still fits between the navigable ends. Without the second\n * check DayPicker clamps the value and the pick lands under a different\n * caption than the one that was clicked.\n */\n const reachable = (month: number) => {\n const lead = new Date(year, month - index, 1);\n const tail = new Date(year, month - index + span - 1, 1);\n if (year < first || year > last) return false;\n if (\n dayPickerProps.startMonth &&\n lead < startOfMonth(dayPickerProps.startMonth)\n ) {\n return false;\n }\n if (\n dayPickerProps.endMonth &&\n tail > startOfMonth(dayPickerProps.endMonth)\n ) {\n return false;\n }\n return true;\n };\n\n return (\n <div\n // A labelled set of buttons, not a form section — `fieldset` would say\n // the wrong thing about what this is.\n // oxlint-disable-next-line jsx-a11y/prefer-tag-over-role\n role=\"group\"\n aria-label={String(year)}\n className={cn(\n GRID_WIDTH,\n \"grid h-[202px] grid-cols-3 content-start gap-1\",\n )}\n >\n {Array.from({ length: 12 }, (_, month) => {\n const when = new Date(year, month, 1);\n const outOfReach = !reachable(month);\n return (\n <button\n key={month}\n type=\"button\"\n disabled={outOfReach}\n onClick={() => {\n // `goToMonth` names the FIRST month on screen, so a caption\n // further along the strip steps back by its own offset and the\n // pick lands under the caption that was clicked.\n goToMonth(new Date(year, month - index, 1));\n views.show(\"days\", views.index);\n }}\n className={cn(\n JUMP_BUTTON,\n \"h-11\",\n month === date.getMonth() && JUMP_BUTTON_ON,\n month !== date.getMonth() &&\n year === today.getFullYear() &&\n month === today.getMonth() &&\n \"ring-pho-primary text-pho-primary font-medium ring-1 ring-inset\",\n )}\n >\n {words.month.format(when)}\n </button>\n );\n })}\n </div>\n );\n}\n\n/** Every year the page allows. Picking one asks for the month next. */\nfunction YearsView() {\n const views = useContext(ViewContext);\n const { date, index } = useContext(MonthContext);\n const { goToMonth, dayPickerProps } = useDayPicker();\n const { first, last } = useNavYears();\n const current = useRef<HTMLButtonElement>(null);\n const today = dayPickerProps.today ?? new Date();\n\n // Open on the year in play, however far down the list it sits.\n useEffect(() => {\n current.current?.scrollIntoView({ block: \"center\" });\n }, []);\n\n return (\n <div\n // oxlint-disable-next-line jsx-a11y/prefer-tag-over-role\n role=\"group\"\n aria-label=\"Year\"\n className={cn(\n GRID_WIDTH,\n \"grid h-[202px] grid-cols-4 content-start gap-1 overflow-y-auto\",\n )}\n >\n {Array.from({ length: last - first + 1 }, (_, step) => {\n const year = first + step;\n const chosen = year === date.getFullYear();\n return (\n <button\n key={year}\n type=\"button\"\n ref={chosen ? current : undefined}\n onClick={() => {\n goToMonth(new Date(year, date.getMonth() - index, 1));\n // The year alone does not name a day: ask for the month next.\n views.show(\"months\", views.index);\n }}\n className={cn(\n JUMP_BUTTON,\n \"h-9\",\n chosen && JUMP_BUTTON_ON,\n !chosen &&\n year === today.getFullYear() &&\n \"ring-pho-primary text-pho-primary font-medium ring-1 ring-inset\",\n )}\n >\n {year}\n </button>\n );\n })}\n </div>\n );\n}\n\n/** Puts the month a subtree belongs to in reach of the grid below it. */\nfunction CalendarMonthWrapper({\n calendarMonth,\n displayIndex,\n ...props\n}: MonthProps) {\n const value = useMemo(\n () => ({ date: calendarMonth.date, index: displayIndex }),\n [calendarMonth.date, displayIndex],\n );\n return (\n <MonthContext.Provider value={value}>\n <div {...props} />\n </MonthContext.Provider>\n );\n}\n\n/** The days, or whichever jump list the caption asked for in their place. */\nfunction CalendarMonthGrid(props: MonthGridProps) {\n const views = useContext(ViewContext);\n const { index } = useContext(MonthContext);\n const showing = views.index === index ? views.view : \"days\";\n\n if (showing === \"months\") return <MonthsView />;\n if (showing === \"years\") return <YearsView />;\n return <table {...props} />;\n}\n\n/** The month arrows step the days; a jump list is its own navigation. */\n/**\n * Back a month, back to today, on a month. The middle button moves the view\n * to today's month and leaves the selection alone — it is a way back, not a\n * way to choose. It stays lit while sitting on today's month, where the click\n * is a harmless no-op, because a control that reads as broken on first sight\n * is worse than one that sometimes does nothing; it dims only where it truly\n * cannot go, out past `startMonth` / `endMonth`, as the arrows do.\n */\nfunction CalendarNav({\n onPreviousClick,\n onNextClick,\n previousMonth,\n nextMonth,\n ...navProps\n}: NavProps) {\n const views = useContext(ViewContext);\n const { classNames, components, goToMonth, labels, dayPickerProps } =\n useDayPicker();\n\n // A jump list is its own navigation, so the arrows step aside. The nav is\n // absolutely positioned, so nothing below it moves.\n if (views.view !== \"days\") return <></>;\n\n const today = startOfMonth(dayPickerProps.today ?? new Date());\n const outOfReach =\n (dayPickerProps.startMonth != null &&\n today < startOfMonth(dayPickerProps.startMonth)) ||\n (dayPickerProps.endMonth != null &&\n today > startOfMonth(dayPickerProps.endMonth));\n\n return (\n <nav {...navProps}>\n <components.PreviousMonthButton\n type=\"button\"\n className={classNames.button_previous}\n tabIndex={previousMonth ? undefined : -1}\n aria-disabled={previousMonth ? undefined : true}\n aria-label={labels.labelPrevious(previousMonth)}\n onClick={(event) => {\n if (previousMonth) onPreviousClick?.(event);\n }}\n >\n <components.Chevron\n disabled={previousMonth ? undefined : true}\n className={classNames.chevron}\n orientation=\"left\"\n />\n </components.PreviousMonthButton>\n\n <button\n type=\"button\"\n className={NAV_BUTTON}\n tabIndex={outOfReach ? -1 : undefined}\n aria-disabled={outOfReach ? true : undefined}\n aria-label={views.todayLabel}\n title={views.todayLabel}\n onClick={() => {\n if (!outOfReach) goToMonth(today);\n }}\n >\n <IconPointFilled className={classNames.chevron} aria-hidden />\n </button>\n\n <components.NextMonthButton\n type=\"button\"\n className={classNames.button_next}\n tabIndex={nextMonth ? undefined : -1}\n aria-disabled={nextMonth ? undefined : true}\n aria-label={labels.labelNext(nextMonth)}\n onClick={(event) => {\n if (nextMonth) onNextClick?.(event);\n }}\n >\n <components.Chevron\n disabled={nextMonth ? undefined : true}\n className={classNames.chevron}\n orientation=\"right\"\n />\n </components.NextMonthButton>\n </nav>\n );\n}\n\nconst CAPTION_BUTTON = cn(\n \"text-pho-primary flex cursor-pointer items-center gap-0.5 rounded-sm px-1.5 py-0.5 font-medium\",\n \"transition-[color,background-color] duration-150 ease-out hover:bg-pho-ghost-hover\",\n \"outline-pho-brand focus-visible:outline-2 focus-visible:outline-offset-1\",\n);\n\nconst CAPTION_CHEVRON =\n \"text-pho-secondary size-3.5 transition-transform duration-150 ease-out\";\n\nconst CALENDAR_COMPONENTS: Partial<CustomComponents> = {\n Day: CalendarDay,\n DayButton: CalendarDayButton,\n Chevron: CalendarChevron,\n Nav: CalendarNav,\n};\n\n/** The extra parts the drill-down caption needs on top of the base set. */\nconst JUMP_COMPONENTS: Partial<CustomComponents> = {\n Month: CalendarMonthWrapper,\n MonthCaption: CalendarMonthCaption,\n MonthGrid: CalendarMonthGrid,\n};\n\nexport type CalendarProps = DayPickerProps & {\n /**\n * The word on the button back to today, used as its label and its tooltip.\n * @default \"Today\"\n */\n todayLabel?: string;\n};\n\n/**\n * Calendar built on React DayPicker — a month of days to read or to choose\n * from. Pass `mode` to make it selectable (`single`, `multiple`, `range`);\n * without one it is a static month. Every DayPicker prop passes through, so\n * `numberOfMonths`, `disabled`, `startMonth` / `endMonth`, `captionLayout`,\n * and the locale props all work as documented upstream.\n *\n * Pho supplies the whole class map, so the library's stylesheet is neither\n * imported nor needed. `classNames` and `components` merge over Pho's,\n * element by element.\n *\n * The caption is clickable: month and year each open a jump list, so a date\n * two years out is two taps rather than twenty-four. Pass\n * `captionLayout=\"label\"` for a caption that only reads, and `startMonth` /\n * `endMonth` to say how far the year list should reach. Between the month\n * arrows sits a way back to today's month.\n *\n * Selection follows DayPicker's own contract: hand it `onSelect` and the\n * calendar is controlled, so `selected` has to come with it. Leave both off\n * and it keeps the selection itself.\n *\n * For a calendar behind a field — a trigger that shows the chosen date and\n * opens this in a popover — use `DatePicker`.\n */\nexport function Calendar({\n className,\n classNames,\n components,\n showOutsideDays = true,\n captionLayout,\n startMonth,\n endMonth,\n todayLabel = \"Today\",\n ...props\n}: CalendarProps) {\n // No layout named means Pho's own: a caption that drills down. Name one and\n // DayPicker's handling of it stands, untouched.\n const jumps = captionLayout === undefined;\n const [view, setView] = useState<CalendarView>(\"days\");\n const [index, setIndex] = useState(0);\n const views = useMemo<ViewState>(\n () => ({\n view,\n index,\n show: (next, at) => {\n setView(next);\n setIndex(at);\n },\n todayLabel,\n }),\n [view, index, todayLabel],\n );\n\n // A jump list needs a first and last year to offer, even when none was set.\n // The window has to hold the month the page asked for as well as today:\n // DayPicker clamps a `month` / `defaultMonth` outside it, so a calendar\n // opened on 1979 would silently render this decade instead.\n const bounded = jumps || captionLayout !== \"label\";\n const thisYear = (props.today ?? new Date()).getFullYear();\n const askedYear = (\n props.month ??\n props.defaultMonth ??\n props.today ??\n new Date()\n ).getFullYear();\n const navStart =\n startMonth ??\n (bounded\n ? new Date(Math.min(thisYear, askedYear) - DROPDOWN_YEAR_REACH, 0, 1)\n : undefined);\n const navEnd =\n endMonth ??\n (bounded\n ? new Date(Math.max(thisYear, askedYear) + DROPDOWN_YEAR_REACH, 11, 1)\n : undefined);\n\n const picker = (\n <DayPicker\n showOutsideDays={showOutsideDays}\n // Pho's caption replaces the label wholesale, so DayPicker is told to\n // build the plain one and hand it over.\n captionLayout={jumps ? \"label\" : captionLayout}\n startMonth={navStart}\n endMonth={navEnd}\n classNames={{\n ...CALENDAR_CLASS_NAMES,\n ...classNames,\n // DayPicker concatenates `className` onto the root's classes; folding\n // it in here runs it through `cn` instead, so a caller's `text-md`\n // actually replaces the root's `text-base` rather than fighting it.\n root: cn(CALENDAR_CLASS_NAMES.root, classNames?.root, className),\n }}\n components={{\n ...CALENDAR_COMPONENTS,\n ...(jumps ? JUMP_COMPONENTS : null),\n ...components,\n }}\n {...props}\n />\n );\n\n // Provided either way: the nav's way back to today needs its word even\n // where the caption itself only reads.\n return <ViewContext.Provider value={views}>{picker}</ViewContext.Provider>;\n}\n\nCalendar.displayName = \"Calendar\";\n"],"ignoreList":[0],"mappings":";;;;;;;;;;AASA,IAAMkB,IAAa,CAAC,CAAC,QAAQ;AAAA,EAAE,GAAK;AAAA,EAA+E,KAAO;AAAQ,CAAC,CAAC,GAC9HC,KAAkBjB,EAAqB,UAAU,gBAAgB,eAAegB,CAAU,GC2B1FE,KAAW,UAMXC,IAAa,QAQbC,IAAsB,IAGtBC,IAAatB,EACjB,wFACA,6DACA,2DACA,4EAEA,4DACF,GAQMuB,IAA4C;AAAA,EAChD,MAAM;AAAA,EAEN,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,KAAK;AAAA,EACL,iBAAiBD;AAAA,EACjB,aAAaA;AAAA,EACb,SAAS;AAAA,EAET,eAAe;AAAA,EACf,eACE;AAAA,EACF,WAAW;AAAA,EAEX,eACE;AAAA,EACF,UAAU;AAAA,EACV,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAEhB,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,SAAS;AAAA,EACT,OAAO;AAAA,EACP,MAAM;AAAA,EACN,aAAa;AAAA,EACb,oBAAoB;AAAA,EACpB,QAAQ;AAAA,EACR,KAAK;AAAA,EAIL,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,aAAa;AAAA,EACb,cAAc;AAA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9B,GAAGJ;AAAA,IACL;AAAA,IACA,GAAIvD;AAAA,EACL,CAAA;AAKH,SAAO,gBAAAjB,EAACyB,EAAY,UAAb;AAAA,IAAsB,OAAOY;AAAA,IAAQ,UAAAyD;AAAA,EAA6B,CAAA;AAC3E;AAEAjB,GAAS,cAAc"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as r } from "./cn-
|
|
2
|
+
import { t as r } from "./cn-CPbhpG1q.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx as e } from "react/jsx-runtime";
|
|
5
5
|
var i = "border-pho-secondary bg-pho-primary overflow-hidden rounded-lg border";
|
|
@@ -61,4 +61,4 @@ export {
|
|
|
61
61
|
i as t
|
|
62
62
|
};
|
|
63
63
|
|
|
64
|
-
//# sourceMappingURL=card-
|
|
64
|
+
//# sourceMappingURL=card-zyRAihYE.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card-
|
|
1
|
+
{"version":3,"file":"card-zyRAihYE.js","names":["cn","jsx","CARD_SURFACE","Root","className","props","Header","Title","children","Value","Description","Content","Footer","Card"],"sources":["../../src/components/card/card.tsx"],"sourcesContent":["import { type ComponentProps, type Ref } from \"react\";\nimport { cn } from \"../../utils/cn\";\n\n/**\n * Design notes:\n * - A card is a flat bordered panel on the page surface — hairline border,\n * primary background, no shadow. Elevation shadows stay on floating layers\n * (menus, dialogs); see the same rule on Input and Select.\n * - Radius sits at the `lg` stop (16px) like Dialog — a standalone content\n * panel reads bigger than a control, so it takes the panel radius rather\n * than the control default (`base`). `overflow-hidden` clips with it:\n * a flush `Stat.Group` (opaque tiles, `pt-0`) would otherwise paint\n * square over the curve. The same clip is what makes an edge-to-edge\n * image or table follow the panel, the way `BasicPage.Card` already does.\n * - Vertical rhythm: `pt-5` / `pb-4`, `gap-4` between parts. Parts carry\n * `px-5`, so a child without padding (an image, a table, a `Separator`)\n * runs edge-to-edge on its own. A `Stat` / `Stat.Group` already pads\n * its tiles — when it is the first or last child the matching inset\n * drops so the row sits flush on the card edge. A chart as the first\n * child drops the top inset the same way; the plot keeps its own\n * bottom band.\n * - No size or color axes. A card is chrome, not a signal — content sets the\n * tone. Sizing belongs to the layout that places the card.\n */\n\n/** Surface chrome — exported for hosts that need the look on another element. */\nexport const CARD_SURFACE =\n \"border-pho-secondary bg-pho-primary overflow-hidden rounded-lg border\";\n\n/** The panel: bordered surface, vertical rhythm between parts. */\nfunction Root({\n className,\n ...props\n}: ComponentProps<\"div\"> & { ref?: Ref<HTMLDivElement> }) {\n return (\n <div\n className={cn(\n CARD_SURFACE,\n \"flex flex-col gap-4 pt-5 pb-4\",\n // Stat tiles pad themselves; a chart's plot already insets.\n \"has-[>[data-stat-group]:first-child]:pt-0 has-[>[data-stat]:first-child]:pt-0\",\n \"has-[>[data-stat-group]:last-child]:pb-0 has-[>[data-stat]:last-child]:pb-0\",\n \"has-[>:first-child:has([data-chart])]:pt-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Title row + optional description. The title and a trailing `Value`\n * share the first line; the description sits on the next with no row\n * gap — title and subtitle read as one block.\n */\nfunction Header({\n className,\n ...props\n}: ComponentProps<\"div\"> & { ref?: Ref<HTMLDivElement> }) {\n return (\n <div\n className={cn(\n \"grid grid-cols-[minmax(0,1fr)_minmax(0,auto)] items-baseline gap-x-4 gap-y-0 px-5\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Card heading — an `<h3>` so it nests under page (`h1`) and section (`h2`)\n * headings without skipping levels.\n */\nfunction Title({\n className,\n children,\n ...props\n}: ComponentProps<\"h3\"> & { ref?: Ref<HTMLHeadingElement> }) {\n return (\n <h3\n className={cn(\n \"text-display-xs text-pho-primary min-w-0 font-medium\",\n className,\n )}\n {...props}\n >\n {children}\n </h3>\n );\n}\n\n/**\n * A count or figure at the end of the title row. One display step above\n * the title, primary ink — the number is the loud thing on the line.\n */\nfunction Value({\n className,\n ...props\n}: ComponentProps<\"div\"> & { ref?: Ref<HTMLDivElement> }) {\n return (\n <div\n data-card-value=\"\"\n className={cn(\n \"text-display-sm text-pho-primary min-w-0 justify-self-end truncate font-medium tabular-nums\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Supporting copy under the title — Dialog's description: same step, description ink. */\nfunction Description({\n className,\n ...props\n}: ComponentProps<\"p\"> & { ref?: Ref<HTMLParagraphElement> }) {\n return (\n <p\n className={cn(\n \"text-pho-description text-display-xs col-span-2 font-normal\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** The card body. Carries the horizontal padding; bring your own layout. */\nfunction Content({\n className,\n ...props\n}: ComponentProps<\"div\"> & { ref?: Ref<HTMLDivElement> }) {\n return <div className={cn(\"px-5\", className)} {...props} />;\n}\n\n/**\n * Trailing row — actions, a status line. Unopinionated about justification;\n * add `justify-end` for a dialog-style action bar.\n */\nfunction Footer({\n className,\n ...props\n}: ComponentProps<\"div\"> & { ref?: Ref<HTMLDivElement> }) {\n return (\n <div className={cn(\"flex items-center gap-2 px-5\", className)} {...props} />\n );\n}\n\n/**\n * Card — a bordered content panel: header (title + description), body,\n * optional footer. It's static chrome with no interactivity of its own.\n * For a label/control list use `BasicPage.Card`; for a featured\n * block on the page surface use `BasicPage.Callout`.\n *\n * ```tsx\n * <Card.Root>\n * <Card.Header>\n * <Card.Title>Usage</Card.Title>\n * <Card.Value>1.2k</Card.Value>\n * <Card.Description>Since Aug 1.</Card.Description>\n * </Card.Header>\n * <Card.Content>…</Card.Content>\n * <Card.Footer className=\"justify-end\">\n * <Button size=\"sm\">Upgrade</Button>\n * </Card.Footer>\n * </Card.Root>\n * ```\n */\nexport const Card = {\n Root,\n Header,\n Title,\n Value,\n Description,\n Content,\n Footer,\n};\n"],"mappings":";;;;AA0BA,IAAaE,IACX;AAGF,SAASC,EAAK,EACZ,WAAAC,GACA,GAAGC,EAAA,GACqD;AACxD,SACE,gBAAAJ,EAAC,OAAD;AAAA,IACE,WAAWD,EACTE,GACA,iCAEA,iFACA,+EACA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AC;AAAA,EACA,QAAAC;AACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as se } from "./cn-
|
|
2
|
+
import { t as se } from "./cn-CPbhpG1q.js";
|
|
3
3
|
import { FADE_ENTRANCE as Ut, SPAN_SCALE as $e, SPRING_ENTRANCE as ge } from "../motion.js";
|
|
4
|
-
import { t as pe } from "./skeleton-
|
|
4
|
+
import { t as pe } from "./skeleton-CqZlGphn.js";
|
|
5
5
|
import { Children as At, Fragment as It, isValidElement as Lt, useCallback as Kt, useContext as H, useEffect as Yt, useId as Ne, useLayoutEffect as $t, useMemo as L, useRef as Qe, useState as Et } from "react";
|
|
6
6
|
import { Fragment as Ht, jsx as u, jsxs as k } from "react/jsx-runtime";
|
|
7
7
|
import { useAnimate as Wt, useReducedMotion as Rt } from "motion/react";
|
|
@@ -1439,4 +1439,4 @@ export {
|
|
|
1439
1439
|
Ie as t
|
|
1440
1440
|
};
|
|
1441
1441
|
|
|
1442
|
-
//# sourceMappingURL=chart-
|
|
1442
|
+
//# sourceMappingURL=chart-Btnw7KXV.js.map
|