@photon-ai/pho-ui 4.18.4 → 4.18.5
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-CCfeyQBG.js} +5 -5
- package/dist/chunks/dialog-CCfeyQBG.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 +11 -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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-area-Dhl5hqay.js","names":["BaseScrollArea","_Fragment","ScrollArea","cn","createContext","useContext","useLayoutEffect","useRef","Fragment$1","jsx","jsxs","motion","ScrollArea","EDGE_CLASS","BLUR_LAYER_COUNT","BLUR_MAX_PX","buildBlurLayers","count","maxPx","segment","_","i","layer","BLUR_LAYERS","edgeMask","edge","window","toEdge","a","b","c","d","DEFAULT_SURFACE","washGradient","surface","paintEdge","node","progress","child","el","blur","Edge","edgeRef","className","blurPx","index","mask","ScrollAreaContext","useScrollAreaContext","ctx","clamp01","n","assignRef","ref","Content","inset","insetTop","insetBottom","style","props","Corner","Root","children","fade","topEl","bottomEl","Viewport","viewportRef","viewport","paint","reveal","maxScroll","top","bottom","frame","onScroll","observer","Scrollbar","Thumb","ScrollArea$1"],"sources":["../../src/components/scroll-area/scroll-area-edges.tsx","../../src/components/scroll-area/scroll-area.tsx"],"sourcesContent":["import { type Ref } from \"react\";\nimport { BLUR_PX } from \"../../motion\";\nimport { cn } from \"../../utils/cn\";\n\n/** Overlay strip height — a short ramp, not a banner. `h-8` = 32px. */\nexport const EDGE_CLASS = \"pointer-events-none absolute inset-x-0 z-10 h-8\";\nexport const EDGE_REVEAL_PX = 32;\n\nconst BLUR_LAYER_COUNT = 8;\n\n/**\n * The system's one blur strength. The edge fade peaks here, and a motion\n * that softens (a scope swap, a bar title) borrows the same value, so\n * every soft focus in the product is the same soft focus.\n */\nexport const BLUR_MAX_PX = BLUR_PX;\n\nfunction buildBlurLayers(count: number, maxPx: number) {\n const segment = 100 / (count + 1);\n return Array.from({ length: count }, (_, i) => ({\n blurPx: (i / (count - 1)) * maxPx,\n window: [\n i * segment,\n (i + 1) * segment,\n (i + 2) * segment,\n (i + 3) * segment,\n ] as const,\n })).filter((layer) => layer.blurPx > 0);\n}\n\nconst BLUR_LAYERS = buildBlurLayers(BLUR_LAYER_COUNT, BLUR_MAX_PX);\n\nfunction edgeMask(edge: \"top\" | \"bottom\", window: readonly number[]) {\n const toEdge = edge === \"top\" ? \"to top\" : \"to bottom\";\n const [a, b, c, d] = window;\n return `linear-gradient(${toEdge}, transparent ${a}%, black ${b}%, black ${c}%, transparent ${d}%)`;\n}\n\n// The wash fades into the block it sits on: every `bg-pho-*` surface\n// registers itself as `--pho-surface` (see the stylesheet), so the nearest\n// surface ancestor's background carries down here — live across themes.\n// The primary surface is the fallback for hosts outside any pho surface.\nconst DEFAULT_SURFACE =\n \"var(--pho-surface, var(--background-color-pho-primary))\";\n\nfunction washGradient(edge: \"top\" | \"bottom\", surface: string) {\n const to = edge === \"top\" ? \"to top\" : \"to bottom\";\n return `linear-gradient(${to}, color-mix(in oklab, ${surface} 20%, transparent) 0%, ${surface} 100%)`;\n}\n\nexport function paintEdge(node: HTMLDivElement | null, progress: number) {\n if (!node) return;\n for (const child of node.children) {\n const el = child as HTMLElement;\n if (el.dataset.scrollFade === \"wash\") {\n el.style.opacity = String(progress);\n continue;\n }\n const blur = `blur(${Number(el.dataset.blurPx) * progress}px)`;\n el.style.backdropFilter = blur;\n el.style.setProperty(\"-webkit-backdrop-filter\", blur);\n }\n}\n\nexport function Edge({\n edge,\n edgeRef,\n surface = DEFAULT_SURFACE,\n className,\n}: {\n edge: \"top\" | \"bottom\";\n edgeRef: Ref<HTMLDivElement>;\n /** The surface the wash fades into — the card by default, or a page. */\n surface?: string;\n /** Position override — the strip sits at the named edge unless placed. */\n className?: string;\n}) {\n return (\n <div\n ref={edgeRef}\n aria-hidden\n data-edge={edge}\n className={cn(\n EDGE_CLASS,\n className ?? (edge === \"top\" ? \"top-0\" : \"bottom-0\"),\n )}\n >\n {BLUR_LAYERS.map(({ blurPx, window }, index) => {\n const mask = edgeMask(edge, window);\n return (\n <div\n key={index}\n data-blur-px={blurPx}\n className=\"absolute inset-0\"\n style={{\n maskImage: mask,\n WebkitMaskImage: mask,\n }}\n />\n );\n })}\n <div\n data-scroll-fade=\"wash\"\n className=\"absolute inset-0 opacity-0\"\n style={{ background: washGradient(edge, surface) }}\n />\n </div>\n );\n}\n","import {\n createContext,\n useContext,\n useLayoutEffect,\n useRef,\n type ComponentProps,\n type ElementType,\n type Ref,\n type RefObject,\n} from \"react\";\nimport { ScrollArea as BaseScrollArea } from \"@base-ui/react/scroll-area\";\nimport { motion } from \"motion/react\";\nimport { cn } from \"../../utils/cn\";\nimport { Edge, EDGE_REVEAL_PX, paintEdge } from \"./scroll-area-edges\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nconst ScrollAreaContext = createContext<{\n topEl: RefObject<HTMLDivElement | null>;\n bottomEl: RefObject<HTMLDivElement | null>;\n fade: boolean;\n} | null>(null);\n\nfunction useScrollAreaContext() {\n const ctx = useContext(ScrollAreaContext);\n if (ctx == null) {\n throw new Error(\"ScrollArea parts must be used inside ScrollArea.Root\");\n }\n return ctx;\n}\n\nfunction clamp01(n: number) {\n if (n <= 0) return 0;\n if (n >= 1) return 1;\n return n;\n}\n\nfunction assignRef<T>(ref: Ref<T> | undefined, node: T | null) {\n if (typeof ref === \"function\") {\n ref(node);\n } else if (ref) {\n // React 18 types `RefObject.current` as readonly; the write is legal.\n (ref as { current: T | null }).current = node;\n }\n}\n\n/**\n * The scrolled content. `inset` is a resting inset in the scroll axis —\n * like a scroll view's safe-area padding: the content stands clear of the\n * edges at rest but scrolls past them to the true edge, and the scrollbar\n * and edge fade stay on `Root`'s edges. `insetTop` / `insetBottom` set the\n * ends separately (they win over `inset`).\n */\nfunction Content({\n inset,\n insetTop,\n insetBottom,\n style,\n ref,\n ...props\n}: ComponentProps<typeof BaseScrollArea.Content> & {\n inset?: number | string;\n insetTop?: number | string;\n insetBottom?: number | string;\n ref?: Ref<HTMLDivElement>;\n}) {\n return (\n <BaseScrollArea.Content\n ref={ref}\n style={{\n paddingTop: insetTop ?? inset,\n paddingBottom: insetBottom ?? inset,\n ...style,\n }}\n {...props}\n />\n );\n}\n\nconst Corner = BaseScrollArea.Corner;\n\nfunction Root({\n className,\n children,\n fade = true,\n ...props\n}: StyledProps<typeof BaseScrollArea.Root> & {\n /**\n * Progressive edge fade (blur + wash). Leave on except for code\n * surfaces — CodeBlock is the only caller that turns it off, so\n * glyphs hard-clip at the border.\n * @default true\n */\n fade?: boolean;\n}) {\n const topEl = useRef<HTMLDivElement | null>(null);\n const bottomEl = useRef<HTMLDivElement | null>(null);\n\n return (\n <BaseScrollArea.Root\n className={cn(\"relative overflow-hidden\", className)}\n {...props}\n >\n <ScrollAreaContext.Provider value={{ topEl, bottomEl, fade }}>\n {children}\n {fade ? (\n <>\n <Edge edge=\"top\" edgeRef={topEl} />\n <Edge edge=\"bottom\" edgeRef={bottomEl} />\n </>\n ) : null}\n </ScrollAreaContext.Provider>\n </BaseScrollArea.Root>\n );\n}\n\nfunction Viewport({\n className,\n ref,\n ...props\n}: StyledProps<typeof BaseScrollArea.Viewport>) {\n const { topEl, bottomEl, fade } = useScrollAreaContext();\n const viewportRef = useRef<HTMLElement | null>(null);\n\n useLayoutEffect(() => {\n const viewport = viewportRef.current;\n if (!viewport || !fade) return;\n\n const paint = () => {\n const reveal =\n topEl.current?.offsetHeight ||\n bottomEl.current?.offsetHeight ||\n EDGE_REVEAL_PX;\n const maxScroll = viewport.scrollHeight - viewport.clientHeight;\n const top = maxScroll <= 0 ? 0 : clamp01(viewport.scrollTop / reveal);\n const bottom =\n maxScroll <= 0 ? 0 : clamp01((maxScroll - viewport.scrollTop) / reveal);\n paintEdge(topEl.current, top);\n paintEdge(bottomEl.current, bottom);\n };\n\n let frame = 0;\n const onScroll = () => {\n if (frame) return;\n frame = requestAnimationFrame(() => {\n frame = 0;\n paint();\n });\n };\n\n paint();\n viewport.addEventListener(\"scroll\", onScroll, { passive: true });\n let observer: ResizeObserver | null = null;\n if (typeof ResizeObserver !== \"undefined\") {\n observer = new ResizeObserver(paint);\n observer.observe(viewport);\n if (viewport.firstElementChild) {\n observer.observe(viewport.firstElementChild);\n }\n }\n return () => {\n viewport.removeEventListener(\"scroll\", onScroll);\n if (frame) cancelAnimationFrame(frame);\n observer?.disconnect();\n };\n }, [topEl, bottomEl, fade]);\n\n return (\n <BaseScrollArea.Viewport\n // A motion element with layoutScroll: any layout-animated content\n // inside (a shared-element morph, a FLIP row) projects against the\n // viewport's scroll offset instead of reading a scroll as a layout\n // change.\n render={<motion.div layoutScroll />}\n // No `overscroll-contain`: a scroll that reaches the viewport's end\n // (or one that has nothing to scroll) chains to the parent, as a\n // native scroll view does. A popup list that must trap the scroll\n // adds it on its own Viewport.\n className={cn(\n \"outline-pho-brand h-full min-h-0 w-full rounded-[inherit] focus-visible:outline-2 focus-visible:-outline-offset-1\",\n className,\n )}\n {...props}\n ref={(node) => {\n viewportRef.current = node;\n assignRef(ref, node);\n }}\n />\n );\n}\n\nfunction Scrollbar({\n className,\n ...props\n}: StyledProps<typeof BaseScrollArea.Scrollbar>) {\n return (\n <BaseScrollArea.Scrollbar\n className={cn(\n \"relative z-20 flex touch-none p-0.5 opacity-0 transition-opacity delay-300 select-none\",\n \"data-[hovering]:opacity-100 data-[hovering]:delay-0 data-[scrolling]:opacity-100 data-[scrolling]:delay-0 data-[scrolling]:duration-0\",\n \"data-[orientation=horizontal]:h-2.5 data-[orientation=horizontal]:flex-col data-[orientation=vertical]:w-2.5\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Thumb({\n className,\n ...props\n}: StyledProps<typeof BaseScrollArea.Thumb>) {\n return (\n <BaseScrollArea.Thumb\n className={cn(\n \"flex-1 rounded-full bg-[var(--border-color-pho-primary)]\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Scroll area built on Base UI `ScrollArea` — a capped region with overlay\n * scrollbars and progressive edge fade. Approaching rows blur (0 → 1px) and\n * wash into the surface; strength tracks scroll distance over one strip\n * height. Give `Root` a fixed size; put content in `Viewport` → `Content`\n * and add a `Scrollbar` → `Thumb` per axis.\n */\nexport const ScrollArea = {\n Root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AWG,EACT,0FACA,yIACA,gHACAwC,CACF;AAAA,IACA,GAAIgB;AAAA,EACL,CAAA;AAEL;AAEA,SAASmB,EAAM,EACb,WAAAnC,GACA,GAAGgB,EAAA,GACwC;AAC3C,SACE,gBAAAlD,EAACT,EAAe,OAAhB;AAAA,IACE,WAAWG,EACT,4DACAwC,CACF;AAAA,IACA,GAAIgB;AAAA,EACL,CAAA;AAEL;AASA,IAAazD,IAAa;AAAA,EACxB,MAAA2D;AAAA,EACA,UAAAK;AAAA,EACA,SAAAZ;AAAA,EACA,WAAAuB;AAAA,EACA,OAAAC;AAAA,EACA,QAAAlB;AACF"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as n } from "./cn-
|
|
2
|
+
import { t as n } from "./cn-CPbhpG1q.js";
|
|
3
3
|
import { SPRING_PRESS_INLINE as u } from "../motion.js";
|
|
4
4
|
import { r as m } from "./use-press-pulse-IbNstUT0.js";
|
|
5
|
-
import { t as g } from "./IconCheck-
|
|
5
|
+
import { t as g } from "./IconCheck-DwSMn1wK.js";
|
|
6
6
|
import { n as h, r as f, t as y } from "./popup-anchor-C3_iXdbh.js";
|
|
7
7
|
import { createContext as b, useContext as x } from "react";
|
|
8
8
|
import { jsx as r } from "react/jsx-runtime";
|
|
@@ -112,4 +112,4 @@ export {
|
|
|
112
112
|
K as t
|
|
113
113
|
};
|
|
114
114
|
|
|
115
|
-
//# sourceMappingURL=select-
|
|
115
|
+
//# sourceMappingURL=select-xhSvDNbw.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-xhSvDNbw.js","names":["BaseSelect","Select","cn","SPRING_PRESS_INLINE","usePressPulse","IconCheck","usePopupAnchor","usePopupAnchorTrigger","PopupAnchorProvider","createContext","useContext","jsx","motion","Select","SelectMultipleContext","INLINE_PRESS_SCALE","INLINE_PRESS_SPRING","Root","multiple","props","Value","Portal","List","Group","TRIGGER_BASE","Trigger","className","disabled","variant","onPointerDown","inline","motionProps","anchorRef","Icon","Positioner","sideOffset","align","alignItemWithTrigger","anchor","triggerAnchor","Popup","Item","ItemText","ItemIndicator","children","mark","GroupLabel","Select$1"],"sources":["../../src/components/select/select.tsx"],"sourcesContent":["import {\n createContext,\n useContext,\n type ComponentProps,\n type ElementType,\n type ReactNode,\n} from \"react\";\nimport { Select as BaseSelect } from \"@base-ui/react/select\";\nimport { SPRING_PRESS_INLINE } from \"../../motion\";\nimport { motion } from \"motion/react\";\nimport { IconCheck } from \"@tabler/icons-react\";\nimport { cn } from \"../../utils/cn\";\nimport {\n PopupAnchorProvider,\n usePopupAnchor,\n usePopupAnchorTrigger,\n} from \"../../utils/popup-anchor\";\nimport { usePressPulse } from \"../../utils/use-press-pulse\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\n/** Lets `ItemIndicator` know whether the Root is in `multiple` mode. */\nconst SelectMultipleContext = createContext(false);\n\nexport type SelectTriggerVariant = \"default\" | \"inline\";\n\n// Inline rides someone else's surface, so its pulse is shallower and snappier\n// than the default field's (0.98 / stiffness 700) — felt, not seen moving.\nconst INLINE_PRESS_SCALE = 0.99;\nconst INLINE_PRESS_SPRING = SPRING_PRESS_INLINE;\n\nfunction Root({\n multiple = false,\n ...props\n}: ComponentProps<typeof BaseSelect.Root>) {\n return (\n <SelectMultipleContext.Provider value={Boolean(multiple)}>\n <PopupAnchorProvider>\n <BaseSelect.Root multiple={multiple} {...props} />\n </PopupAnchorProvider>\n </SelectMultipleContext.Provider>\n );\n}\n\nconst Value = BaseSelect.Value;\nconst Portal = BaseSelect.Portal;\nconst List = BaseSelect.List;\nconst Group = BaseSelect.Group;\n\n// Shared by both Trigger variants — layout, easing, disabled, icon tone.\nconst TRIGGER_BASE = cn(\n \"flex cursor-pointer items-center justify-between gap-2 text-base select-none\",\n // Colors/stroke ease briefly; transform stays out (Motion owns it).\n \"transition-[color,background-color,box-shadow,outline-color] duration-150 ease-out\",\n \"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50\",\n \"[&_svg]:text-pho-secondary [&_svg]:size-4\",\n);\n\nfunction Trigger({\n className,\n disabled,\n variant = \"default\",\n onPointerDown,\n ...props\n}: StyledProps<typeof BaseSelect.Trigger> & {\n /**\n * `inline` drops the field chrome (ring, background, padding, min-width)\n * to ride a host surface — an Input Group addon, a toolbar — which then\n * carries the focus/open treatment. The press pulse moves to the arrow.\n * @default \"default\"\n */\n variant?: SelectTriggerVariant;\n}) {\n // One-shot press pulse (fires on pointer-down, always completes) — the\n // Effect Button gesture family adapted for a field-sized control. Both\n // variants pulse the whole trigger; inline is shallower and quicker.\n const inline = variant === \"inline\";\n const { motionProps } = usePressPulse({\n scale: inline ? INLINE_PRESS_SCALE : 0.98,\n transition: inline ? INLINE_PRESS_SPRING : undefined,\n disabled: Boolean(disabled),\n });\n // The pulse scales the trigger as the popup opens: the popup anchors to\n // its laid-out box, so the scale doesn't resize the popup.\n const anchorRef = usePopupAnchorTrigger();\n\n return (\n <BaseSelect.Trigger\n disabled={disabled}\n onPointerDown={onPointerDown}\n // Motion owns transform; a caller-supplied `render` in props still wins.\n render={<motion.button ref={anchorRef} {...motionProps} />}\n className={cn(\n TRIGGER_BASE,\n inline\n ? // Chrome-free: no surface of its own, text inherits the host\n // tone, and the host shows focus (e.g. Input Group's shared ring).\n \"rounded-base min-w-0 bg-transparent focus-visible:outline-none\"\n : cn(\n // Flat field surface — shadows are reserved for floating\n // layers; the 15% ring-pho-primary hairline is the input edge.\n \"bg-pho-primary ring-pho-primary text-pho-primary rounded-base min-w-44 px-3 py-2 ring-1 ring-inset focus-visible:outline-none\",\n // Open or focused, the edge is Input's: the brand ring at 2px,\n // inset, in place of the hairline.\n \"data-[popup-open]:ring-pho-brand focus-visible:ring-pho-brand focus-visible:ring-2 data-[popup-open]:ring-2\",\n ),\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Icon({ className, ...props }: StyledProps<typeof BaseSelect.Icon>) {\n return (\n <BaseSelect.Icon\n className={cn(\"flex shrink-0 items-center\", className)}\n {...props}\n />\n );\n}\n\nfunction Positioner({\n className,\n sideOffset = 6,\n align = \"start\",\n alignItemWithTrigger = false,\n anchor,\n ...props\n}: StyledProps<typeof BaseSelect.Positioner>) {\n const triggerAnchor = usePopupAnchor();\n return (\n <BaseSelect.Positioner\n anchor={anchor ?? triggerAnchor}\n sideOffset={sideOffset}\n align={align}\n // Base UI defaults to the macOS-style overlap (popup covers the trigger\n // so the selected item sits on the value text) — disorienting in a page\n // flow, so Pho drops the list below the field like a menu instead.\n alignItemWithTrigger={alignItemWithTrigger}\n className={cn(\"z-50 outline-none\", className)}\n {...props}\n />\n );\n}\n\nfunction Popup({ className, ...props }: StyledProps<typeof BaseSelect.Popup>) {\n return (\n <BaseSelect.Popup\n className={cn(\n // Floating layer: keeps its elevation shadow, edged with the site\n // hairline (ring-pho-secondary, #eee/#202020).\n \"bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-secondary rounded-base max-h-[var(--available-height)] min-w-[var(--anchor-width)] origin-[var(--transform-origin)] overflow-y-auto p-1 ring-1 outline-none ring-inset\",\n // Effect-Button animation family, faster: the open springs from the\n // trigger edge with a slight overshoot; close is a quick ease-out.\n \"transition-[transform,opacity] duration-[140ms] ease-[cubic-bezier(0.34,1.3,0.64,1)]\",\n \"data-[starting-style]:scale-95 data-[starting-style]:opacity-0\",\n \"data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:duration-100 data-[ending-style]:ease-out\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Item({ className, ...props }: StyledProps<typeof BaseSelect.Item>) {\n return (\n <BaseSelect.Item\n className={cn(\n // Fixed 1rem leading column: the selection mark lives there, so every\n // label starts at the same x whether or not it is selected.\n // `group/pho-item` feeds the multiple-mode checkbox indicator.\n \"group/pho-item text-pho-secondary grid cursor-pointer grid-cols-[1rem_1fr] items-center gap-2 rounded-[calc(var(--radius-base)-4px)] py-1.5 pr-2.5 pl-2 text-base outline-none select-none\",\n // Secondary at rest; highlight lifts to primary + ghost wash (Menu idiom).\n \"data-[highlighted]:bg-pho-ghost-hover data-[highlighted]:text-pho-primary data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ItemText({\n className,\n ...props\n}: StyledProps<typeof BaseSelect.ItemText>) {\n return (\n <BaseSelect.ItemText\n // Pin to column 2: when the single-select indicator unmounts, grid\n // auto-placement would otherwise pull the label into the mark column.\n className={cn(\"col-start-2 min-w-0\", className)}\n {...props}\n />\n );\n}\n\n/**\n * Leading selection mark, mode-aware. Single: a brand check that appears in\n * the reserved column. Multiple: an always-visible checkbox box that fills\n * with the same quiet fill/stroke ease as the standalone Checkbox.\n */\nfunction ItemIndicator({\n className,\n children,\n ...props\n}: StyledProps<typeof BaseSelect.ItemIndicator> & { children?: ReactNode }) {\n const multiple = useContext(SelectMultipleContext);\n const mark = children ?? <IconCheck />;\n\n if (multiple) {\n return (\n <span\n aria-hidden\n className={cn(\n \"col-start-1 flex size-4 shrink-0 items-center justify-center rounded-sm ring-1 ring-inset\",\n \"bg-pho-primary ring-pho-primary text-pho-on-brand\",\n // Fill + stroke ease together on toggle — Checkbox's transition.\n \"transition-[background-color,box-shadow,color] duration-150 ease-out\",\n \"group-data-[selected]/pho-item:bg-pho-brand-solid group-data-[selected]/pho-item:ring-transparent\",\n )}\n >\n <BaseSelect.ItemIndicator\n className={cn(\n \"flex items-center justify-center [&>svg]:size-3\",\n // Glyph pops with the fill; exits on the same path.\n \"transition-[transform,opacity] duration-150 ease-out\",\n \"data-[starting-style]:scale-50 data-[starting-style]:opacity-0\",\n \"data-[ending-style]:scale-50 data-[ending-style]:opacity-0\",\n className,\n )}\n {...props}\n >\n {mark}\n </BaseSelect.ItemIndicator>\n </span>\n );\n }\n\n return (\n <BaseSelect.ItemIndicator\n className={cn(\n \"text-pho-brand col-start-1 flex size-4 items-center justify-center [&>svg]:size-4\",\n className,\n )}\n {...props}\n >\n {mark}\n </BaseSelect.ItemIndicator>\n );\n}\n\nfunction GroupLabel({\n className,\n ...props\n}: StyledProps<typeof BaseSelect.GroupLabel>) {\n return (\n <BaseSelect.GroupLabel\n className={cn(\n \"text-pho-secondary px-2.5 py-1.5 text-xs font-medium\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Select built on Base UI `Select` — pick one option (or several with\n * `multiple`) from a list that opens below the trigger on click; the pattern\n * other design systems call a picker. Pass `items` to `Select.Root`, render an\n * `Item` per option, and show the selection with `Select.Value`. For a short,\n * always-visible set use `RadioGroup`; to filter a long list by typing use\n * `Combobox`.\n */\nexport const Select = {\n Root,\n Trigger,\n Value,\n Icon,\n Portal,\n Positioner,\n Popup,\n List,\n Item,\n ItemText,\n ItemIndicator,\n Group,\n GroupLabel,\n};\n"],"mappings":";;;;;;;;;;AA4BA,IAAMc,IAAwBL,EAAc,EAAK,GAM3CM,IAAqB,MACrBC,IAAsBb;AAE5B,SAASc,EAAK,EACZ,UAAAC,IAAW,IACX,GAAGC,EAAA,GACsC;AACzC,SACE,gBAAAR,EAACG,EAAsB,UAAvB;AAAA,IAAgC,OAAO,EAAQI;AAAA,IAC7C,UAAA,gBAAAP,EAACH,GAAD,EAAA,UACE,gBAAAG,EAACX,EAAW,MAAZ;AAAA,MAA2B,UAAAkB;AAAA,MAAU,GAAIC;AAAA,IAAQ,CAAA,EAC9B,CAAA;AAAA,EACS,CAAA;AAEpC;AAEA,IAAMC,IAAQpB,EAAW,OACnBqB,IAASrB,EAAW,QACpBsB,IAAOtB,EAAW,MAClBuB,IAAQvB,EAAW,OAGnBwB,IAAetB,EACnB,gFAEA,sFACA,iEACA,2CACF;AAEA,SAASuB,EAAQ,EACf,WAAAC,GACA,UAAAC,GACA,SAAAC,IAAU,WACV,eAAAC,GACA,GAAGV,EAAA,GASF;AAID,QAAMW,IAASF,MAAY,UACrB,EAAE,aAAAG,EAAA,IAAgB3B,EAAc;AAAA,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A,EACA,MAAAmB;AAAA,EACA,UAAAC;AAAA,EACA,eAAAC;AAAA,EACA,OAAApB;AAAA,EACA,YAAAuB;AACF"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as n } from "./cn-
|
|
2
|
+
import { t as n } from "./cn-CPbhpG1q.js";
|
|
3
3
|
import { t as ee } from "./is-react-component-DSnjtBmo.js";
|
|
4
4
|
import { n as te } from "./link-provider-DXzDQ08N.js";
|
|
5
5
|
import { SPRING_PRESS as re } from "../motion.js";
|
|
6
|
-
import { a as ae, u as ne } from "./button-
|
|
7
|
-
import { t as oe } from "./createReactComponent-
|
|
8
|
-
import { t as se } from "./IconArrowUpRight-
|
|
9
|
-
import { t as ie } from "./IconChevronRight-
|
|
10
|
-
import { n as _ } from "./avatar-
|
|
11
|
-
import { t as le } from "./IconSearch-
|
|
12
|
-
import { t as x } from "./scroll-area-
|
|
13
|
-
import { t as L } from "./collapsible-
|
|
14
|
-
import { t as ce } from "./kbd-
|
|
6
|
+
import { a as ae, u as ne } from "./button-CLfWdqm-.js";
|
|
7
|
+
import { t as oe } from "./createReactComponent-yKZn9MIX.js";
|
|
8
|
+
import { t as se } from "./IconArrowUpRight-OK8Fp0KQ.js";
|
|
9
|
+
import { t as ie } from "./IconChevronRight-BNkXCTk6.js";
|
|
10
|
+
import { n as _ } from "./avatar-PgBOfszL.js";
|
|
11
|
+
import { t as le } from "./IconSearch-DkcWWZ1H.js";
|
|
12
|
+
import { t as x } from "./scroll-area-Dhl5hqay.js";
|
|
13
|
+
import { t as L } from "./collapsible-C2tn_b1Q.js";
|
|
14
|
+
import { t as ce } from "./kbd-DWDs_6U1.js";
|
|
15
15
|
import { createContext as P, isValidElement as pe, useCallback as z, useContext as G, useEffect as T, useId as ue, useLayoutEffect as me, useMemo as K, useRef as w, useState as C } from "react";
|
|
16
16
|
import { Fragment as de, jsx as t, jsxs as c } from "react/jsx-runtime";
|
|
17
17
|
import { motion as I } from "motion/react";
|
|
@@ -303,4 +303,4 @@ export {
|
|
|
303
303
|
We as u
|
|
304
304
|
};
|
|
305
305
|
|
|
306
|
-
//# sourceMappingURL=sidebar-
|
|
306
|
+
//# sourceMappingURL=sidebar-CgaSEWVr.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar-CgaSEWVr.js","names":["SIDEBAR_PRESS_SPRING","Icon","_Fragment","Collapsible","BaseCollapsible","cn","isReactComponent","useLinkComponent","SPRING_PRESS","Button","buttonVariants","createReactComponent","IconArrowUpRight","IconChevronRight","Avatar","IconSearch","ScrollArea","Collapsible$1","Kbd","createContext","isValidElement","useCallback","useContext","useEffect","useId","useLayoutEffect","useMemo","useRef","useState","Fragment$1","jsx","jsxs","motion","Collapsible","__iconNode","IconDots","SIDEBAR_PRESS_MOTION","SIDEBAR_ROOT","SIDEBAR_ROOT_INSET","SIDEBAR_ROOT_BASE","SIDEBAR_HEADER_INSET","SIDEBAR_ITEM","SIDEBAR_ITEM_ACTIVE","SIDEBAR_ITEM_INACTIVE","SIDEBAR_SUBMENU_TRIGGER_CHILD_ACTIVE","SIDEBAR_SUBMENU_CHEVRON","SIDEBAR_SUBMENU_LIST_INDENT","SidebarInsetContext","SidebarSubmenuContext","useIsoLayoutEffect","Root","className","inset","props","Header","Search","label","kbd","Nav","scroll","insetTop","insetBottom","style","children","Group","GroupLabel","List","columns","Footer","renderIcon","icon","content","Item","active","wrap","href","external","rest","Link","MotionLink","submenu","rowId","rowClass","Submenu","openProp","defaultOpen","onOpenChange","openWhenChildActive","activeProp","uncontrolledOpen","setUncontrolledOpen","isControlled","open","setOpen","next","activeRowIds","setActiveRowIds","reportActive","isActive","previous","submenuContext","childActive","hasPaintedRef","frame","instantOpen","setInstantOpen","latestOpenRef","latestSetOpenRef","ACCOUNT_ROW","initialsFrom","name","words","AccountRow","avatarSrc","initials","Sidebar"],"sources":["../../../../node_modules/.pnpm/@tabler+icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconDots.mjs","../../src/sections/sidebar/sidebar.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\": \"M4 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\", \"key\": \"svg-0\" }], [\"path\", { \"d\": \"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\", \"key\": \"svg-1\" }], [\"path\", { \"d\": \"M18 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\", \"key\": \"svg-2\" }]];\nconst IconDots = createReactComponent(\"outline\", \"dots\", \"Dots\", __iconNode);\n\nexport { __iconNode, IconDots as default };\n","import {\n createContext,\n isValidElement,\n useCallback,\n useContext,\n useEffect,\n useId,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n type AnchorHTMLAttributes,\n type ButtonHTMLAttributes,\n type ComponentProps,\n type ComponentType,\n type FC,\n type ReactNode,\n type Ref,\n} from \"react\";\nimport {\n IconArrowUpRight,\n IconChevronRight,\n IconDots,\n} from \"@tabler/icons-react\";\nimport { Collapsible as BaseCollapsible } from \"@base-ui/react/collapsible\";\nimport { SPRING_PRESS } from \"../../motion\";\nimport { motion } from \"motion/react\";\nimport { IconSearch } from \"@tabler/icons-react\";\nimport { Button } from \"../../components/button\";\nimport { Collapsible } from \"../../components/collapsible\";\nimport { Kbd } from \"../../components/kbd\";\nimport { ScrollArea } from \"../../components/scroll-area\";\nimport { cn } from \"../../utils/cn\";\nimport { isReactComponent } from \"../../utils/is-react-component\";\nimport { useLinkComponent } from \"../../utils/link-provider\";\nimport { Avatar } from \"../../components/avatar\";\nimport { buttonVariants } from \"../../components/button\";\n\n/** Same press compression as `Button` — transform-only, every interactive row. */\nconst SIDEBAR_PRESS_SCALE = 0.97;\n/** Framer source transition shared with `Button`: `spring-physics 200 30 0.1`. */\nconst SIDEBAR_PRESS_SPRING = SPRING_PRESS;\nconst SIDEBAR_PRESS_MOTION = {\n initial: false as const,\n whileTap: { scale: SIDEBAR_PRESS_SCALE },\n transition: SIDEBAR_PRESS_SPRING,\n};\n\n/**\n * Sidebar — Pho's first SECTION: a composed app rail, not a micro component.\n * It encodes the navigation rail used across Photon surfaces (the Pho docs\n * site, the dashboard): a sticky full-height column with a brand header, a\n * scrollable stack of titled nav groups, and a pinned footer that usually\n * carries the account row.\n *\n * Sections stay presentational — no router, no data fetching, no theme\n * plumbing. Links render through the host's `LinkProvider` (same contract as\n * `ButtonLink`), state arrives via props (`active`), and interactive footers\n * compose with other Pho parts (e.g. wrap `Sidebar.AccountRow` in a\n * `Menu.Trigger render={...}` to open an account menu).\n *\n * `Root` takes `inset` (`base` | `sm`, default `base`) for the rail's outer\n * padding and header spacing — prefer that over host-app class overrides.\n */\n\n/* ------------------------------- class map ------------------------------- */\n\n/** The rail itself — sticky, full-height, hairline right edge (no inset). */\nexport const SIDEBAR_ROOT =\n \"border-pho-secondary bg-pho-page sticky top-0 flex h-dvh w-64 shrink-0 flex-col border-r\";\n\n/** Outer inset on `Root` — `base` is the docs/default rail; `sm` is tighter. */\nexport const SIDEBAR_ROOT_INSET = {\n base: \"px-4 pt-5 pb-4\",\n sm: \"px-3 pt-4 pb-3\",\n} as const;\n\n/** `SIDEBAR_ROOT` with the default `base` inset — one string for docs chrome. */\nexport const SIDEBAR_ROOT_BASE = cn(SIDEBAR_ROOT, SIDEBAR_ROOT_INSET.base);\n\n/** Header spacing paired with `Root`'s `inset`. */\nexport const SIDEBAR_HEADER_INSET = {\n base: \"mb-6 px-2\",\n sm: \"mb-3 px-0\",\n} as const;\n\nexport type SidebarInset = keyof typeof SIDEBAR_ROOT_INSET;\n\n/** A nav row at rest and on hover. Active/inactive inks split below. */\nexport const SIDEBAR_ITEM =\n \"outline-pho-brand flex min-h-9 w-full cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-left text-base transition-colors focus-visible:outline-2 focus-visible:-outline-offset-1\";\n\n/**\n * Selected row — lifted onto the primary surface with the site hairline.\n * The icon carries the same ink as the label so the pair reads as one unit.\n */\nexport const SIDEBAR_ITEM_ACTIVE =\n \"bg-pho-primary text-pho-primary ring-pho-secondary font-medium ring-1 ring-inset *:data-icon:text-pho-primary\";\n\n/**\n * Resting row — secondary ink (75%). Hover lifts onto the primary surface\n * (same plane as the active chip, without the ring) so the wash stays quiet\n * on `pho-page`. Icon tracks the label's ink at every state.\n */\nexport const SIDEBAR_ITEM_INACTIVE = cn(\n \"text-pho-secondary *:data-icon:text-pho-secondary\",\n \"hover:bg-pho-primary hover:text-pho-primary hover:*:data-icon:text-pho-primary\",\n);\n\n/**\n * A submenu's parent row while one of its children is the current page —\n * primary ink on label and icon, but no surface or ring: the child row\n * carries the full active chip, the parent only points at it.\n */\nexport const SIDEBAR_SUBMENU_TRIGGER_CHILD_ACTIVE =\n \"text-pho-primary *:data-icon:text-pho-primary\";\n\n/**\n * The trailing chevron on a submenu row — points right at rest, rotates to\n * point down while the panel is open. Base UI sets `data-panel-open` on the\n * trigger; the global reduced-motion guard collapses the rotation.\n */\nexport const SIDEBAR_SUBMENU_CHEVRON =\n \"ml-auto size-4 shrink-0 transition-transform duration-150 ease-out\";\n\n/**\n * Indent for a submenu's rows so their labels line up with the parent's\n * label: parent padding (8px) + icon (16px) + gap (8px) = 32px, minus the\n * child row's own 8px padding. Without a parent icon the label sits at 8px,\n * so children step in by one row padding only.\n */\nexport const SIDEBAR_SUBMENU_LIST_INDENT = {\n withIcon: \"pl-6\",\n withoutIcon: \"pl-4\",\n} as const;\n\nconst SidebarInsetContext = createContext<SidebarInset>(\"base\");\n\n/**\n * Rows inside a `Sidebar.Submenu` report their `active` flag here so the\n * parent can light up and auto-open. `null` outside a submenu.\n */\ninterface SidebarSubmenuContextValue {\n reportActive: (rowId: string, active: boolean) => void;\n}\n\nconst SidebarSubmenuContext = createContext<SidebarSubmenuContextValue | null>(\n null,\n);\n\n// React 18 warns that useLayoutEffect does nothing on the server (19 dropped\n// the warning); fall back to useEffect there so SSR'd docs stay quiet.\nconst useIsoLayoutEffect =\n typeof window === \"undefined\" ? useEffect : useLayoutEffect;\n\n/* --------------------------------- frame --------------------------------- */\n\ninterface RootProps extends ComponentProps<\"aside\"> {\n /** Outer padding + header spacing. Defaults to `base`. */\n inset?: SidebarInset;\n ref?: Ref<HTMLElement>;\n}\n\n/** The rail — a sticky, full-height `<aside>` with the hairline right edge. */\nfunction Root({ className, inset = \"base\", ...props }: RootProps) {\n return (\n <SidebarInsetContext.Provider value={inset}>\n <aside\n className={cn(SIDEBAR_ROOT, SIDEBAR_ROOT_INSET[inset], className)}\n {...props}\n data-inset={inset}\n />\n </SidebarInsetContext.Provider>\n );\n}\n\n/** Brand slot at the top of the rail — logo, wordmark, workspace switcher. */\nfunction Header({ className, ...props }: ComponentProps<\"div\">) {\n const inset = useContext(SidebarInsetContext);\n return (\n <div\n className={cn(\n \"flex items-center gap-2.5 [&:has(+nav)]:mb-0\",\n SIDEBAR_HEADER_INSET[inset],\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * The rail's search row — an outlined button dressed to `Item` metrics so\n * its label lines up with the rows below, the shortcut at the trailing\n * edge. The press is the Button's own; wire `onClick` (and a global ⌘K)\n * to a `Command.Dialog`.\n */\nfunction Search({\n label = \"Search\",\n kbd = \"⌘K\",\n className,\n ...props\n}: Omit<ComponentProps<typeof Button>, \"children\" | \"variant\" | \"size\"> & {\n label?: ReactNode;\n kbd?: string;\n}) {\n return (\n <Button\n variant=\"outlined\"\n shape=\"square\"\n size=\"md\"\n aria-keyshortcuts={kbd === \"⌘K\" ? \"Meta+K Control+K\" : undefined}\n prefix={<IconSearch aria-hidden />}\n suffix={<Kbd keys={kbd} className=\"pointer-events-none\" />}\n className={cn(\n \"hover:ring-pho-secondary min-h-9 w-full justify-start gap-2 rounded-sm px-2 py-1.5 has-[[data-icon=prefix]]:pl-2 has-[[data-icon=suffix]]:pr-2 [&>[data-text]]:min-w-0 [&>[data-text]]:flex-1 [&>[data-text]]:truncate [&>[data-text]]:text-left\",\n className,\n )}\n {...props}\n >\n {label}\n </Button>\n );\n}\n\n/**\n * The scrollable middle — a stack of `Sidebar.Group`s in a `ScrollArea`\n * (overlay scrollbar, edge fade). Pass `scroll={false}` where a parent\n * scrolls the whole rail as one column (a narrow-viewport drawer) — the\n * nav is then a plain stack at its natural height.\n *\n * The nav owns its breathing room toward its neighbors as a resting inset\n * (a scroll view's safe-area padding): 24px above, 16px below by default —\n * rows stand clear of the ends at rest and scroll through the gap, under\n * the edge fade, instead of clipping at a dead margin. `inset` /\n * `insetTop` / `insetBottom` override it; the same values become plain\n * padding when `scroll={false}`, so both modes keep one geometry. A\n * `Header` right before the nav and a `Footer` after it drop their own\n * margins — the gap lives here, not on the neighbors.\n */\nfunction Nav({\n scroll = true,\n inset,\n insetTop = inset ?? 24,\n insetBottom = inset ?? 16,\n className,\n style,\n children,\n ...props\n}: ComponentProps<\"nav\"> & {\n scroll?: boolean;\n inset?: number | string;\n insetTop?: number | string;\n insetBottom?: number | string;\n}) {\n if (!scroll) {\n return (\n <nav\n className={cn(\"flex flex-col gap-6\", className)}\n style={{\n paddingTop: insetTop ?? inset,\n paddingBottom: insetBottom ?? inset,\n ...style,\n }}\n {...props}\n >\n {children}\n </nav>\n );\n }\n return (\n <nav\n className={cn(\"flex min-h-0 flex-1 flex-col\", className)}\n style={style}\n {...props}\n >\n <ScrollArea.Root className=\"min-h-0 flex-1\">\n <ScrollArea.Viewport>\n <ScrollArea.Content\n inset={inset}\n insetTop={insetTop}\n insetBottom={insetBottom}\n className=\"flex flex-col gap-6\"\n >\n {children}\n </ScrollArea.Content>\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar>\n <ScrollArea.Thumb />\n </ScrollArea.Scrollbar>\n </ScrollArea.Root>\n </nav>\n );\n}\n\nfunction Group({ className, ...props }: ComponentProps<\"div\">) {\n return <div className={className} {...props} />;\n}\n\n/** The cluster's caption — description ink, regular weight. */\nfunction GroupLabel({ className, ...props }: ComponentProps<\"div\">) {\n return (\n <div\n className={cn(\n \"text-pho-description mb-2 px-2 text-xs font-normal\",\n className,\n )}\n {...props}\n />\n );\n}\n\ninterface ListProps extends ComponentProps<\"ul\"> {\n /** Lay the rows out in two columns — for long, flat registries. */\n columns?: boolean;\n}\n\n/** The rows of a group. `columns` switches to a two-column grid. */\nfunction List({ className, columns, ...props }: ListProps) {\n return (\n <ul\n className={cn(\n // list-none/m-0/p-0 shield the rail from host prose styles.\n \"m-0 list-none p-0 *:m-0\",\n columns\n ? \"grid grid-cols-2 gap-x-2 gap-y-0.5\"\n : \"flex flex-col gap-0.5\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Pinned bottom cluster — docs link, account row, theme toggle. */\nfunction Footer({ className, ...props }: ComponentProps<\"div\">) {\n return (\n <div\n className={cn(\"mt-4 flex flex-col gap-0.5 [nav~&]:mt-0\", className)}\n {...props}\n />\n );\n}\n\n/* --------------------------------- item ---------------------------------- */\n\n/** An icon slot — a component (`IconBook`) or element (`<IconBook />`). */\ntype Slottable = ReactNode | FC<{ className?: string }>;\n\nfunction renderIcon(icon: Slottable): ReactNode {\n if (icon == null || icon === false) return null;\n let content: ReactNode = null;\n if (isReactComponent(icon)) {\n const Icon = icon;\n content = <Icon />;\n } else if (isValidElement(icon)) {\n content = icon;\n }\n if (content == null) return null;\n return (\n <span\n data-icon\n className=\"pointer-events-none inline-flex shrink-0 items-center [&>svg]:size-4 [&>svg]:shrink-0\"\n >\n {content}\n </span>\n );\n}\n\ninterface ItemBaseProps {\n /** Slot before the label — a component (`IconBook`) or element. */\n icon?: Slottable;\n /** Marks the row as the current destination (adds `aria-current=\"page\"`). */\n active?: boolean;\n /**\n * Let the label break onto two lines instead of truncating. Default\n * rows stay a single truncated line so the rail keeps even height.\n * The row still uses `min-h-9`; wrap only grows it when the text\n * actually breaks. Caps at two lines.\n */\n wrap?: boolean;\n children?: ReactNode;\n className?: string;\n}\n\n/**\n * DOM handlers whose React signatures clash with Motion's gesture props.\n * Same omit list as `Button` — rows render through `motion.*`.\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 SidebarItemLinkProps\n extends\n ItemBaseProps,\n Omit<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n keyof ItemBaseProps | MotionHandlerConflicts\n > {\n /** Destination — rendered through the host's `LinkProvider`. */\n href: string;\n /** Leaves the app: opens in a new tab and renders a ↗ cue. */\n external?: boolean;\n}\n\nexport interface SidebarItemButtonProps\n extends\n ItemBaseProps,\n Omit<\n ButtonHTMLAttributes<HTMLButtonElement>,\n keyof ItemBaseProps | MotionHandlerConflicts\n > {\n href?: undefined;\n external?: undefined;\n}\n\nexport type SidebarItemProps = SidebarItemLinkProps | SidebarItemButtonProps;\n\n/**\n * A nav row — a link when `href` is given (rendered through the host's\n * `LinkProvider`), otherwise a button. `active` lifts the row onto the\n * primary surface; `external` opens a new tab and appends a ↗ cue.\n * `wrap` drops the single-line truncate so a long product name can sit\n * on two lines; other rows stay one line.\n */\nfunction Item({\n icon,\n active,\n wrap = false,\n className,\n children,\n href,\n external,\n ...rest\n}: SidebarItemProps) {\n const Link = useLinkComponent();\n // Same bridge as `ButtonLink` — host `LinkProvider` + Motion press scale.\n const MotionLink = useMemo(\n () =>\n motion.create(Link as unknown as ComponentType<Record<string, unknown>>),\n [Link],\n );\n // Inside a `Submenu`, tell the parent row when this one is current so it\n // can light up and auto-open. Layout effect: the parent reads the result\n // before first paint, so a route-selected group opens without a flash.\n const submenu = useContext(SidebarSubmenuContext);\n const rowId = useId();\n useIsoLayoutEffect(() => {\n if (!submenu) return;\n submenu.reportActive(rowId, Boolean(active));\n return () => submenu.reportActive(rowId, false);\n }, [submenu, rowId, active]);\n const rowClass = cn(\n SIDEBAR_ITEM,\n active ? SIDEBAR_ITEM_ACTIVE : SIDEBAR_ITEM_INACTIVE,\n className,\n );\n const label = (\n <span\n className={\n wrap\n ? \"line-clamp-2 min-w-0 flex-1 text-balance hyphens-none\"\n : \"min-w-0 flex-1 truncate\"\n }\n >\n {children}\n </span>\n );\n\n if (href !== undefined) {\n return (\n <li>\n <MotionLink\n href={href}\n aria-current={active ? \"page\" : undefined}\n {...(external && { target: \"_blank\", rel: \"noopener noreferrer\" })}\n {...(rest as AnchorHTMLAttributes<HTMLAnchorElement>)}\n className={rowClass}\n {...SIDEBAR_PRESS_MOTION}\n >\n {renderIcon(icon)}\n {label}\n {external && (\n <>\n {renderIcon(<IconArrowUpRight aria-hidden />)}\n <span className=\"sr-only\">(opens in a new tab)</span>\n </>\n )}\n </MotionLink>\n </li>\n );\n }\n\n return (\n <li>\n <motion.button\n type=\"button\"\n aria-current={active ? \"page\" : undefined}\n {...(rest as Omit<\n ButtonHTMLAttributes<HTMLButtonElement>,\n MotionHandlerConflicts\n >)}\n className={rowClass}\n {...SIDEBAR_PRESS_MOTION}\n >\n {renderIcon(icon)}\n {label}\n </motion.button>\n </li>\n );\n}\n\n/* -------------------------------- submenu -------------------------------- */\n\nexport interface SidebarSubmenuProps extends Omit<\n ButtonHTMLAttributes<HTMLButtonElement>,\n \"children\" | MotionHandlerConflicts\n> {\n /** The parent row's label. */\n label: ReactNode;\n /** Slot before the label — a component (`IconBook`) or element. */\n icon?: Slottable;\n /** Controlled open state. Pair with `onOpenChange`. */\n open?: boolean;\n /** Initial open state when uncontrolled. Defaults to `false`. */\n defaultOpen?: boolean;\n /** Called with the next open state on every toggle (user or auto-open). */\n onOpenChange?: (open: boolean) => void;\n /**\n * Open the panel whenever a child row becomes `active`, so a route-based\n * rail expands the right group on load and on navigation. Defaults to\n * `true`. The user can still collapse the group afterwards.\n */\n openWhenChildActive?: boolean;\n /**\n * Force the parent's child-active ink. Normally derived from the\n * children's `active` flags — set this when the current destination lives\n * under the group but has no row of its own.\n */\n active?: boolean;\n /** The nested rows — `Sidebar.Item`s, no icon needed. */\n children: ReactNode;\n ref?: Ref<HTMLButtonElement>;\n}\n\n/**\n * A nav row that folds open to reveal child rows — `<Item>` metrics on the\n * trigger, a trailing chevron that turns as the panel opens, and the nested\n * list indented to the parent's label. Built on `Collapsible`, so the\n * height animation (and its reduced-motion collapse) is the library's own.\n *\n * Children are ordinary `Sidebar.Item`s: they report `active` upward, so the\n * parent takes primary ink while a child is current and, with\n * `openWhenChildActive` (default), opens on load without a flash.\n *\n * ```tsx\n * <Sidebar.Submenu label=\"Platforms\" icon={IconMessage}>\n * <Sidebar.Item href=\"/platforms/sms\" active>SMS</Sidebar.Item>\n * <Sidebar.Item href=\"/platforms/imessage\">iMessage</Sidebar.Item>\n * </Sidebar.Submenu>\n * ```\n */\nfunction Submenu({\n label,\n icon,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n openWhenChildActive = true,\n active: activeProp,\n className,\n children,\n ...rest\n}: SidebarSubmenuProps) {\n /* ---- open state: controlled when `open` is given, else internal ---- */\n const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen);\n const isControlled = openProp !== undefined;\n const open = isControlled ? openProp : uncontrolledOpen;\n const setOpen = useCallback(\n (next: boolean) => {\n if (!isControlled) setUncontrolledOpen(next);\n onOpenChange?.(next);\n },\n [isControlled, onOpenChange],\n );\n\n /* ---- which child rows are current (reported by `Item`) ---- */\n const [activeRowIds, setActiveRowIds] = useState<ReadonlySet<string>>(\n () => new Set(),\n );\n const reportActive = useCallback((rowId: string, isActive: boolean) => {\n setActiveRowIds((previous) => {\n if (previous.has(rowId) === isActive) return previous;\n const next = new Set(previous);\n if (isActive) next.add(rowId);\n else next.delete(rowId);\n return next;\n });\n }, []);\n const submenuContext = useMemo(() => ({ reportActive }), [reportActive]);\n const childActive = activeProp ?? activeRowIds.size > 0;\n\n /* ---- auto-open on an active child ---- */\n // `true` once the browser has painted the first frame. An auto-open that\n // happens before that (the route already sits under this group on load)\n // must not animate — the rail should simply appear expanded.\n const hasPaintedRef = useRef(false);\n useEffect(() => {\n const frame = requestAnimationFrame(() => {\n hasPaintedRef.current = true;\n });\n return () => cancelAnimationFrame(frame);\n }, []);\n // While `true`, the panel's height transition runs at 0s so the pre-paint\n // auto-open lands instantly. Cleared a frame later so the next toggle\n // animates normally.\n const [instantOpen, setInstantOpen] = useState(false);\n // Read through refs so the effect fires only when the active children\n // change — a user collapsing the group must not be undone by a re-render.\n const latestOpenRef = useRef(open);\n latestOpenRef.current = open;\n const latestSetOpenRef = useRef(setOpen);\n latestSetOpenRef.current = setOpen;\n useIsoLayoutEffect(() => {\n if (!openWhenChildActive || !childActive || latestOpenRef.current) return;\n if (!hasPaintedRef.current) setInstantOpen(true);\n latestSetOpenRef.current(true);\n }, [activeRowIds, childActive, openWhenChildActive]);\n useEffect(() => {\n if (!instantOpen) return;\n const frame = requestAnimationFrame(() => setInstantOpen(false));\n return () => cancelAnimationFrame(frame);\n }, [instantOpen]);\n\n return (\n <Collapsible.Root\n open={open}\n onOpenChange={(next) => setOpen(next)}\n render={<li />}\n >\n <BaseCollapsible.Trigger\n // Same press compression as `Item`; Base UI wires aria-expanded,\n // aria-controls, and Enter / Space onto the native button.\n render={<motion.button {...SIDEBAR_PRESS_MOTION} />}\n className={cn(\n SIDEBAR_ITEM,\n SIDEBAR_ITEM_INACTIVE,\n childActive && SIDEBAR_SUBMENU_TRIGGER_CHILD_ACTIVE,\n // The chevron turns to point down while the panel is open.\n \"data-[panel-open]:*:data-chevron:rotate-90\",\n className,\n )}\n data-child-active={childActive || undefined}\n {...rest}\n >\n {renderIcon(icon)}\n <span className=\"min-w-0 flex-1 truncate\">{label}</span>\n <IconChevronRight\n aria-hidden\n data-chevron\n className={SIDEBAR_SUBMENU_CHEVRON}\n />\n </BaseCollapsible.Trigger>\n {/* keepMounted: closed children stay mounted (hidden) so an active\n child keeps reporting and the parent keeps its ink. */}\n <Collapsible.Panel\n keepMounted\n style={instantOpen ? { transitionDuration: \"0s\" } : undefined}\n >\n <SidebarSubmenuContext.Provider value={submenuContext}>\n {/* Indent and top gap live on a wrapper inside the panel: the\n measured height includes them, so a closed group adds no height\n and siblings never shift. (`List` resets its own padding.) */}\n <div\n data-submenu-list\n className={cn(\n \"pt-0.5\",\n icon\n ? SIDEBAR_SUBMENU_LIST_INDENT.withIcon\n : SIDEBAR_SUBMENU_LIST_INDENT.withoutIcon,\n )}\n >\n <List>{children}</List>\n </div>\n </SidebarSubmenuContext.Provider>\n </Collapsible.Panel>\n </Collapsible.Root>\n );\n}\n\n/* ------------------------------ account row ------------------------------ */\n\n/**\n * Whole-row account trigger. The row itself stays visually quiet — it only\n * carries the `group` state (hover/press/popup-open) and the focus ring;\n * all visual feedback renders on the ⋯ circle via `group-*` classes.\n */\nconst ACCOUNT_ROW =\n \"group outline-pho-brand flex w-full cursor-pointer items-center gap-2 rounded-base p-2 text-left focus-visible:outline-2 focus-visible:outline-offset-2\";\n\n/** Avatar initials: first + last word initial, else the first character. */\nfunction initialsFrom(name: string): string {\n const words = name.split(/\\s+/).filter(Boolean);\n const first = words[0]?.[0] ?? name[0] ?? \"?\";\n const last = words.length >= 2 ? (words[words.length - 1]?.[0] ?? \"\") : \"\";\n return (first + last).toUpperCase();\n}\n\nexport interface SidebarAccountRowProps extends Omit<\n ButtonHTMLAttributes<HTMLButtonElement>,\n \"children\" | MotionHandlerConflicts\n> {\n /** Display name — also the source for fallback initials. */\n name: string;\n /** Avatar image URL; falls back to initials while loading or on error. */\n avatarSrc?: string;\n /** Override the derived initials. */\n initials?: string;\n ref?: Ref<HTMLButtonElement>;\n}\n\n/**\n * The account chip pinned to the rail's footer — an xs avatar, the name, and\n * a decorative ⋯ circle. The WHOLE row is one button, but the row is only the\n * control — the circle is the indicator: hover, press, and menu-open feedback\n * all render on the ⋯ (a span wearing the stock secondary-circle button\n * classes), driven by the row's `group` state, so it reads as a button\n * without nesting one.\n *\n * It renders a plain `<button>` and forwards every prop, so it slots straight\n * into a menu: `<Menu.Trigger render={<Sidebar.AccountRow name=\"…\" />} />` —\n * Base UI's `data-popup-open` / `data-pressed` states light up the circle.\n */\nfunction AccountRow({\n name,\n avatarSrc,\n initials,\n className,\n ...props\n}: SidebarAccountRowProps) {\n return (\n <motion.button\n type=\"button\"\n className={cn(ACCOUNT_ROW, className)}\n {...props}\n {...SIDEBAR_PRESS_MOTION}\n >\n <Avatar.Root size=\"xs\">\n {avatarSrc && <Avatar.Image src={avatarSrc} alt=\"\" />}\n <Avatar.Fallback>{initials ?? initialsFrom(name)}</Avatar.Fallback>\n </Avatar.Root>\n <span className=\"text-pho-primary min-w-0 flex-1 truncate text-base\">\n {name}\n </span>\n <span\n aria-hidden\n className={buttonVariants({\n variant: \"outlined\",\n size: \"sm\",\n shape: \"circle\",\n // Hover / open washes stay on the ⋯; press scale lives on the row\n // (same as Button / Sidebar.Item) so the circle does not double-scale.\n className:\n \"group-hover:bg-pho-primary-hover group-hover:text-pho-secondary-hover group-data-[popup-open]:bg-pho-primary-hover group-data-[popup-open]:text-pho-secondary-hover p-1\",\n })}\n >\n <IconDots className=\"size-4\" />\n </span>\n </motion.button>\n );\n}\n\n/* -------------------------------- assembly ------------------------------- */\n\n/**\n * The composed sidebar rail. Assemble the frame parts and fill them with\n * rows; wire interactivity by composing other Pho parts around them:\n *\n * ```tsx\n * <Sidebar.Root>\n * <Sidebar.Header>…brand…</Sidebar.Header>\n * <Sidebar.Nav>\n * <Sidebar.Group>\n * <Sidebar.GroupLabel>Pages</Sidebar.GroupLabel>\n * <Sidebar.List>\n * <Sidebar.Item href=\"/\" icon={IconHome} active>\n * Overview\n * </Sidebar.Item>\n * <Sidebar.Submenu label=\"Platforms\" icon={IconMessage}>\n * <Sidebar.Item href=\"/platforms/sms\">SMS</Sidebar.Item>\n * <Sidebar.Item href=\"/platforms/email\">Email</Sidebar.Item>\n * </Sidebar.Submenu>\n * </Sidebar.List>\n * </Sidebar.Group>\n * </Sidebar.Nav>\n * <Sidebar.Footer>\n * <Menu.Root>\n * <Menu.Trigger render={<Sidebar.AccountRow name=\"Ada Lovelace\" />} />\n * …\n * </Menu.Root>\n * </Sidebar.Footer>\n * </Sidebar.Root>\n * ```\n */\nexport const Sidebar = {\n Root,\n Header,\n Search,\n Nav,\n Group,\n GroupLabel,\n List,\n Item,\n Submenu,\n Footer,\n AccountRow,\n};\n"],"ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;AASA,IAAMkC,KAAa;AAAA,EAAC,CAAC,QAAQ;AAAA,IAAE,GAAK;AAAA,IAAsC,KAAO;AAAA,EAAQ,CAAC;AAAA,EAAG,CAAC,QAAQ;AAAA,IAAE,GAAK;AAAA,IAAuC,KAAO;AAAA,EAAQ,CAAC;AAAA,EAAG,CAAC,QAAQ;AAAA,IAAE,GAAK;AAAA,IAAuC,KAAO;AAAA,EAAQ,CAAC;AAAC,GACzOC,KAAWxB,GAAqB,WAAW,QAAQ,QAAQuB,EAAU,GCgCrEE,IAAuB;AAAA,EAC3B,SAAS;AAAA,EACT,UAAU,EAAE,OAAO,KAAoB;AAAA,EACvC,YAAYpC;AACd,GAsBaqC,IACX,4FAGWC,IAAqB;AAAA,EAChC,MAAM;AAAA,EACN,IAAI;AACN,GAGaC,KAAoBlC,EAAGgC,GAAcC,EAAmB,IAAI,GAG5DE,KAAuB;AAAA,EAClC,MAAM;AAAA,EACN,IAAI;AACN,GAKaC,IACX,gMAMWC,KACX,iHAOWC,IAAwBtC,EACnC,qDACA,gFACF,GAOauC,KACX,iDAOWC,KACX,sEAQWC,IAA8B;AAAA,EACzC,UAAU;AAAA,EACV,aAAa;AACf,GAEMC,IAAsB5B,EAA4B,MAAM,GAUxD6B,IAAwB7B,EAC5B,IACF,GAIM8B,IACJ,OAAO,SAAW,MAAc1B,IAAYE;AAW9C,SAASyB,GAAK,EAAE,WAAAC,GAAW,OAAAC,IAAQ,QAAQ,GAAGC,EAAA,GAAoB;AACh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-CPbhpG1q.js";
|
|
3
3
|
import { forwardRef as a } from "react";
|
|
4
4
|
import { jsx as n } from "react/jsx-runtime";
|
|
5
5
|
var i = a(function({ className: e, ...o }, r) {
|
|
@@ -15,4 +15,4 @@ export {
|
|
|
15
15
|
i as t
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
//# sourceMappingURL=skeleton-
|
|
18
|
+
//# sourceMappingURL=skeleton-CqZlGphn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skeleton-CqZlGphn.js","names":["forwardRef","jsx","Skeleton","className","props","ref","cn"],"sources":["../../src/components/skeleton/skeleton.tsx"],"sourcesContent":["import { forwardRef, type ComponentProps } from \"react\";\nimport { cn } from \"../../utils/cn\";\n\nexport interface SkeletonProps extends ComponentProps<\"div\"> {}\n\n/**\n * A pulsing placeholder bone for loading surfaces. Size and shape come from\n * `className` (`h-*`, `w-*`, `rounded-full`, …) — the component only supplies\n * the wash and motion. Decorative by default (`aria-hidden`); mark the\n * surrounding region with `aria-busy` / `aria-label` instead of labeling each\n * bone. Prefer `Spinner` when a single control is pending.\n */\nexport const Skeleton = forwardRef<HTMLDivElement, SkeletonProps>(\n function Skeleton({ className, ...props }, ref) {\n return (\n <div\n ref={ref}\n aria-hidden\n className={cn(\n \"bg-pho-secondary animate-pho-skeleton rounded-sm\",\n className,\n )}\n {...props}\n />\n );\n },\n);\n\nSkeleton.displayName = \"Skeleton\";\n"],"mappings":";;;;AAYA,IAAaE,IAAWF,EACtB,SAAkB,EAAE,WAAAG,GAAW,GAAGC,EAAA,GAASC,GAAK;AAC9C,SACE,gBAAAJ,EAAC,OAAD;AAAA,IACO,KAAAI;AAAA,IACL,eAAA;AAAA,IACA,WAAWC,EACT,oDACAH,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL,CACF;AAEAF,EAAS,cAAc"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t } from "./cn-
|
|
2
|
+
import { t } from "./cn-CPbhpG1q.js";
|
|
3
3
|
import { t as c } from "./resolve-variant-CcD8iG5l.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx as o, jsxs as l } from "react/jsx-runtime";
|
|
@@ -51,4 +51,4 @@ export {
|
|
|
51
51
|
m as t
|
|
52
52
|
};
|
|
53
53
|
|
|
54
|
-
//# sourceMappingURL=spinner-
|
|
54
|
+
//# sourceMappingURL=spinner-BSutFL4l.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner-BSutFL4l.js","names":["resolveVariant","jsx","jsxs","SPINNER_SIZES","Spinner","size","className","ariaLabel","ariaHidden","props","labeled","cn"],"sources":["../../src/components/spinner/spinner.tsx"],"sourcesContent":["import { type ComponentProps } from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { resolveVariant, type VariantMap } from \"../../utils/resolve-variant\";\n\n/** Size axis — the ring scales with the surrounding control. */\nexport const SPINNER_SIZES = {\n sm: {\n classes: \"size-3.5\",\n description: \"Small — dense rows and compact chrome\",\n },\n md: {\n classes: \"size-4\",\n description: \"Medium — the default (menu rows, button icons)\",\n },\n lg: {\n classes: \"size-5\",\n description: \"Large — standalone or roomy surfaces\",\n },\n} satisfies VariantMap;\n\nexport type SpinnerSize = keyof typeof SPINNER_SIZES;\n\nexport interface SpinnerProps extends Omit<ComponentProps<\"svg\">, \"children\"> {\n /** Size variant. @default \"md\" */\n size?: SpinnerSize;\n}\n\n/**\n * Indeterminate loading ring — a hairline track with a quarter-circle arc\n * rotating over it. The continuous 2px round-cap stroke matches Pho's\n * hairline rings and Tabler icon language. Uses `currentColor`, so ink\n * follows the parent (`text-pho-*`, white on overlays). Decorative by default\n * (`aria-hidden`); pass `aria-label` when the spinner is the only loading cue.\n */\nexport function Spinner({\n size = \"md\",\n className,\n \"aria-label\": ariaLabel,\n \"aria-hidden\": ariaHidden,\n ...props\n}: SpinnerProps) {\n const labeled = ariaLabel != null && ariaLabel !== \"\";\n return (\n <svg\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 20 20\"\n role={labeled ? \"status\" : undefined}\n aria-label={ariaLabel}\n aria-hidden={labeled ? ariaHidden : (ariaHidden ?? true)}\n className={cn(\"shrink-0\", resolveVariant(SPINNER_SIZES, size), className)}\n {...props}\n >\n <circle className=\"opacity-30\" cx=\"10\" cy=\"10\" r=\"8\" strokeWidth=\"2\" />\n {/* Quarter arc (2π·8 ≈ 50.3 → dash 12.5) rotating at 800ms/rev. */}\n <circle\n className=\"animate-pho-spinner origin-center\"\n cx=\"10\"\n cy=\"10\"\n r=\"8\"\n strokeWidth=\"2\"\n strokeDasharray=\"12.5 50\"\n strokeLinecap=\"round\"\n />\n </svg>\n );\n}\n\nSpinner.displayName = \"Spinner\";\n"],"mappings":";;;;;AAKA,IAAaG,IAAgB;AAAA,EAC3B,IAAI;AAAA,IACF,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AAAA,EACA,IAAI;AAAA,IACF,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AAAA,EACA,IAAI;AAAA,IACF,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AACF;AAgBA,SAAgBC,EAAQ,EACtB,MAAAC,IAAO,MACP,WAAAC,GACA,cAAcC,GACd,eAAeC,GACf,GAAGC,EAAA,GACY;AACf,QAAMC,IAAUH,KAAa,QAAQA,MAAc;AACnD,SACE,gBAAAL,EAAC,OAAD;AAAA,IACE,MAAK;AAAA,IACL,QAAO;AAAA,IACP,SAAQ;AAAA,IACR,MAAMQ,IAAU,WAAW;AAAA,IAC3B,cAAYH;AAAA,IACZ,eAAaG,IAAUF,IAAcA,KAAc;AAAA,IACnD,WAAWG,EAAG,YAAYX,EAAeG,GAAeE,CAAI,GAAGC,CAAS;AAAA,IACxE,GAAIG;AAAA,IARN,UAAA,CAUE,gBAAAR,EAAC,UAAD;AAAA,MAAQ,WAAU;AAAA,MAAa,IAAG;AAAA,MAAK,IAAG;AAAA,MAAK,GAAE;AAAA,MAAI,aAAY;AAAA,IAAK,CAAA,GAEtE,gBAAAA,EAAC,UAAD;AAAA,MACE,WAAU;AAAA,MACV,IAAG;AAAA,MACH,IAAG;AAAA,MACH,GAAE;AAAA,MACF,aAAY;AAAA,MACZ,iBAAgB;AAAA,MAChB,eAAc;AAAA,IACf,CAAA,CACE;AAAA,E;AAET;AAEAG,EAAQ,cAAc"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as c } from "./cn-
|
|
3
|
-
import { t as p } from "./createReactComponent-
|
|
4
|
-
import { r as h } from "./badge-
|
|
2
|
+
import { t as c } from "./cn-CPbhpG1q.js";
|
|
3
|
+
import { t as p } from "./createReactComponent-yKZn9MIX.js";
|
|
4
|
+
import { r as h } from "./badge-CVViIYj_.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import { jsx as a, jsxs as i } from "react/jsx-runtime";
|
|
7
7
|
var y = [["path", {
|
|
@@ -82,4 +82,4 @@ export {
|
|
|
82
82
|
m as t
|
|
83
83
|
};
|
|
84
84
|
|
|
85
|
-
//# sourceMappingURL=stat-
|
|
85
|
+
//# sourceMappingURL=stat-BXBfMQ9Q.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stat-BXBfMQ9Q.js","names":["__iconNode","cn","createReactComponent","Badge","jsx","jsxs","__iconNode$1","IconTrendingDown","__iconNode","IconTrendingUp","percent","directionOf","delta","trimmed","first","body","deltaColor","direction","good","Stat","label","value","deltaDirection","deltaGood","note","className","props","text","Arrow","StatGroup","variant"],"sources":["../../../../node_modules/.pnpm/@tabler+icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconTrendingDown.mjs","../../../../node_modules/.pnpm/@tabler+icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconTrendingUp.mjs","../../src/components/stat/stat.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\": \"M3 7l6 6l4 -4l8 8\", \"key\": \"svg-0\" }], [\"path\", { \"d\": \"M21 10l0 7l-7 0\", \"key\": \"svg-1\" }]];\nconst IconTrendingDown = createReactComponent(\"outline\", \"trending-down\", \"TrendingDown\", __iconNode);\n\nexport { __iconNode, IconTrendingDown as default };\n","/**\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\": \"M3 17l6 -6l4 4l8 -8\", \"key\": \"svg-0\" }], [\"path\", { \"d\": \"M14 7l7 0l0 7\", \"key\": \"svg-1\" }]];\nconst IconTrendingUp = createReactComponent(\"outline\", \"trending-up\", \"TrendingUp\", __iconNode);\n\nexport { __iconNode, IconTrendingUp as default };\n","import { type ComponentProps, type ReactNode } from \"react\";\nimport { IconTrendingDown, IconTrendingUp } from \"@tabler/icons-react\";\nimport { Badge, type BadgeColor } from \"../badge\";\nimport { cn } from \"../../utils/cn\";\n\n/**\n * Stat — a figure with its name: a label, a value, and, when it\n * matters, how the value moved and against what.\n *\n * Design notes:\n * - The value is the loud element: display size, medium weight, the\n * font's proportional figures (tabular digits make a big `121` look\n * loose). Label and note stay in the UI inks; nothing else competes.\n * - The delta is a low-contrast `Badge` beside the label, with an arrow so\n * the direction never rides on colour alone. Its ink says whether the\n * move is good news: `deltaGood` names the good direction, because a\n * drop in bounce rate is green and a drop in visitors is red.\n * - A tile has no chrome of its own. Alone, it sits in whatever card holds\n * it; in a `Stat.Group` the tiles share one frame and hairlines.\n */\n\nexport type StatDirection = \"up\" | \"down\" | \"flat\";\n\nexport interface StatProps extends Omit<ComponentProps<\"div\">, \"children\"> {\n /** What the figure counts — \"Visitors\", \"Active chats\". */\n label: ReactNode;\n /** The figure, already formatted — \"20.8K\", \"8m 32s\", \"1:1\". */\n value: ReactNode;\n /**\n * How the value moved: a number is a percentage change and renders\n * signed with one decimal (\"−42.0%\"); a string renders as written and\n * its sign sets the direction.\n */\n delta?: number | string;\n /** The delta's direction, when the string can't say. Derived otherwise. */\n deltaDirection?: StatDirection;\n /**\n * Which direction is good news: `up` (visitors, revenue), `down` (bounce\n * rate, latency), `none` when a move is just information. @default \"up\"\n */\n deltaGood?: \"up\" | \"down\" | \"none\";\n /** What the delta is against — \"vs. 36.2K prior\". */\n note?: ReactNode;\n}\n\nconst percent = new Intl.NumberFormat(\"en-US\", {\n minimumFractionDigits: 1,\n maximumFractionDigits: 1,\n signDisplay: \"exceptZero\",\n});\n\n/**\n * A leading sign — ASCII or the true minus — sets a string delta's direction.\n * A signed zero (\"+0%\", \"−0.0%\") is still flat: a caller's formatter may\n * sign every value, and zero has not moved.\n */\nfunction directionOf(delta: number | string): StatDirection {\n if (typeof delta === \"number\") {\n return delta > 0 ? \"up\" : delta < 0 ? \"down\" : \"flat\";\n }\n const trimmed = delta.trim();\n const first = trimmed.charAt(0);\n const signed = first === \"+\" || first === \"-\" || first === \"−\";\n if (!signed) return \"flat\";\n const body = trimmed.slice(1).trim();\n if (Number.parseFloat(body) === 0 && !/[1-9]/.test(body)) return \"flat\";\n return first === \"+\" ? \"up\" : \"down\";\n}\n\nfunction deltaColor(\n direction: StatDirection,\n good: NonNullable<StatProps[\"deltaGood\"]>,\n): BadgeColor {\n if (direction === \"flat\" || good === \"none\") return \"muted\";\n return direction === good ? \"success\" : \"error\";\n}\n\nexport function Stat({\n label,\n value,\n delta,\n deltaDirection,\n deltaGood = \"up\",\n note,\n className,\n ...props\n}: StatProps) {\n const direction =\n delta == null ? null : (deltaDirection ?? directionOf(delta));\n const text =\n typeof delta === \"number\"\n ? // The true minus, so the sign reads at badge size.\n `${percent.format(delta).replace(\"-\", \"−\")}%`\n : delta;\n const Arrow =\n direction === \"up\"\n ? IconTrendingUp\n : direction === \"down\"\n ? IconTrendingDown\n : null;\n return (\n <div\n data-stat=\"\"\n className={cn(\"flex min-w-0 flex-col gap-1 px-5 py-4\", className)}\n {...props}\n >\n <div className=\"flex items-start justify-between gap-3\">\n <span className=\"text-pho-secondary min-w-0 truncate text-base\">\n {label}\n </span>\n {delta != null && direction != null && (\n <Badge\n size=\"sm\"\n contrast=\"low\"\n color={deltaColor(direction, deltaGood)}\n className=\"shrink-0 tabular-nums\"\n data-direction={direction}\n >\n {Arrow && <Arrow aria-hidden className=\"size-3\" />}\n {text}\n </Badge>\n )}\n </div>\n <span className=\"text-display-md text-pho-primary min-w-0 truncate font-medium\">\n {value}\n </span>\n {note != null && (\n <span className=\"text-pho-description truncate text-xs\">{note}</span>\n )}\n </div>\n );\n}\n\nStat.displayName = \"Stat\";\n\nexport interface StatGroupProps extends ComponentProps<\"div\"> {\n /**\n * `card` frames the row as a card of its own; `plain` keeps only the\n * hairlines between tiles, for a row inside a card or under a chart.\n * @default \"card\"\n */\n variant?: \"card\" | \"plain\";\n}\n\n/**\n * A row of tiles that reads as one card: hairlines between tiles, and\n * between rows once the tiles wrap on a narrow width. Each tile takes an\n * equal share of its row, never narrower than 12rem; a tile that wraps\n * alone stretches across its line, so the frame never shows a hole.\n */\nexport function StatGroup({\n variant = \"card\",\n className,\n ...props\n}: StatGroupProps) {\n return (\n <div\n // A row of figures is a group, not a form's fieldset: the role, and\n // the caller's `aria-label`, name it for assistive tech.\n // oxlint-disable-next-line jsx-a11y/prefer-tag-over-role\n role=\"group\"\n data-stat-group=\"\"\n className={cn(\n // The hairlines are the gap: the frame's secondary shows through\n // 1px between tiles, so wrapping rows get a rule too. Flex, not\n // grid: a grid's empty cells on the last row would show through.\n \"bg-pho-secondary [&>*]:bg-pho-primary flex flex-wrap gap-px [&>*]:min-w-0 [&>*]:flex-[1_1_12rem]\",\n variant === \"card\" &&\n \"border-pho-secondary rounded-base overflow-hidden border\",\n className,\n )}\n {...props}\n />\n );\n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B,MAAY,UACV,4DACFL,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AAEAG,EAAU,cAAc;AACxBV,EAAK,QAAQU"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t } from "./cn-
|
|
2
|
+
import { t } from "./cn-CPbhpG1q.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx as s, jsxs as n } from "react/jsx-runtime";
|
|
5
5
|
var p = "mx-auto flex w-fit max-w-lg min-w-0 flex-col items-start justify-center text-left", m = "flex flex-col", x = {
|
|
@@ -62,4 +62,4 @@ export {
|
|
|
62
62
|
p as t
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
-
//# sourceMappingURL=status-view-
|
|
65
|
+
//# sourceMappingURL=status-view-I_Y6eEyX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-view-I_Y6eEyX.js","names":["jsx","jsxs","STATUS_VIEW","STATUS_VIEW_COPY","STATUS_VIEW_SIZES","StatusView","icon","title","description","actions","size","className","props","slot","cn"],"sources":["../../src/components/status-view/status-view.tsx"],"sourcesContent":["import { type ComponentProps, type ReactNode } from \"react\";\nimport { cn } from \"../../utils/cn\";\n\n/**\n * Hugs its content (`w-fit`) and centers itself in the host (`mx-auto`); text\n * stays start-aligned so the icon / title / description share one left edge.\n * `max-w-lg` only caps long prose at Dialog width before it wraps.\n */\nexport const STATUS_VIEW =\n \"mx-auto flex w-fit max-w-lg min-w-0 flex-col items-start justify-center text-left\";\n\n/** Title + description group — flex column; gap comes from the size axis. */\nexport const STATUS_VIEW_COPY = \"flex flex-col\";\n\n/**\n * Size axis — retunes every slot. Title + description share Dialog's\n * `font-display` ladder: `base` matches Dialog (`gap-1`); `sm` steps one rung\n * down (`gap-0`) for cards and panels.\n */\nexport const STATUS_VIEW_SIZES = {\n sm: {\n description: \"Small — states inside cards and panels\",\n classes: {\n root: \"px-5 py-8\",\n icon: \"mb-1.5 *:size-6\",\n copy: \"gap-0\",\n title: \"text-base\",\n description: \"text-base\",\n actions: \"mt-5\",\n },\n },\n base: {\n description: \"Base — the default; full pages and large regions\",\n classes: {\n root: \"px-5 py-12\",\n icon: \"mb-4 *:size-10\",\n copy: \"gap-1\",\n title: \"text-display-sm\",\n description: \"text-display-xs\",\n actions: \"mt-5\",\n },\n },\n} satisfies Record<\n string,\n { description: string; classes: Record<string, string> }\n>;\n\nexport type StatusViewSize = keyof typeof STATUS_VIEW_SIZES;\n\ninterface StatusViewBaseProps {\n /** Decorative glyph above the title, usually a Tabler icon. Sized by the view (`*:size-*`), inked `text-pho-secondary`. */\n icon?: ReactNode;\n /** One short line naming the state (\"No API keys yet\", \"Page not found\"). */\n title: ReactNode;\n /** Supporting prose — what it means or what to do next. */\n description?: ReactNode;\n /** Optional action row (buttons / links). Empty states usually omit it. */\n actions?: ReactNode;\n /** Size variant. @default \"base\" */\n size?: StatusViewSize;\n}\n\nexport interface StatusViewProps\n extends\n StatusViewBaseProps,\n Omit<ComponentProps<\"div\">, keyof StatusViewBaseProps | \"children\"> {}\n\n/**\n * StatusView — the standing-in view for a region with nothing to show or\n * nothing that worked: icon over title over description, with an optional\n * action row. The block shrink-wraps and centers itself while its text stays\n * left-aligned; the host owns the footprint (a card body, or a `min-h-screen`\n * flex-centered page). Use `size=\"sm\"` inside cards, the default `base` for\n * whole pages.\n *\n * Empty and error states share this one component — they differ only in what\n * you pass:\n *\n * - **Empty** — usually no `icon` and no `actions`; the create affordance\n * lives elsewhere on the page.\n * - **Error** — pass a warning `icon`, `role=\"alert\"` so it announces, and\n * `actions` offering a way out (retry, reload, a route back).\n */\nexport function StatusView({\n icon,\n title,\n description,\n actions,\n size = \"base\",\n className,\n ...props\n}: StatusViewProps) {\n const slot = STATUS_VIEW_SIZES[size].classes;\n return (\n <div className={cn(STATUS_VIEW, slot.root, className)} {...props}>\n {icon != null && (\n <div aria-hidden className={cn(\"text-pho-secondary\", slot.icon)}>\n {icon}\n </div>\n )}\n <div className={cn(STATUS_VIEW_COPY, slot.copy)}>\n <div\n className={cn(\n \"text-pho-secondary font-display font-medium text-balance\",\n slot.title,\n )}\n >\n {title}\n </div>\n {description != null && (\n <div\n className={cn(\"text-pho-description font-normal\", slot.description)}\n >\n {description}\n </div>\n )}\n </div>\n {actions != null && (\n <div\n className={cn(\n \"flex flex-wrap items-center justify-start gap-2\",\n slot.actions,\n )}\n >\n {actions}\n </div>\n )}\n </div>\n );\n}\n\nStatusView.displayName = \"StatusView\";\n"],"mappings":";;;;AAQA,IAAaE,IACX,qFAGWC,IAAmB,iBAOnBC,IAAoB;AAAA,EAC/B,IAAI;AAAA,IACF,aAAa;AAAA,IACb,SAAS;AAAA,MACP,MAAM;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO;AAAA,MACP,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EACA,MAAM;AAAA,IACJ,aAAa;AAAA,IACb,SAAS;AAAA,MACP,MAAM;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO;AAAA,MACP,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,EACF;AACF;AAyCA,SAAgBC,EAAW,EACzB,MAAAC,GACA,OAAAC,GACA,aAAAC,GACA,SAAAC,GACA,MAAAC,IAAO,QACP,WAAAC,GACA,GAAGC,EAAA,GACe;AAClB,QAAMC,IAAOT,EAAkBM,CAAA,EAAM;AACrC,SACE,gBAAAT,EAAC,OAAD;AAAA,IAAK,WAAWa,EAAGZ,GAAaW,EAAK,MAAMF,CAAS;AAAA,IAAG,GAAIC;AAAA,IAA3D,UAAA;AAAA,MACGN,KAAQ,QACP,gBAAAN,EAAC,OAAD;AAAA,QAAK,eAAA;AAAA,QAAY,WAAWc,EAAG,sBAAsBD,EAAK,IAAI;AAAA,QAC3D,UAAAP;AAAA,MACE,CAAA;AAAA,MAEP,gBAAAL,EAAC,OAAD;AAAA,QAAK,WAAWa,EAAGX,GAAkBU,EAAK,IAAI;AAAA,QAA9C,UAAA,CACE,gBAAAb,EAAC,OAAD;AAAA,UACE,WAAWc,EACT,4DACAD,EAAK,KACP;AAAA,UAEC,UAAAN;AAAA,QACE,CAAA,GACJC,KAAe,QACd,gBAAAR,EAAC,OAAD;AAAA,UACE,WAAWc,EAAG,oCAAoCD,EAAK,WAAW;AAAA,UAEjE,UAAAL;AAAA,QACE,CAAA,CAEJ;AAAA,M;A,MACJC,KAAW,QACV,gBAAAT,EAAC,OAAD;AAAA,QACE,WAAWc,EACT,mDACAD,EAAK,OACP;AAAA,QAEC,UAAAJ;AAAA,MACE,CAAA;AAAA,IAEJ;AAAA,E;AAET;AAEAJ,EAAW,cAAc"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as n } from "./cn-
|
|
2
|
+
import { t as n } from "./cn-CPbhpG1q.js";
|
|
3
3
|
import { FADE_SWAP as _ } from "../motion.js";
|
|
4
|
-
import { n as y } from "./spinner-
|
|
5
|
-
import { a as b } from "./button-
|
|
6
|
-
import { t as i } from "./createReactComponent-
|
|
7
|
-
import { t as w } from "./IconX-
|
|
8
|
-
import { n as k } from "./scroll-area-
|
|
4
|
+
import { n as y } from "./spinner-BSutFL4l.js";
|
|
5
|
+
import { a as b } from "./button-CLfWdqm-.js";
|
|
6
|
+
import { t as i } from "./createReactComponent-yKZn9MIX.js";
|
|
7
|
+
import { t as w } from "./IconX-DnPlFC68.js";
|
|
8
|
+
import { n as k } from "./scroll-area-Dhl5hqay.js";
|
|
9
9
|
import "react";
|
|
10
10
|
import { jsx as t, jsxs as l } from "react/jsx-runtime";
|
|
11
11
|
import { AnimatePresence as z, motion as T, useReducedMotion as N } from "motion/react";
|
|
@@ -162,4 +162,4 @@ export {
|
|
|
162
162
|
tt as t
|
|
163
163
|
};
|
|
164
164
|
|
|
165
|
-
//# sourceMappingURL=toast-
|
|
165
|
+
//# sourceMappingURL=toast-DrLKzrDJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast-DrLKzrDJ.js","names":["__iconNode","__iconNode","__iconNode","BaseToast","Toast","cn","FADE_SWAP","Spinner","Button","createReactComponent","IconX","BLUR_MAX_PX","jsx","jsxs","AnimatePresence","motion","useReducedMotion","Toast","__iconNode$3","IconAlertOctagonFilled","__iconNode$2","IconAlertTriangleFilled","__iconNode$1","IconCircleCheckFilled","__iconNode","IconInfoCircleFilled","FACE_SWAP","Provider","Portal","Action","useToastManager","createToastManager","TOAST_ICONS","TOAST_WASH","Viewport","className","props","Root","Content","Title","Description","Close","TypeIcon","type","Glyph","ToastyList","toasts","close","blurAway","toast","event","Toasty","children","toastManager","Toast$1"],"sources":["../../../../node_modules/.pnpm/@tabler+icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertOctagonFilled.mjs","../../../../node_modules/.pnpm/@tabler+icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangleFilled.mjs","../../../../node_modules/.pnpm/@tabler+icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleCheckFilled.mjs","../../../../node_modules/.pnpm/@tabler+icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircleFilled.mjs","../../src/components/toast/toast.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\": \"M14.897 1a4 4 0 0 1 2.664 1.016l.165 .156l4.1 4.1a4 4 0 0 1 1.168 2.605l.006 .227v5.794a4 4 0 0 1 -1.016 2.664l-.156 .165l-4.1 4.1a4 4 0 0 1 -2.603 1.168l-.227 .006h-5.795a3.999 3.999 0 0 1 -2.664 -1.017l-.165 -.156l-4.1 -4.1a4 4 0 0 1 -1.168 -2.604l-.006 -.227v-5.794a4 4 0 0 1 1.016 -2.664l.156 -.165l4.1 -4.1a4 4 0 0 1 2.605 -1.168l.227 -.006h5.793zm-2.887 14l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm-.01 -8a1 1 0 0 0 -.993 .883l-.007 .117v4l.007 .117a1 1 0 0 0 1.986 0l.007 -.117v-4l-.007 -.117a1 1 0 0 0 -.993 -.883z\", \"key\": \"svg-0\" }]];\nconst IconAlertOctagonFilled = createReactComponent(\"filled\", \"alert-octagon-filled\", \"AlertOctagonFilled\", __iconNode);\n\nexport { __iconNode, IconAlertOctagonFilled as default };\n","/**\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 1.67c.955 0 1.845 .467 2.39 1.247l.105 .16l8.114 13.548a2.914 2.914 0 0 1 -2.307 4.363l-.195 .008h-16.225a2.914 2.914 0 0 1 -2.582 -4.2l.099 -.185l8.11 -13.538a2.914 2.914 0 0 1 2.491 -1.403zm.01 13.33l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm-.01 -7a1 1 0 0 0 -.993 .883l-.007 .117v4l.007 .117a1 1 0 0 0 1.986 0l.007 -.117v-4l-.007 -.117a1 1 0 0 0 -.993 -.883z\", \"key\": \"svg-0\" }]];\nconst IconAlertTriangleFilled = createReactComponent(\"filled\", \"alert-triangle-filled\", \"AlertTriangleFilled\", __iconNode);\n\nexport { __iconNode, IconAlertTriangleFilled as default };\n","/**\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\": \"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.293 5.953a1 1 0 0 0 -1.32 -.083l-.094 .083l-3.293 3.292l-1.293 -1.292l-.094 -.083a1 1 0 0 0 -1.403 1.403l.083 .094l2 2l.094 .083a1 1 0 0 0 1.226 0l.094 -.083l4 -4l.083 -.094a1 1 0 0 0 -.083 -1.32z\", \"key\": \"svg-0\" }]];\nconst IconCircleCheckFilled = createReactComponent(\"filled\", \"circle-check-filled\", \"CircleCheckFilled\", __iconNode);\n\nexport { __iconNode, IconCircleCheckFilled as default };\n","/**\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 2c5.523 0 10 4.477 10 10a10 10 0 0 1 -19.995 .324l-.005 -.324l.004 -.28c.148 -5.393 4.566 -9.72 9.996 -9.72zm0 9h-1l-.117 .007a1 1 0 0 0 0 1.986l.117 .007v3l.007 .117a1 1 0 0 0 .876 .876l.117 .007h1l.117 -.007a1 1 0 0 0 .876 -.876l.007 -.117l-.007 -.117a1 1 0 0 0 -.764 -.857l-.112 -.02l-.117 -.006v-3l-.007 -.117a1 1 0 0 0 -.876 -.876l-.117 -.007zm.01 -3l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z\", \"key\": \"svg-0\" }]];\nconst IconInfoCircleFilled = createReactComponent(\"filled\", \"info-circle-filled\", \"InfoCircleFilled\", __iconNode);\n\nexport { __iconNode, IconInfoCircleFilled as default };\n","import { type ComponentProps, type ElementType, type ReactNode } from \"react\";\nimport { FADE_SWAP } from \"../../motion\";\nimport { Toast as BaseToast } from \"@base-ui/react/toast\";\nimport { AnimatePresence, motion, useReducedMotion } from \"motion/react\";\nimport {\n IconAlertOctagonFilled,\n IconAlertTriangleFilled,\n IconCircleCheckFilled,\n IconInfoCircleFilled,\n IconX,\n type Icon,\n} from \"@tabler/icons-react\";\nimport { BLUR_MAX_PX } from \"../scroll-area\";\nimport { Button } from \"../button\";\nimport { Spinner } from \"../spinner\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\n/** The system's swap: fade through the 1px soft focus, ease-out. */\nconst FACE_SWAP = FADE_SWAP;\n\nconst Provider = BaseToast.Provider;\nconst Portal = BaseToast.Portal;\nconst Action = BaseToast.Action;\n\n/** Imperative toast API: `const toast = useToastManager(); toast.add({ title })`. */\nconst useToastManager = BaseToast.useToastManager;\nconst createToastManager = BaseToast.createToastManager;\n\n/**\n * Status glyphs per toast `type` (Kumo's set in Tabler's hand): the glyph\n * and the title take the status ink, the hairline tints with it, and a\n * translucent wash of the same ink sits over the surface. `info` speaks\n * in the brand ink — Pho has no separate info hue. `loading` is what\n * `manager.promise` shows while the work runs.\n */\nconst TOAST_ICONS: Record<string, Icon> = {\n success: IconCircleCheckFilled,\n error: IconAlertOctagonFilled,\n warning: IconAlertTriangleFilled,\n info: IconInfoCircleFilled,\n};\n\nconst TOAST_WASH: Record<string, string> = {\n success:\n \"bg-[color-mix(in_oklab,var(--text-color-pho-success)_7%,transparent)]\",\n error: \"bg-[color-mix(in_oklab,var(--text-color-pho-error)_7%,transparent)]\",\n warning:\n \"bg-[color-mix(in_oklab,var(--text-color-pho-warning)_7%,transparent)]\",\n info: \"bg-[color-mix(in_oklab,var(--text-color-pho-brand)_7%,transparent)]\",\n};\n\nfunction Viewport({\n className,\n ...props\n}: StyledProps<typeof BaseToast.Viewport>) {\n return (\n <BaseToast.Viewport\n // The stack's anchor box; the cards position themselves absolutely\n // against its bottom edge, and hovering any card expands the stack.\n className={cn(\n \"fixed right-4 bottom-4 z-50 flex w-[calc(100%-2rem)] outline-none sm:w-[22rem]\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Root({ className, ...props }: StyledProps<typeof BaseToast.Root>) {\n return (\n <BaseToast.Root\n className={cn(\n // Floating layer: keeps its elevation shadow, sits on the card surface\n // with the site hairline (ring-pho-secondary).\n \"bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-secondary rounded-base absolute right-0 bottom-0 w-full origin-bottom ring-1 select-none ring-inset\",\n // Kumo's stack math on Base UI's variables: a 12px gap folded into\n // the expanded offsets, a 12px peek and −10% scale per depth at\n // rest, the newest card on top.\n \"[--gap:0.75rem] [--height:var(--toast-frontmost-height,var(--toast-height))] [--peek:0.75rem] [--scale:calc(max(0,1-(var(--toast-index)*0.1)))] [--shrink:calc(1-var(--scale))]\",\n \"[--offset-y:calc(var(--toast-offset-y)*-1+var(--toast-index)*var(--gap)*-1+var(--toast-swipe-movement-y,0px))]\",\n \"[z-index:calc(1000-var(--toast-index))] h-[var(--height)]\",\n \"[transform:translateX(var(--toast-swipe-movement-x,0px))_translateY(calc(var(--toast-swipe-movement-y,0px)-(var(--toast-index)*var(--peek))-(var(--shrink)*var(--height))))_scale(var(--scale))]\",\n \"[transition:transform_0.5s_cubic-bezier(0.22,1,0.36,1),opacity_0.5s,height_0.15s,box-shadow_0.2s_ease-out]\",\n // Invisible bridge below each card so the hover survives the gaps.\n \"after:absolute after:top-full after:left-0 after:h-[calc(var(--gap)+1px)] after:w-full after:content-['']\",\n // Hovering (or focusing) the stack expands it into a true list.\n \"data-[expanded]:h-[var(--toast-height)] data-[expanded]:[transform:translateX(var(--toast-swipe-movement-x,0px))_translateY(var(--offset-y))]\",\n // Beyond the provider's limit a card parks invisibly until room frees.\n \"data-[limited]:opacity-0\",\n // In from below; out along the swipe, or back down when timed out.\n \"data-[starting-style]:[transform:translateY(150%)]\",\n \"data-[ending-style]:opacity-0\",\n \"[&[data-ending-style]:not([data-limited]):not([data-swipe-direction])]:[transform:translateY(150%)]\",\n \"data-[ending-style]:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y,0px)+150%))]\",\n \"data-[ending-style]:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y,0px)-150%))]\",\n \"data-[ending-style]:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x,0px)-150%))_translateY(var(--offset-y))]\",\n \"data-[ending-style]:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x,0px)+150%))_translateY(var(--offset-y))]\",\n \"data-[swiping]:[transition:none]\",\n // Status inks: hairline, glyph, and title tint together per type.\n \"data-[type=success]:[&_[data-toast-icon]]:text-pho-success data-[type=success]:[&_[data-toast-title]]:text-pho-success data-[type=success]:[&_[data-toast-action]]:text-pho-success data-[type=success]:[&_[data-toast-close]]:text-pho-success data-[type=success]:ring-[color-mix(in_oklab,var(--text-color-pho-success)_45%,transparent)] data-[type=success]:[&_[data-toast-action]]:ring-[color-mix(in_oklab,var(--text-color-pho-success)_45%,transparent)]\",\n \"data-[type=error]:[&_[data-toast-icon]]:text-pho-error data-[type=error]:[&_[data-toast-title]]:text-pho-error data-[type=error]:[&_[data-toast-action]]:text-pho-error data-[type=error]:[&_[data-toast-close]]:text-pho-error data-[type=error]:ring-[color-mix(in_oklab,var(--text-color-pho-error)_45%,transparent)] data-[type=error]:[&_[data-toast-action]]:ring-[color-mix(in_oklab,var(--text-color-pho-error)_45%,transparent)]\",\n \"data-[type=warning]:[&_[data-toast-icon]]:text-pho-warning data-[type=warning]:[&_[data-toast-title]]:text-pho-warning data-[type=warning]:[&_[data-toast-action]]:text-pho-warning data-[type=warning]:[&_[data-toast-close]]:text-pho-warning data-[type=warning]:ring-[color-mix(in_oklab,var(--text-color-pho-warning)_45%,transparent)] data-[type=warning]:[&_[data-toast-action]]:ring-[color-mix(in_oklab,var(--text-color-pho-warning)_45%,transparent)]\",\n \"data-[type=info]:[&_[data-toast-icon]]:text-pho-brand data-[type=info]:[&_[data-toast-title]]:text-pho-brand data-[type=info]:[&_[data-toast-action]]:text-pho-brand data-[type=info]:[&_[data-toast-close]]:text-pho-brand data-[type=info]:ring-[color-mix(in_oklab,var(--text-color-pho-brand)_45%,transparent)] data-[type=info]:[&_[data-toast-action]]:ring-[color-mix(in_oklab,var(--text-color-pho-brand)_45%,transparent)]\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Content({\n className,\n ...props\n}: StyledProps<typeof BaseToast.Content>) {\n return (\n <BaseToast.Content\n // Cards behind the front one show only their peeking edge — the\n // words appear when the stack expands.\n className={cn(\n \"isolate flex flex-col p-4 pr-10 transition-opacity [transition-duration:250ms]\",\n \"data-[behind]:pointer-events-none data-[behind]:opacity-0 data-[expanded]:pointer-events-auto data-[expanded]:opacity-100\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Title({ className, ...props }: StyledProps<typeof BaseToast.Title>) {\n return (\n <BaseToast.Title\n data-toast-title\n className={cn(\"text-pho-primary text-md font-medium\", className)}\n {...props}\n />\n );\n}\n\nfunction Description({\n className,\n ...props\n}: StyledProps<typeof BaseToast.Description>) {\n return (\n <BaseToast.Description\n className={cn(\"text-pho-description text-md\", className)}\n {...props}\n />\n );\n}\n\nfunction Close({ className, ...props }: StyledProps<typeof BaseToast.Close>) {\n return (\n <BaseToast.Close\n data-toast-close\n className={cn(\n \"text-pho-secondary hover:text-pho-secondary-hover hover:bg-pho-ghost-hover outline-pho-brand absolute top-2.5 right-2.5 flex size-6 cursor-pointer items-center justify-center rounded-sm transition focus-visible:outline-2 [&>svg]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * The status glyph for a typed toast — its own row above the title, the\n * Dialog header's arrangement at card scale, an 8px breath before the\n * title. `loading` shows the spinner.\n */\nfunction TypeIcon({ type }: { type?: string }) {\n if (type === \"loading\") {\n return <Spinner aria-hidden className=\"mb-2 size-6 shrink-0\" />;\n }\n const Glyph = type != null ? TOAST_ICONS[type] : undefined;\n if (Glyph == null) return null;\n return <Glyph aria-hidden data-toast-icon className=\"mb-2 size-6 shrink-0\" />;\n}\n\nfunction ToastyList() {\n const { toasts, close } = BaseToast.useToastManager();\n const reduceMotion = useReducedMotion();\n const blurAway = reduceMotion ? \"blur(0px)\" : `blur(${BLUR_MAX_PX}px)`;\n return toasts.map((toast) => (\n <Root key={toast.id} toast={toast}>\n {/* The status wash: a breath of the status ink over the surface. */}\n <div\n aria-hidden\n className={cn(\n \"pointer-events-none absolute inset-0 rounded-[inherit] transition-colors duration-200 ease-out\",\n toast.type != null ? TOAST_WASH[toast.type] : undefined,\n )}\n />\n <Content>\n {/* One grid cell, faces stacked: when a promise walks the card\n from loading to its outcome, the old face fades out through\n the system's soft focus exactly where the new one fades in —\n the values ride each face, so the goer keeps its words. */}\n <span className=\"grid\">\n <AnimatePresence initial={false}>\n <motion.div\n key={`${toast.type ?? \"\"}|${String(toast.title ?? \"\")}`}\n className=\"flex min-w-0 flex-col [grid-area:1/1]\"\n initial={{ opacity: 0, filter: blurAway }}\n animate={{ opacity: 1, filter: \"blur(0px)\" }}\n exit={{ opacity: 0, filter: blurAway }}\n transition={FACE_SWAP}\n >\n <TypeIcon type={toast.type} />\n <Title>{toast.title}</Title>\n <Description>{toast.description}</Description>\n {toast.actionProps != null ? (\n <Action\n data-toast-action\n render={<Button variant=\"outlined\" size=\"sm\" />}\n className=\"mt-2 self-start\"\n onClick={(event) => {\n toast.actionProps?.onClick?.(event);\n close(toast.id);\n }}\n >\n {toast.actionProps.children}\n </Action>\n ) : null}\n </motion.div>\n </AnimatePresence>\n </span>\n </Content>\n <Close aria-label=\"Dismiss\">\n <IconX />\n </Close>\n </Root>\n ));\n}\n\n/**\n * Toasty — the whole toast system in one wrapper, Kumo-shaped: provider,\n * portal, viewport, and the stacked card list with status variants. Wrap\n * the app once and call `Toast.useToastManager().add({ title, type })`\n * from any child; pass a `toastManager` from `createToastManager()` so\n * code outside the tree (a form's auto-save, a query cache) can speak\n * through the same lane. `manager.promise` shows loading → success/error\n * with the matching glyphs.\n */\nexport function Toasty({\n children,\n toastManager,\n}: {\n children?: ReactNode;\n toastManager?: ComponentProps<typeof BaseToast.Provider>[\"toastManager\"];\n}) {\n return (\n <Provider toastManager={toastManager}>\n {children}\n <Portal>\n <Viewport>\n <ToastyList />\n </Viewport>\n </Portal>\n </Provider>\n );\n}\n\n/**\n * Toast built on Base UI `Toast` — transient, non-blocking notifications\n * in a sonner-style stack, styled after Cloudflare's Kumo: at rest the\n * cards collapse into a peek (12px rise and −10% scale per depth, words\n * hidden behind the front card), expand into a true list with a 12px gap\n * on hover or focus, swipe to dismiss, three visible at most. `type`\n * (`success` / `error` / `warning` / `info` / `loading`) tints hairline,\n * glyph, and title together. Reach for `Toasty` unless you need to\n * compose the parts yourself.\n */\nexport const Toast = {\n Provider,\n Portal,\n Viewport,\n Root,\n Content,\n Title,\n Description,\n Close,\n Action,\n useToastManager,\n createToastManager,\n};\n"],"ignoreList":[0,1,2,3],"mappings":";;;;;;;;;;;;AASA,IAAMA,IAAa,CAAC,CAAC,QAAQ;AAAA,EAAE,GAAK;AAAA,EAAujB,KAAO;AAAQ,CAAC,CAAC,GACtmBmB,IAAyBV,EAAqB,UAAU,wBAAwB,sBAAsBT,CAAU,GCDhHC,IAAa,CAAC,CAAC,QAAQ;AAAA,EAAE,GAAK;AAAA,EAA0Z,KAAO;AAAQ,CAAC,CAAC,GACzcoB,IAA0BZ,EAAqB,UAAU,yBAAyB,uBAAuBR,CAAU,GCDnHC,IAAa,CAAC,CAAC,QAAQ;AAAA,EAAE,GAAK;AAAA,EAAgS,KAAO;AAAQ,CAAC,CAAC,GAC/UqB,IAAwBd,EAAqB,UAAU,uBAAuB,qBAAqBP,CAAU,GCD7GsB,IAAa,CAAC,CAAC,QAAQ;AAAA,EAAE,GAAK;AAAA,EAA6b,KAAO;AAAQ,CAAC,CAAC,GAC5eC,IAAuBhB,EAAqB,UAAU,sBAAsB,oBAAoBe,CAAU,GCgB1GE,IAAYpB,GAEZqB,IAAWxB,EAAU,UACrByB,IAASzB,EAAU,QACnB0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B,GAAD,EAAA,UACE,gBAAAhB,EAACsB,GAAD,EAAA,UACE,gBAAAtB,EAACiC,GAAD,CAAa,CAAA,EACL,CAAA,EACJ,CAAA,CACA;AAAA,E;AAEd;AAYA,IAAazC,KAAQ;AAAA,EACnB,UAAAuB;AAAA,EACA,QAAAC;AAAA,EACA,UAAAM;AAAA,EACA,MAAAG;AAAA,EACA,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,OAAAC;AAAA,EACA,QAAAZ;AAAA,EACA,iBAAAC;AAAA,EACA,oBAAAC;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as o } from "./cn-
|
|
2
|
+
import { t as o } from "./cn-CPbhpG1q.js";
|
|
3
3
|
import { t as i } from "./resolve-variant-CcD8iG5l.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx as r } from "react/jsx-runtime";
|
|
@@ -30,4 +30,4 @@ export {
|
|
|
30
30
|
n as t
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
//# sourceMappingURL=toggle-
|
|
33
|
+
//# sourceMappingURL=toggle-Ca4SS3YD.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle-Ca4SS3YD.js","names":["Toggle","BaseToggle","cn","resolveVariant","jsx","Toggle","TOGGLE_SIZES","Toggle$1","className","size","props"],"sources":["../../src/components/toggle/toggle.tsx"],"sourcesContent":["import { type ComponentProps } from \"react\";\nimport { Toggle as BaseToggle } from \"@base-ui/react/toggle\";\nimport { cn } from \"../../utils/cn\";\nimport { resolveVariant, type VariantMap } from \"../../utils/resolve-variant\";\n\n/**\n * Size axis — three heights. An icon-only toggle is square (the padding\n * plus the icon add up to the height); one carrying a short label — a\n * range picker's `7d` — grows to fit it. `md` is default.\n */\nexport const TOGGLE_SIZES = {\n sm: {\n classes: \"h-8 min-w-8 px-2 text-xs [&>svg]:size-4\",\n description: \"Small — dense toolbars, a range picker\",\n },\n md: {\n classes: \"h-9 min-w-9 px-2 text-base [&>svg]:size-5\",\n description: \"Medium — the default\",\n },\n lg: {\n classes: \"h-10 min-w-10 px-2.5 text-base [&>svg]:size-5\",\n description: \"Large\",\n },\n} satisfies VariantMap;\n\nexport type ToggleSize = keyof typeof TOGGLE_SIZES;\n\nexport interface ToggleProps extends Omit<\n ComponentProps<typeof BaseToggle>,\n \"className\"\n> {\n className?: string;\n /** Size variant. @default \"md\" */\n size?: ToggleSize;\n}\n\n/**\n * A two-state button (pressed / not pressed) built on Base UI `Toggle` — the\n * canonical Bold/Italic toolbar control. Controlled via `pressed` /\n * `onPressedChange` or uncontrolled via `defaultPressed`. For a set of related\n * toggles, use `ToggleGroup`.\n */\nexport function Toggle({ className, size = \"md\", ...props }: ToggleProps) {\n return (\n <BaseToggle\n className={cn(\n \"squircle outline-pho-brand text-pho-secondary rounded-base inline-flex cursor-pointer items-center justify-center gap-1.5 font-medium whitespace-nowrap transition duration-100 ease-linear focus-visible:outline-2 focus-visible:outline-offset-2\",\n // Ghost control at rest — hover is the alpha wash (Button `tertiary`\n // idiom), not the card-surface hover token.\n \"hover:bg-pho-ghost-hover hover:text-pho-secondary-hover\",\n // Pressed = the site's inverted chip (Tab active): dark chip in light\n // mode, light chip in dark mode — visible on any surface.\n \"data-[pressed]:bg-pho-inverse data-[pressed]:text-pho-inverse\",\n \"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50\",\n resolveVariant(TOGGLE_SIZES, size),\n className,\n )}\n {...props}\n />\n );\n}\n\nToggle.displayName = \"Toggle\";\n"],"mappings":";;;;;;AAUA,IAAaM,IAAe;AAAA,EAC1B,IAAI;AAAA,IACF,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AAAA,EACA,IAAI;AAAA,IACF,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AAAA,EACA,IAAI;AAAA,IACF,SAAS;AAAA,IACT,aAAa;AAAA,EACf;AACF;AAmBA,SAAgBN,EAAO,EAAE,WAAAQ,GAAW,MAAAC,IAAO,MAAM,GAAGC,EAAA,GAAsB;AACxE,SACE,gBAAAN,EAACH,GAAD;AAAA,IACE,WAAWC,EACT,sPAGA,2DAGA,iEACA,iEACAC,EAAeG,GAAcG,CAAI,GACjCD,CACF;AAAA,IACA,GAAIE;AAAA,EACL,CAAA;AAEL;AAEAH,EAAO,cAAc"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as a } from "./cn-
|
|
2
|
+
import { t as a } from "./cn-CPbhpG1q.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx as i } from "react/jsx-runtime";
|
|
5
5
|
import { Tooltip as r } from "@base-ui/react/tooltip";
|
|
@@ -29,4 +29,4 @@ export {
|
|
|
29
29
|
f as t
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
//# sourceMappingURL=tooltip-
|
|
32
|
+
//# sourceMappingURL=tooltip-4J1PUJmB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip-4J1PUJmB.js","names":["BaseTooltip","Tooltip","cn","jsx","Tooltip","Provider","Root","Trigger","Portal","Positioner","className","sideOffset","props","Popup","Tooltip$1"],"sources":["../../src/components/tooltip/tooltip.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { Tooltip as BaseTooltip } from \"@base-ui/react/tooltip\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nconst Provider = BaseTooltip.Provider;\nconst Root = BaseTooltip.Root;\nconst Trigger = BaseTooltip.Trigger;\nconst Portal = BaseTooltip.Portal;\n\nfunction Positioner({\n className,\n sideOffset = 6,\n ...props\n}: StyledProps<typeof BaseTooltip.Positioner>) {\n return (\n <BaseTooltip.Positioner\n sideOffset={sideOffset}\n className={cn(\"z-50\", className)}\n {...props}\n />\n );\n}\n\nfunction Popup({ className, ...props }: StyledProps<typeof BaseTooltip.Popup>) {\n return (\n <BaseTooltip.Popup\n className={cn(\n // Floating layer: bg-pho-primary surface, pho-secondary hairline ring, keeps shadow elevation.\n \"bg-pho-primary text-pho-secondary shadow-pho-lg ring-pho-secondary rounded-base origin-[var(--transform-origin)] px-2.5 py-1.5 text-xs font-medium ring-1 transition-[transform,opacity] duration-150 ease-out ring-inset\",\n \"data-[starting-style]:scale-95 data-[starting-style]:opacity-0\",\n \"data-[ending-style]:scale-95 data-[ending-style]:opacity-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Tooltip built on Base UI `Tooltip` — a brief, hover/focus-triggered label for\n * an icon or control. Wrap your app (or a subtree) in `Tooltip.Provider` to\n * share open/close timing. The trigger must be a focusable element. Never put\n * essential or interactive content in a tooltip; use `Popover` for that.\n */\nexport const Tooltip = { Provider, Root, Trigger, Portal, Positioner, Popup };\n"],"mappings":";;;;;AAYA,IAAMK,IAAWL,EAAY,UACvBM,IAAON,EAAY,MACnBO,IAAUP,EAAY,SACtBQ,IAASR,EAAY;AAE3B,SAASS,EAAW,EAClB,WAAAC,GACA,YAAAC,IAAa,GACb,GAAGC,EAAA,GAC0C;AAC7C,SACE,gBAAAT,EAACH,EAAY,YAAb;AAAA,IACc,YAAAW;AAAA,IACZ,WAAWT,EAAG,QAAQQ,CAAS;AAAA,IAC/B,GAAIE;AAAA,EACL,CAAA;AAEL;AAEA,SAASC,EAAM,EAAE,WAAAH,GAAW,GAAGE,EAAA,GAAgD;AAC7E,SACE,gBAAAT,EAACH,EAAY,OAAb;AAAA,IACE,WAAWE,EAET,6NACA,kEACA,8DACAQ,CACF;AAAA,IACA,GAAIE;AAAA,EACL,CAAA;AAEL;AAQA,IAAaX,IAAU;AAAA,EAAE,UAAAI;AAAA,EAAU,MAAAC;AAAA,EAAM,SAAAC;AAAA,EAAS,QAAAC;AAAA,EAAQ,YAAAC;AAAA,EAAY,OAAAI;AAAM"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as S } from "./cn-
|
|
3
|
-
import { t as j } from "./createReactComponent-
|
|
4
|
-
import { t as Ie } from "./IconChevronDown-
|
|
5
|
-
import { t as He } from "./IconChevronRight-
|
|
6
|
-
import { t as Te } from "./IconChevronUp-
|
|
7
|
-
import { t as Ze } from "./IconX-
|
|
8
|
-
import { t as ge } from "./collapsible-
|
|
9
|
-
import { t as he } from "./skeleton-
|
|
2
|
+
import { t as S } from "./cn-CPbhpG1q.js";
|
|
3
|
+
import { t as j } from "./createReactComponent-yKZn9MIX.js";
|
|
4
|
+
import { t as Ie } from "./IconChevronDown-Cd68NnX2.js";
|
|
5
|
+
import { t as He } from "./IconChevronRight-BNkXCTk6.js";
|
|
6
|
+
import { t as Te } from "./IconChevronUp-Bxllwz8J.js";
|
|
7
|
+
import { t as Ze } from "./IconX-DnPlFC68.js";
|
|
8
|
+
import { t as ge } from "./collapsible-C2tn_b1Q.js";
|
|
9
|
+
import { t as he } from "./skeleton-CqZlGphn.js";
|
|
10
10
|
import { i as Je, n as Ye, r as Qe, t as qe } from "./chrome-Ds7WykBJ.js";
|
|
11
|
-
import { t as et } from "./ghost-search-
|
|
12
|
-
import { i as tt, r as nt } from "./badge-
|
|
11
|
+
import { t as et } from "./ghost-search-CMUI2UH0.js";
|
|
12
|
+
import { i as tt, r as nt } from "./badge-CVViIYj_.js";
|
|
13
13
|
import { createContext as de, useCallback as F, useContext as ue, useEffect as ae, useId as at, useMemo as O, useRef as fe, useState as Y } from "react";
|
|
14
14
|
import { Fragment as Ee, jsx as s, jsxs as N } from "react/jsx-runtime";
|
|
15
15
|
import { useRender as q } from "@base-ui/react/use-render";
|
|
@@ -1716,4 +1716,4 @@ export {
|
|
|
1716
1716
|
$t as z
|
|
1717
1717
|
};
|
|
1718
1718
|
|
|
1719
|
-
//# sourceMappingURL=trace-
|
|
1719
|
+
//# sourceMappingURL=trace-D9F0sne7.js.map
|