@photon-ai/pho-ui 4.18.4 → 4.18.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/chunks/{IconAlertCircleFilled-VxKU8TYK.js → IconAlertCircleFilled-D6mUlVaE.js} +2 -2
- package/dist/chunks/IconAlertCircleFilled-D6mUlVaE.js.map +1 -0
- package/dist/chunks/{IconArrowUpRight-DGgKzQwV.js → IconArrowUpRight-OK8Fp0KQ.js} +2 -2
- package/dist/chunks/IconArrowUpRight-OK8Fp0KQ.js.map +1 -0
- package/dist/chunks/{IconCheck-D2WuculQ.js → IconCheck-DwSMn1wK.js} +2 -2
- package/dist/chunks/IconCheck-DwSMn1wK.js.map +1 -0
- package/dist/chunks/{IconChevronDown-CZilB71T.js → IconChevronDown-Cd68NnX2.js} +2 -2
- package/dist/chunks/IconChevronDown-Cd68NnX2.js.map +1 -0
- package/dist/chunks/{IconChevronLeft-CSWMKQ4C.js → IconChevronLeft-CptqhdxO.js} +2 -2
- package/dist/chunks/IconChevronLeft-CptqhdxO.js.map +1 -0
- package/dist/chunks/{IconChevronRight-CzoJnYNI.js → IconChevronRight-BNkXCTk6.js} +2 -2
- package/dist/chunks/IconChevronRight-BNkXCTk6.js.map +1 -0
- package/dist/chunks/{IconChevronUp-CrpWSgIl.js → IconChevronUp-Bxllwz8J.js} +2 -2
- package/dist/chunks/IconChevronUp-Bxllwz8J.js.map +1 -0
- package/dist/chunks/{IconInfoCircle-L0zfhg7R.js → IconInfoCircle-CTAynhe8.js} +2 -2
- package/dist/chunks/IconInfoCircle-CTAynhe8.js.map +1 -0
- package/dist/chunks/{IconSearch-BKAHkLyX.js → IconSearch-DkcWWZ1H.js} +2 -2
- package/dist/chunks/IconSearch-DkcWWZ1H.js.map +1 -0
- package/dist/chunks/{IconX-pZ9vrtSr.js → IconX-DnPlFC68.js} +2 -2
- package/dist/chunks/IconX-DnPlFC68.js.map +1 -0
- package/dist/chunks/animated-height-zr7BmFY1.js.map +1 -1
- package/dist/chunks/{avatar-BkmGDIqf.js → avatar-PgBOfszL.js} +4 -4
- package/dist/chunks/avatar-PgBOfszL.js.map +1 -0
- package/dist/chunks/{badge-DlLJPLeZ.js → badge-CVViIYj_.js} +2 -2
- package/dist/chunks/badge-CVViIYj_.js.map +1 -0
- package/dist/chunks/{bar-chart-CNCmuhQV.js → bar-chart-ZNuOoH7c.js} +2 -2
- package/dist/chunks/bar-chart-ZNuOoH7c.js.map +1 -0
- package/dist/chunks/{basic-page-D_Wgu2pJ.js → basic-page-BKvtEQkZ.js} +20 -20
- package/dist/chunks/basic-page-BKvtEQkZ.js.map +1 -0
- package/dist/chunks/{box-search-C9EVZgcb.js → box-search-CMl5bQ7Y.js} +5 -5
- package/dist/chunks/box-search-CMl5bQ7Y.js.map +1 -0
- package/dist/chunks/{bubble-eaoLJP4N.js → bubble-D88Edlgj.js} +2 -2
- package/dist/chunks/bubble-D88Edlgj.js.map +1 -0
- package/dist/chunks/{button-C9VqBBIr.js → button-CLfWdqm-.js} +3 -3
- package/dist/chunks/button-CLfWdqm-.js.map +1 -0
- package/dist/chunks/{calendar-4OFiCLAv.js → calendar-DDWITGo4.js} +7 -7
- package/dist/chunks/calendar-DDWITGo4.js.map +1 -0
- package/dist/chunks/{card-N-tvFsuV.js → card-zyRAihYE.js} +2 -2
- package/dist/chunks/{card-N-tvFsuV.js.map → card-zyRAihYE.js.map} +1 -1
- package/dist/chunks/{chart-B5wjhkBu.js → chart-Btnw7KXV.js} +3 -3
- package/dist/chunks/chart-Btnw7KXV.js.map +1 -0
- package/dist/chunks/{chat-Bu8UyIbT.js → chat-ZUzGmTWE.js} +11 -11
- package/dist/chunks/chat-ZUzGmTWE.js.map +1 -0
- package/dist/chunks/{checkbox-CwvoEJhd.js → checkbox-DpWLbKVS.js} +2 -2
- package/dist/chunks/checkbox-DpWLbKVS.js.map +1 -0
- package/dist/chunks/choice-card-_Ocs0iUj.js.map +1 -1
- package/dist/chunks/chrome-Ds7WykBJ.js.map +1 -1
- package/dist/chunks/{close-button-GvqWbLl0.js → close-button-Ck4rY1Fp.js} +3 -3
- package/dist/chunks/close-button-Ck4rY1Fp.js.map +1 -0
- package/dist/chunks/{cn-ChIgwEl3.js → cn-CPbhpG1q.js} +162 -83
- package/dist/chunks/cn-CPbhpG1q.js.map +1 -0
- package/dist/chunks/{code-block-DekLMMtV.js → code-block-Yxg2wZGJ.js} +10 -10
- package/dist/chunks/code-block-Yxg2wZGJ.js.map +1 -0
- package/dist/chunks/{collapsible-Dv306QOT.js → collapsible-C2tn_b1Q.js} +2 -2
- package/dist/chunks/collapsible-C2tn_b1Q.js.map +1 -0
- package/dist/chunks/{combobox-BJusx5b2.js → combobox-OQOi5hlB.js} +2 -2
- package/dist/chunks/combobox-OQOi5hlB.js.map +1 -0
- package/dist/chunks/{copy-button-BmGshaq9.js → copy-button-BLvirhXk.js} +4 -4
- package/dist/chunks/copy-button-BLvirhXk.js.map +1 -0
- package/dist/chunks/{createReactComponent-BqCmnqfX.js → createReactComponent-yKZn9MIX.js} +6 -6
- package/dist/chunks/createReactComponent-yKZn9MIX.js.map +1 -0
- package/dist/chunks/{data-table-T4QKnrxQ.js → data-table-CAz_8HQw.js} +8 -8
- package/dist/chunks/data-table-CAz_8HQw.js.map +1 -0
- package/dist/chunks/{date-picker-CZbcNIe-.js → date-picker-vJQrTol9.js} +5 -5
- package/dist/chunks/date-picker-vJQrTol9.js.map +1 -0
- package/dist/chunks/{description-list-BRRQ0oF6.js → description-list-Duhhralt.js} +3 -3
- package/dist/chunks/description-list-Duhhralt.js.map +1 -0
- package/dist/chunks/{dialog-12foDiQb.js → dialog-DORIrfyJ.js} +102 -101
- package/dist/chunks/dialog-DORIrfyJ.js.map +1 -0
- package/dist/chunks/{error-D5SzZ0ev.js → error-yAVi4cBu.js} +8 -8
- package/dist/chunks/error-yAVi4cBu.js.map +1 -0
- package/dist/chunks/{filter-bar-upeYW4dQ.js → filter-bar-qqCZf1x4.js} +9 -9
- package/dist/chunks/filter-bar-qqCZf1x4.js.map +1 -0
- package/dist/chunks/{form-AiHbbw4m.js → form-CXT6ayt0.js} +2 -2
- package/dist/chunks/{form-AiHbbw4m.js.map → form-CXT6ayt0.js.map} +1 -1
- package/dist/chunks/{ghost-search-8PzP73zS.js → ghost-search-CMUI2UH0.js} +4 -4
- package/dist/chunks/ghost-search-CMUI2UH0.js.map +1 -0
- package/dist/chunks/{input-fFWvPJOf.js → input-DWnb33UF.js} +4 -4
- package/dist/chunks/input-DWnb33UF.js.map +1 -0
- package/dist/chunks/{input-group-fc9_jD4d.js → input-group-C3upo2OU.js} +39 -37
- package/dist/chunks/input-group-C3upo2OU.js.map +1 -0
- package/dist/chunks/is-react-component-DSnjtBmo.js.map +1 -1
- package/dist/chunks/{kbd-DNI10uy7.js → kbd-DWDs_6U1.js} +2 -2
- package/dist/chunks/kbd-DWDs_6U1.js.map +1 -0
- package/dist/chunks/{line-chart-BODTNBrX.js → line-chart-pOwE2_Oz.js} +2 -2
- package/dist/chunks/line-chart-pOwE2_Oz.js.map +1 -0
- package/dist/chunks/link-provider-DXzDQ08N.js.map +1 -1
- package/dist/chunks/{log-list-tNuCFGlP.js → log-list-QbSYHZu3.js} +8 -8
- package/dist/chunks/log-list-QbSYHZu3.js.map +1 -0
- package/dist/chunks/{menu-CoMrYnd1.js → menu-CC3fhf83.js} +3 -3
- package/dist/chunks/menu-CC3fhf83.js.map +1 -0
- package/dist/chunks/{message-Dz2-numf.js → message-DRAWQlW-.js} +2 -2
- package/dist/chunks/message-DRAWQlW-.js.map +1 -0
- package/dist/chunks/{popover-BhBJO346.js → popover-B0NBrYV5.js} +2 -2
- package/dist/chunks/popover-B0NBrYV5.js.map +1 -0
- package/dist/chunks/popup-anchor-C3_iXdbh.js.map +1 -1
- package/dist/chunks/resolve-variant-CcD8iG5l.js.map +1 -1
- package/dist/chunks/{scroll-area-DSwD9th7.js → scroll-area-Dhl5hqay.js} +2 -2
- package/dist/chunks/scroll-area-Dhl5hqay.js.map +1 -0
- package/dist/chunks/{select-DU_0zVbn.js → select-xhSvDNbw.js} +3 -3
- package/dist/chunks/select-xhSvDNbw.js.map +1 -0
- package/dist/chunks/{sidebar-BP39w1iA.js → sidebar-CgaSEWVr.js} +11 -11
- package/dist/chunks/sidebar-CgaSEWVr.js.map +1 -0
- package/dist/chunks/{skeleton-DwjSl4vC.js → skeleton-CqZlGphn.js} +2 -2
- package/dist/chunks/skeleton-CqZlGphn.js.map +1 -0
- package/dist/chunks/{spinner-BzLUo4Xk.js → spinner-BSutFL4l.js} +2 -2
- package/dist/chunks/spinner-BSutFL4l.js.map +1 -0
- package/dist/chunks/{stat-hnNqjWVG.js → stat-BXBfMQ9Q.js} +4 -4
- package/dist/chunks/stat-BXBfMQ9Q.js.map +1 -0
- package/dist/chunks/{status-view-C8tabjDu.js → status-view-I_Y6eEyX.js} +2 -2
- package/dist/chunks/status-view-I_Y6eEyX.js.map +1 -0
- package/dist/chunks/{toast-BACxYsv6.js → toast-DrLKzrDJ.js} +7 -7
- package/dist/chunks/toast-DrLKzrDJ.js.map +1 -0
- package/dist/chunks/{toggle-o84tawXy.js → toggle-Ca4SS3YD.js} +2 -2
- package/dist/chunks/toggle-Ca4SS3YD.js.map +1 -0
- package/dist/chunks/{tooltip-BTF7GChl.js → tooltip-4J1PUJmB.js} +2 -2
- package/dist/chunks/tooltip-4J1PUJmB.js.map +1 -0
- package/dist/chunks/{trace-DyjsBY-S.js → trace-D9F0sne7.js} +11 -11
- package/dist/chunks/trace-D9F0sne7.js.map +1 -0
- package/dist/chunks/use-copy-D6JwKUll.js.map +1 -1
- package/dist/chunks/use-press-pulse-IbNstUT0.js.map +1 -1
- package/dist/components/accordion.js +1 -1
- package/dist/components/accordion.js.map +1 -1
- package/dist/components/autocomplete.js +1 -1
- package/dist/components/autocomplete.js.map +1 -1
- package/dist/components/avatar.js +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/bar-chart.js +1 -1
- package/dist/components/bubble.js +1 -1
- package/dist/components/button.js +2 -2
- package/dist/components/calendar.js +1 -1
- package/dist/components/card.js +1 -1
- package/dist/components/chart.js +1 -1
- package/dist/components/chat.js +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/code-block.js +1 -1
- package/dist/components/collapsible.js +1 -1
- package/dist/components/combobox.js +1 -1
- package/dist/components/command.js +4 -4
- package/dist/components/command.js.map +1 -1
- package/dist/components/context-menu.js +2 -2
- package/dist/components/context-menu.js.map +1 -1
- package/dist/components/copy-button.js +1 -1
- package/dist/components/data-table.js +2 -2
- package/dist/components/date-picker.js +1 -1
- package/dist/components/description-list.js +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/drawer.js +1 -1
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/error.js +1 -1
- package/dist/components/field.js +1 -1
- package/dist/components/field.js.map +1 -1
- package/dist/components/fieldset.js +1 -1
- package/dist/components/fieldset.js.map +1 -1
- package/dist/components/filter-bar.js +1 -1
- package/dist/components/form.js +1 -1
- package/dist/components/input-group.js +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/kbd.js +1 -1
- package/dist/components/line-chart.js +1 -1
- package/dist/components/log-list.js +1 -1
- package/dist/components/menu.js +1 -1
- package/dist/components/menubar.js +1 -1
- package/dist/components/menubar.js.map +1 -1
- package/dist/components/message.js +1 -1
- package/dist/components/meter.js +1 -1
- package/dist/components/meter.js.map +1 -1
- package/dist/components/navigation-menu.js +1 -1
- package/dist/components/navigation-menu.js.map +1 -1
- package/dist/components/notification.js +4 -4
- package/dist/components/notification.js.map +1 -1
- package/dist/components/number-field.js +1 -1
- package/dist/components/number-field.js.map +1 -1
- package/dist/components/otp-field.js +1 -1
- package/dist/components/otp-field.js.map +1 -1
- package/dist/components/phone-input.js +35 -45
- package/dist/components/phone-input.js.map +1 -1
- package/dist/components/popover.js +1 -1
- package/dist/components/preview-card.js +1 -1
- package/dist/components/preview-card.js.map +1 -1
- package/dist/components/progress.js +1 -1
- package/dist/components/progress.js.map +1 -1
- package/dist/components/radio-group.js +1 -1
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/scope.js +10 -10
- package/dist/components/scope.js.map +1 -1
- package/dist/components/scroll-area.js +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/separator.js +1 -1
- package/dist/components/separator.js.map +1 -1
- package/dist/components/skeleton.js +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/slider.js.map +1 -1
- package/dist/components/spinner.js +1 -1
- package/dist/components/stat.js +1 -1
- package/dist/components/status-view.js +1 -1
- package/dist/components/switch.js +1 -1
- package/dist/components/switch.js.map +1 -1
- package/dist/components/tabs.js +1 -1
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/theme-toggle.js +2 -2
- package/dist/components/theme-toggle.js.map +1 -1
- package/dist/components/toast.js +1 -1
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/toggle-group.js.map +1 -1
- package/dist/components/toggle.js +1 -1
- package/dist/components/toolbar.js +1 -1
- package/dist/components/toolbar.js.map +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/components/trace.js +1 -1
- package/dist/icons.js.map +1 -1
- package/dist/index.js +27 -27
- package/dist/motion.js.map +1 -1
- package/dist/sections/basic-page.js +2 -2
- package/dist/sections/sidebar.js +1 -1
- package/dist/src/components/accordion/accordion.d.ts +5 -5
- package/dist/src/components/autocomplete/autocomplete.d.ts +9 -9
- package/dist/src/components/avatar/avatar.d.ts +3 -3
- package/dist/src/components/badge/badge.d.ts +1 -1
- package/dist/src/components/bar-chart/bar-chart.d.ts +1 -1
- package/dist/src/components/bubble/bubble.d.ts +3 -3
- package/dist/src/components/button/button.d.ts +4 -4
- package/dist/src/components/button/close-button.d.ts +1 -1
- package/dist/src/components/calendar/calendar.d.ts +1 -1
- package/dist/src/components/card/card.d.ts +7 -7
- package/dist/src/components/chart/chart.d.ts +1 -1
- package/dist/src/components/chart/legend.d.ts +2 -2
- package/dist/src/components/chart/shell.d.ts +1 -1
- package/dist/src/components/chart/skeleton.d.ts +1 -1
- package/dist/src/components/chart/tooltip.d.ts +1 -1
- package/dist/src/components/chat/chat.d.ts +17 -17
- package/dist/src/components/checkbox/check-glyph.d.ts +1 -1
- package/dist/src/components/checkbox/checkbox-card.d.ts +1 -1
- package/dist/src/components/checkbox/checkbox-group.d.ts +1 -1
- package/dist/src/components/checkbox/checkbox.d.ts +1 -1
- package/dist/src/components/code-block/code-block.d.ts +1 -1
- package/dist/src/components/code-block/languages.d.ts +27 -27
- package/dist/src/components/collapsible/collapsible.d.ts +2 -2
- package/dist/src/components/combobox/combobox.d.ts +15 -15
- package/dist/src/components/command/command.d.ts +12 -12
- package/dist/src/components/context-menu/context-menu.d.ts +48 -0
- package/dist/src/components/copy-button/copy-button.d.ts +1 -1
- package/dist/src/components/data-table/data-table.d.ts +1 -1
- package/dist/src/components/date-picker/date-picker.d.ts +1 -1
- package/dist/src/components/description-list/description-list.d.ts +2 -2
- package/dist/src/components/dialog/dialog.d.ts +13 -11
- package/dist/src/components/drawer/drawer.d.ts +6 -6
- package/dist/src/components/error/error.d.ts +2 -2
- package/dist/src/components/field/field.d.ts +6 -6
- package/dist/src/components/fieldset/fieldset.d.ts +2 -2
- package/dist/src/components/filter-bar/filter-bar.d.ts +1 -1
- package/dist/src/components/form/form.d.ts +1 -1
- package/dist/src/components/input/input.d.ts +1 -1
- package/dist/src/components/input-group/box-search.d.ts +1 -1
- package/dist/src/components/input-group/input-group.d.ts +6 -5
- package/dist/src/components/kbd/kbd.d.ts +1 -1
- package/dist/src/components/line-chart/line-chart.d.ts +1 -1
- package/dist/src/components/log-list/log-list.d.ts +7 -7
- package/dist/src/components/menu/menu-pending.d.ts +3 -4
- package/dist/src/components/menu/menu.d.ts +81 -0
- package/dist/src/components/menubar/menubar.d.ts +1 -1
- package/dist/src/components/message/message.d.ts +7 -7
- package/dist/src/components/meter/meter.d.ts +5 -5
- package/dist/src/components/navigation-menu/navigation-menu.d.ts +8 -8
- package/dist/src/components/notification/notification.d.ts +1 -1
- package/dist/src/components/number-field/number-field.d.ts +6 -6
- package/dist/src/components/otp-field/otp-field.d.ts +1 -1
- package/dist/src/components/phone-input/phone-input.d.ts +2 -2
- package/dist/src/components/popover/popover.d.ts +4 -4
- package/dist/src/components/preview-card/preview-card.d.ts +3 -3
- package/dist/src/components/progress/progress.d.ts +5 -5
- package/dist/src/components/radio-group/radio-card.d.ts +1 -1
- package/dist/src/components/radio-group/radio-group.d.ts +2 -2
- package/dist/src/components/scope/scope.d.ts +1 -1
- package/dist/src/components/scroll-area/scroll-area-edges.d.ts +1 -1
- package/dist/src/components/scroll-area/scroll-area.d.ts +5 -5
- package/dist/src/components/select/select.d.ts +9 -9
- package/dist/src/components/separator/separator.d.ts +1 -1
- package/dist/src/components/slider/slider.d.ts +7 -7
- package/dist/src/components/spinner/spinner.d.ts +1 -1
- package/dist/src/components/stat/stat.d.ts +2 -2
- package/dist/src/components/status-view/status-view.d.ts +1 -1
- package/dist/src/components/switch/switch.d.ts +1 -1
- package/dist/src/components/tabs/tabs.d.ts +4 -4
- package/dist/src/components/theme-toggle/theme-toggle.d.ts +1 -1
- package/dist/src/components/toast/toast.d.ts +7 -7
- package/dist/src/components/toggle/toggle.d.ts +1 -1
- package/dist/src/components/toggle-group/toggle-group.d.ts +1 -1
- package/dist/src/components/toolbar/toolbar.d.ts +6 -6
- package/dist/src/components/tooltip/tooltip.d.ts +3 -3
- package/dist/src/components/trace/span-primitive.d.ts +3 -3
- package/dist/src/components/trace/trace.d.ts +3 -3
- package/dist/src/icons/discord.d.ts +1 -1
- package/dist/src/icons/github.d.ts +1 -1
- package/dist/src/icons/google.d.ts +1 -1
- package/dist/src/icons/imessage.d.ts +1 -1
- package/dist/src/icons/photon-mark.d.ts +1 -1
- package/dist/src/icons/reddit.d.ts +1 -1
- package/dist/src/icons/slack.d.ts +1 -1
- package/dist/src/icons/telegram.d.ts +1 -1
- package/dist/src/icons/whatsapp.d.ts +1 -1
- package/dist/src/icons/x.d.ts +1 -1
- package/dist/src/icons/youtube.d.ts +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/sections/basic-page/basic-page.d.ts +46 -46
- package/dist/src/sections/sidebar/sidebar.d.ts +11 -11
- package/dist/src/utils/animated-height.d.ts +1 -1
- package/dist/src/utils/ghost-search.d.ts +1 -1
- package/dist/src/utils/link-provider.d.ts +1 -1
- package/dist/src/utils/popup-anchor.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/package.json +24 -24
- package/src/styles/pho.css +1 -1
- package/src/styles/theme.css +1 -1
- package/dist/chunks/IconAlertCircleFilled-VxKU8TYK.js.map +0 -1
- package/dist/chunks/IconArrowUpRight-DGgKzQwV.js.map +0 -1
- package/dist/chunks/IconCheck-D2WuculQ.js.map +0 -1
- package/dist/chunks/IconChevronDown-CZilB71T.js.map +0 -1
- package/dist/chunks/IconChevronLeft-CSWMKQ4C.js.map +0 -1
- package/dist/chunks/IconChevronRight-CzoJnYNI.js.map +0 -1
- package/dist/chunks/IconChevronUp-CrpWSgIl.js.map +0 -1
- package/dist/chunks/IconInfoCircle-L0zfhg7R.js.map +0 -1
- package/dist/chunks/IconSearch-BKAHkLyX.js.map +0 -1
- package/dist/chunks/IconX-pZ9vrtSr.js.map +0 -1
- package/dist/chunks/avatar-BkmGDIqf.js.map +0 -1
- package/dist/chunks/badge-DlLJPLeZ.js.map +0 -1
- package/dist/chunks/bar-chart-CNCmuhQV.js.map +0 -1
- package/dist/chunks/basic-page-D_Wgu2pJ.js.map +0 -1
- package/dist/chunks/box-search-C9EVZgcb.js.map +0 -1
- package/dist/chunks/bubble-eaoLJP4N.js.map +0 -1
- package/dist/chunks/button-C9VqBBIr.js.map +0 -1
- package/dist/chunks/calendar-4OFiCLAv.js.map +0 -1
- package/dist/chunks/chart-B5wjhkBu.js.map +0 -1
- package/dist/chunks/chat-Bu8UyIbT.js.map +0 -1
- package/dist/chunks/checkbox-CwvoEJhd.js.map +0 -1
- package/dist/chunks/close-button-GvqWbLl0.js.map +0 -1
- package/dist/chunks/cn-ChIgwEl3.js.map +0 -1
- package/dist/chunks/code-block-DekLMMtV.js.map +0 -1
- package/dist/chunks/collapsible-Dv306QOT.js.map +0 -1
- package/dist/chunks/combobox-BJusx5b2.js.map +0 -1
- package/dist/chunks/copy-button-BmGshaq9.js.map +0 -1
- package/dist/chunks/createReactComponent-BqCmnqfX.js.map +0 -1
- package/dist/chunks/data-table-T4QKnrxQ.js.map +0 -1
- package/dist/chunks/date-picker-CZbcNIe-.js.map +0 -1
- package/dist/chunks/description-list-BRRQ0oF6.js.map +0 -1
- package/dist/chunks/dialog-12foDiQb.js.map +0 -1
- package/dist/chunks/error-D5SzZ0ev.js.map +0 -1
- package/dist/chunks/filter-bar-upeYW4dQ.js.map +0 -1
- package/dist/chunks/ghost-search-8PzP73zS.js.map +0 -1
- package/dist/chunks/input-fFWvPJOf.js.map +0 -1
- package/dist/chunks/input-group-fc9_jD4d.js.map +0 -1
- package/dist/chunks/kbd-DNI10uy7.js.map +0 -1
- package/dist/chunks/line-chart-BODTNBrX.js.map +0 -1
- package/dist/chunks/log-list-tNuCFGlP.js.map +0 -1
- package/dist/chunks/menu-CoMrYnd1.js.map +0 -1
- package/dist/chunks/message-Dz2-numf.js.map +0 -1
- package/dist/chunks/popover-BhBJO346.js.map +0 -1
- package/dist/chunks/scroll-area-DSwD9th7.js.map +0 -1
- package/dist/chunks/select-DU_0zVbn.js.map +0 -1
- package/dist/chunks/sidebar-BP39w1iA.js.map +0 -1
- package/dist/chunks/skeleton-DwjSl4vC.js.map +0 -1
- package/dist/chunks/spinner-BzLUo4Xk.js.map +0 -1
- package/dist/chunks/stat-hnNqjWVG.js.map +0 -1
- package/dist/chunks/status-view-C8tabjDu.js.map +0 -1
- package/dist/chunks/toast-BACxYsv6.js.map +0 -1
- package/dist/chunks/toggle-o84tawXy.js.map +0 -1
- package/dist/chunks/tooltip-BTF7GChl.js.map +0 -1
- package/dist/chunks/trace-DyjsBY-S.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-picker-vJQrTol9.js","names":["_Fragment","cn","createReactComponent","Calendar","Popover","useCallback","useEffect","useId","useRef","useState","useSyncExternalStore","Fragment$1","jsx","jsxs","__iconNode","IconCalendar","TIME_STEP","SIZE_PAD","SIZE_RADIUS","TRIGGER_BASE","TRIGGER_FIELD","TRIGGER_NATIVE","PRESET","PRESET_ON","SPACE_SEPARATORS","flattenSpaces","words","NUMERIC_DATE","NUMERIC_CLOCK","SPAN_DASH","SAMPLE","numericFormat","locales","time","isDatePart","type","numericOrder","part","MASK","dateFieldMask","formatDateLabel","value","format","joinSpan","from","to","hasClock","a","b","text","parts","same","at","cut","keep","pad","n","toDateValue","date","toClockValue","hm","toDateTimeValue","fromInputValue","match","y","m","d","hh","mm","ss","makeLocalDate","shortYear","month","day","clock","year","parseDateText","trimmed","numbers","slots","made","spelled","clampTime","next","valueKey","withDay","keepTimeFrom","startOfMonth","endOfMonth","startOfDay","endOfDay","later","earlier","nativeBounds","calendarProps","min","max","rules","rule","COARSE_POINTER","useCoarsePointer","subscribe","notify","query","ClockField","label","disabled","onChange","event","DatePicker","props","mode","defaultValue","onValueChange","hint","placeholder","invalid","required","size","width","id","className","selectedPreset","align","ariaLabel","presets","minDays","maxDays","controlled","ownValue","setOwnValue","open","setOpen","picks","fieldPlaceholder","generatedId","triggerId","hintId","calendarId","gridFocus","setGridFocus","openPicker","focusGrid","setMonth","commit","details","setIgnoreSelected","setChosen","single","range","anchor","draft","setDraft","chosen","ignoreSelected","presetLabel","hugChars","hugToWords","pickPreset","preset","thisMonth","shownMonth","fieldRef","popupRef","coarse","bounds","native","face","typed","parsed","grid","clicked","first","kept"],"sources":["../../../../node_modules/.pnpm/@tabler+icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconCalendar.mjs","../../src/components/date-picker/date-picker.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 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12\", \"key\": \"svg-0\" }], [\"path\", { \"d\": \"M16 3v4\", \"key\": \"svg-1\" }], [\"path\", { \"d\": \"M8 3v4\", \"key\": \"svg-2\" }], [\"path\", { \"d\": \"M4 11h16\", \"key\": \"svg-3\" }], [\"path\", { \"d\": \"M11 15h1\", \"key\": \"svg-4\" }], [\"path\", { \"d\": \"M12 15v3\", \"key\": \"svg-5\" }]];\nconst IconCalendar = createReactComponent(\"outline\", \"calendar\", \"Calendar\", __iconNode);\n\nexport { __iconNode, IconCalendar as default };\n","import {\n useCallback,\n useEffect,\n useId,\n useRef,\n useState,\n useSyncExternalStore,\n type ReactNode,\n} from \"react\";\nimport { IconCalendar } from \"@tabler/icons-react\";\nimport type { DateRange, Matcher, PropsBase } from \"react-day-picker\";\nimport { Calendar } from \"../calendar\";\nimport { Popover } from \"../popover\";\nimport type { InputSize } from \"../input\";\nimport { cn } from \"../../utils/cn\";\n\n/** The trigger wears Input's sizes so the two line up in one form. */\nexport type DatePickerSize = InputSize;\n\n/**\n * How fine the time is asked for, and read back. Omit it for a date alone.\n * The value is always a `Date`; the granularity says which of its parts the\n * viewer sets, and everything below is zeroed.\n */\nexport type DatePickerTime = \"hour\" | \"minute\" | \"second\";\n\n/** `step` for a native time field — the unit it moves and shows. */\nconst TIME_STEP: Record<DatePickerTime, number> = {\n hour: 3600,\n minute: 60,\n second: 1,\n};\n\n// Effective padding matches Input's (12/8px, lg 14/10px); Input reaches it\n// through a 2px wrapper inset it has to compensate for, the trigger directly.\nconst SIZE_PAD: Record<DatePickerSize, string> = {\n // 16px until there is room — a 14px control next to a 16px field looks shrunk.\n sm: \"px-3 py-2 text-md md:text-base\",\n md: \"px-3 py-2 text-md\",\n lg: \"px-3.5 py-2.5 text-md\",\n};\n\nconst SIZE_RADIUS: Record<DatePickerSize, string> = {\n sm: \"rounded-base\",\n md: \"rounded-base\",\n lg: \"squircle rounded-base\",\n};\n\nconst TRIGGER_BASE = cn(\n \"bg-pho-primary ring-pho-primary text-pho-primary relative flex cursor-pointer items-center gap-2 text-left ring-1 ring-inset\",\n \"transition-shadow duration-100 ease-linear focus-visible:outline-none\",\n // Invalid is mid-weight — thicker than the rest hairline, thinner than focus.\n \"data-[invalid]:ring-pho-error-subtle data-[invalid]:ring-[1.5px]\",\n);\n\n// Open or focused, the edge is Input's: the brand ring at 2px in place of the\n// hairline. The popover path focuses the button itself; the native path puts a\n// system field over it, so the ring follows the field inside.\nconst TRIGGER_FIELD = cn(\n \"has-[input:focus-visible]:ring-pho-brand data-[popup-open]:ring-pho-brand has-[input:focus-visible]:ring-2 data-[popup-open]:ring-2\",\n \"data-[invalid]:has-[input:focus-visible]:ring-pho-error data-[invalid]:data-[popup-open]:ring-pho-error\",\n \"has-[input:disabled]:cursor-not-allowed has-[input:disabled]:opacity-50\",\n);\n\nconst TRIGGER_NATIVE = cn(\n \"has-[input:focus-visible]:ring-pho-brand has-[input:focus-visible]:ring-2\",\n \"data-[invalid]:has-[input:focus-visible]:ring-pho-error\",\n \"has-[input:disabled]:cursor-not-allowed has-[input:disabled]:opacity-50\",\n);\n\n/**\n * A named window in the rail beside the calendar — the Menu row's manners,\n * since that is what a list of choices is.\n */\nconst PRESET = cn(\n \"flex shrink-0 cursor-pointer items-center rounded-sm px-2.5 py-1.5 text-left text-base whitespace-nowrap select-none\",\n \"text-pho-secondary transition-[color,background-color] duration-150 ease-out\",\n \"hover:bg-pho-ghost-hover hover:text-pho-primary\",\n \"outline-pho-brand focus-visible:outline-2 focus-visible:-outline-offset-1\",\n \"sm:w-full\",\n);\n\n/** The one in play. Quiet, like a highlighted menu row — not an action fill. */\nconst PRESET_ON = \"bg-pho-ghost-hover text-pho-primary font-medium\";\n\n/* ------------------------------------------------------------------ words */\n\n/**\n * ICU disagrees with itself about which space belongs before `AM` and around\n * a range dash: Node sends a narrow no-break space and a thin space where\n * Chrome sends ordinary ones. The two strings look identical and are not, so\n * a server-rendered label would fail to hydrate. Flattening every space\n * separator to the ordinary one makes the words the same on both sides.\n */\nconst SPACE_SEPARATORS = /[\\u00a0\\u2000-\\u200a\\u202f\\u205f\\u3000]/g;\nconst flattenSpaces = (words: string) => words.replace(SPACE_SEPARATORS, \" \");\n\n/** The date's parts, all in figures — the shape that is quickest to type. */\nconst NUMERIC_DATE = {\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n} as const;\n\n/** The clock, on a 24-hour dial: `15:04` is fewer keystrokes than `3:04 PM`. */\nconst NUMERIC_CLOCK: Record<DatePickerTime, Intl.DateTimeFormatOptions> = {\n hour: { hour: \"2-digit\", minute: \"2-digit\", hourCycle: \"h23\" },\n minute: { hour: \"2-digit\", minute: \"2-digit\", hourCycle: \"h23\" },\n second: {\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\",\n hourCycle: \"h23\",\n },\n};\n\n/**\n * What sits between the two ends of a span. No spaces around it — the field\n * is tight and the dates are already grouped by their own separators. An en\n * dash rather than a hyphen because a hyphen is one: `2026-09-01-08` in a\n * year-first locale would read as three numbers, `2026-09-01–08` as two dates.\n */\nconst SPAN_DASH = \"\\u2013\";\n\n/** A day whose parts are all different, so the locale's order reads clearly. */\nconst SAMPLE = new Date(2026, 8, 12, 15, 4, 5);\n\nfunction numericFormat(\n locales: Intl.LocalesArgument,\n time: DatePickerTime | undefined,\n) {\n return new Intl.DateTimeFormat(locales, {\n ...NUMERIC_DATE,\n ...(time ? NUMERIC_CLOCK[time] : {}),\n });\n}\n\ntype DatePart = \"year\" | \"month\" | \"day\";\nconst isDatePart = (type: string): type is DatePart =>\n type === \"year\" || type === \"month\" || type === \"day\";\n\n/** Which of year, month and day comes first here, and which comes last. */\nfunction numericOrder(locales: Intl.LocalesArgument): DatePart[] {\n return new Intl.DateTimeFormat(locales, NUMERIC_DATE)\n .formatToParts(SAMPLE)\n .map((part) => part.type)\n .filter(isDatePart);\n}\n\nconst MASK: Record<DatePart, string> = {\n year: \"yyyy\",\n month: \"mm\",\n day: \"dd\",\n};\n\n/**\n * The shape to type, in this locale's own order — `mm/dd/yyyy`,\n * `yyyy-mm-dd`, `dd.mm.yyyy`. Lowercase, the way a browser's own date field\n * writes it, so the two paths read alike.\n */\nexport function dateFieldMask(\n locales?: Intl.LocalesArgument,\n time?: DatePickerTime,\n): string {\n return flattenSpaces(\n numericFormat(locales, time)\n .formatToParts(SAMPLE)\n .map((part) =>\n isDatePart(part.type)\n ? MASK[part.type]\n : part.type === \"hour\"\n ? \"hh\"\n : part.type === \"minute\"\n ? \"mm\"\n : part.type === \"second\"\n ? \"ss\"\n : part.value,\n )\n .join(\"\"),\n );\n}\n\n/**\n * The figures in the field — `09/12/2026`, or `09/10/2026–09/13/2026` for a\n * span, in the viewer's locale. An empty or half-finished range prints just\n * the day that is settled; nothing selected prints nothing. Pass `time` to\n * print the clock too, at the precision that was asked for.\n *\n * Figures rather than words (`Sep 12, 2026`) because the field is typed into:\n * a month's name is the one part of a date nobody wants to spell.\n */\nexport function formatDateLabel(\n value: Date | DateRange | undefined,\n locales?: Intl.LocalesArgument,\n time?: DatePickerTime,\n): string {\n if (value == null) return \"\";\n const format = numericFormat(locales, time);\n if (value instanceof Date) return flattenSpaces(format.format(value));\n if (value.from == null) return \"\";\n if (value.to == null) return flattenSpaces(format.format(value.from));\n // A span of one day is a day: printing it twice says nothing the once did\n // not, and the first click of a range makes exactly that shape.\n if (\n time == null &&\n value.from.getFullYear() === value.to.getFullYear() &&\n value.from.getMonth() === value.to.getMonth() &&\n value.from.getDate() === value.to.getDate()\n ) {\n return flattenSpaces(format.format(value.from));\n }\n return flattenSpaces(joinSpan(format, value.from, value.to, time != null));\n}\n\n/**\n * Both ends of a span, with whatever they say twice said once — a shared\n * year, and a shared month behind it, printed at the end that carries it.\n * `09/01–09/08/2026`, `01.–08.09.2026`, `2026-09-01–08`. A span carrying a\n * clock is printed whole.\n *\n * Joined here rather than by `Intl.formatRange`, which does this in `de-DE`\n * and `sv-SE` and not in `en-US` or `en-GB`, and which drops the padding the\n * single-date format asks for. Whole fields only, taken from whichever end\n * the year sits at, so the half that is dropped is never the half that\n * distinguishes the two dates.\n */\nfunction joinSpan(\n format: Intl.DateTimeFormat,\n from: Date,\n to: Date,\n hasClock: boolean,\n): string {\n const a = format.formatToParts(from);\n const b = format.formatToParts(to);\n const text = (parts: Intl.DateTimeFormatPart[]) =>\n parts.map((part) => part.value).join(\"\");\n\n // With a clock in it there is nothing worth merging: the tail fields are\n // hours and minutes, the saving is a year that would then print after a\n // time, and a trim that lands mid-clock eats one end's `:00`.\n if (hasClock || a.length !== b.length) {\n return `${text(a)}${SPAN_DASH}${text(b)}`;\n }\n const same = (at: number) =>\n a[at]!.type === b[at]!.type && a[at]!.value === b[at]!.value;\n\n // The year leads (`yyyy-mm-dd`): the second date drops the shared head.\n if (a[0]?.type === \"year\") {\n let cut = 0;\n while (cut < a.length && same(cut)) cut += 1;\n // Back off to a field boundary so a half-written number never survives.\n while (cut > 0 && b[cut - 1]!.type !== \"literal\") cut -= 1;\n if (cut > 0 && cut < a.length) {\n return `${text(a)}${SPAN_DASH}${text(b.slice(cut))}`;\n }\n return `${text(a)}${SPAN_DASH}${text(b)}`;\n }\n\n // The year trails (`mm/dd/yyyy`, `dd.mm.yyyy`): the first date drops the\n // shared tail.\n let keep = a.length;\n while (keep > 0 && same(keep - 1)) keep -= 1;\n while (keep < a.length && a[keep]!.type !== \"literal\") keep += 1;\n if (keep > 0 && keep < a.length) {\n return `${text(a.slice(0, keep))}${SPAN_DASH}${text(b)}`;\n }\n return `${text(a)}${SPAN_DASH}${text(b)}`;\n}\n\n/* ------------------------------------------------------- date arithmetic */\n\nconst pad = (n: number) => String(n).padStart(2, \"0\");\n\n/** `YYYY-MM-DD` in the viewer's own zone — never `toISOString`, which is UTC. */\nfunction toDateValue(date: Date): string {\n return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`;\n}\n\nfunction toClockValue(date: Date, time: DatePickerTime): string {\n const hm = `${pad(date.getHours())}:${pad(date.getMinutes())}`;\n return time === \"second\" ? `${hm}:${pad(date.getSeconds())}` : hm;\n}\n\n/** The `datetime-local` spelling of an instant, at the asked-for precision. */\nfunction toDateTimeValue(date: Date, time: DatePickerTime): string {\n return `${toDateValue(date)}T${toClockValue(date, time)}`;\n}\n\n/**\n * Read back a `date` or `datetime-local` field. Parsed part by part rather\n * than handed to `new Date(string)`, which reads a bare `YYYY-MM-DD` as UTC\n * midnight and lands on the day before west of Greenwich.\n */\nfunction fromInputValue(value: string): Date | undefined {\n const match =\n /^(\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2}))?)?$/.exec(value);\n if (!match) return undefined;\n const [, y, m, d, hh, mm, ss] = match;\n const date = new Date(\n Number(y),\n Number(m) - 1,\n Number(d),\n Number(hh ?? 0),\n Number(mm ?? 0),\n Number(ss ?? 0),\n 0,\n );\n return Number.isNaN(date.getTime()) ? undefined : date;\n}\n\n/** A date the calendar could actually show — `Feb 31` rolled over, so no. */\nfunction makeLocalDate(\n shortYear: number,\n month: number,\n day: number,\n clock: number[],\n): Date | undefined {\n // `12/25/26` means 2026, not the year 26 — and `new Date(26, …)` would say\n // 1926. Two figures are this century.\n const year = shortYear < 100 ? 2000 + shortYear : shortYear;\n if (month < 1 || month > 12 || day < 1 || day > 31) return undefined;\n const [hh = 0, mm = 0, ss = 0] = clock;\n if (hh > 23 || mm > 59 || ss > 59) return undefined;\n const date = new Date(year, month - 1, day, hh, mm, ss, 0);\n return date.getMonth() === month - 1 && date.getDate() === day\n ? date\n : undefined;\n}\n\n/**\n * A date out of whatever the viewer typed, read in the same order the field\n * writes it — so what it shows is what it takes back. `yyyy-mm-dd` is read as\n * itself wherever it turns up, since nothing else starts with four figures,\n * and a date spelled out in words still parses so a paste of `Sep 12, 2026`\n * lands. Three numbers at least: the field must not flicker through\n * Decembers on the way to one date.\n */\nfunction parseDateText(\n text: string,\n locales: Intl.LocalesArgument,\n): Date | undefined {\n const trimmed = text.trim();\n if (trimmed === \"\") return undefined;\n\n const numbers = (trimmed.match(/\\d+/g) ?? []).map(Number);\n if (numbers.length >= 3) {\n const clock = numbers.slice(3);\n // `3:04 pm` is not the shape the field writes, but it is a shape people\n // type; move it onto the 24-hour dial the rest of this speaks.\n if (/\\bpm\\b/i.test(trimmed) && clock[0] !== undefined && clock[0] < 12) {\n clock[0] += 12;\n } else if (/\\bam\\b/i.test(trimmed) && clock[0] === 12) {\n clock[0] = 0;\n }\n\n // Four figures up front can only be a year; no locale puts a day or a\n // month there.\n if (/^\\d{4}\\D/.test(trimmed)) {\n const [year, month, day] = numbers;\n return makeLocalDate(year!, month!, day!, clock);\n }\n\n const slots: Partial<Record<DatePart, number>> = {};\n numericOrder(locales).forEach((part, at) => {\n slots[part] = numbers[at];\n });\n if (slots.year != null && slots.month != null && slots.day != null) {\n const made = makeLocalDate(slots.year, slots.month, slots.day, clock);\n if (made) return made;\n }\n }\n\n // Words — a pasted `Sep 12, 2026`. Only worth trying with letters in it and\n // a four-figure year to go with them: `new Date` turns a bare `Sep 12` into\n // this year's, which is a guess the field should not make.\n if (!/[a-z]/i.test(trimmed)) return undefined;\n if (numbers.length < 2 || !/\\b\\d{4}\\b/.test(trimmed)) return undefined;\n const spelled = new Date(trimmed);\n return Number.isNaN(spelled.getTime()) ? undefined : spelled;\n}\n\n/** Zero everything finer than the granularity, so the value means what it says. */\nfunction clampTime(date: Date, time: DatePickerTime | undefined): Date {\n const next = new Date(date);\n next.setMilliseconds(0);\n if (time === \"second\") return next;\n next.setSeconds(0);\n if (time === \"minute\") return next;\n next.setMinutes(0);\n if (time === \"hour\") return next;\n next.setHours(0);\n return next;\n}\n\n/**\n * A value's identity, for telling whether the window on screen is still the\n * one a preset put there. Instants, so a re-render cannot change the answer.\n */\nfunction valueKey(value: Date | DateRange | undefined): string {\n if (value == null) return \"\";\n if (value instanceof Date) return String(value.getTime());\n return `${value.from?.getTime() ?? \"\"}-${value.to?.getTime() ?? \"\"}`;\n}\n\n/** A day from the calendar, wearing the clock the value already carried. */\nfunction withDay(day: Date, keepTimeFrom: Date | undefined): Date {\n const next = new Date(day);\n if (keepTimeFrom) {\n next.setHours(\n keepTimeFrom.getHours(),\n keepTimeFrom.getMinutes(),\n keepTimeFrom.getSeconds(),\n 0,\n );\n }\n return next;\n}\n\nconst startOfMonth = (d: Date) => new Date(d.getFullYear(), d.getMonth(), 1);\nconst endOfMonth = (d: Date) => new Date(d.getFullYear(), d.getMonth() + 1, 0);\n// DayPicker's matchers count calendar days, so a bound carrying a time of day\n// disables nothing extra on the calendar. Widen each to its whole day before\n// handing it to a system picker, which would otherwise enforce the clock too.\nconst startOfDay = (d: Date) =>\n new Date(d.getFullYear(), d.getMonth(), d.getDate());\nconst endOfDay = (d: Date) =>\n new Date(d.getFullYear(), d.getMonth(), d.getDate(), 23, 59, 59, 999);\nconst later = (a: Date | undefined, b: Date) => (a && a > b ? a : b);\nconst earlier = (a: Date | undefined, b: Date) => (a && a < b ? a : b);\n\n/**\n * The only rules a system picker enforces are its first and last day. Returns\n * them, or `null` when the page asked for something the OS cannot express — a\n * weekday rule, a predicate, a hidden set — in which case the calendar, which\n * can enforce it, stays on every device.\n */\nfunction nativeBounds(\n calendarProps: PropsBase | undefined,\n): { min?: Date; max?: Date } | null {\n if (calendarProps?.hidden != null) return null;\n\n let min: Date | undefined;\n let max: Date | undefined;\n const rules: Matcher[] =\n calendarProps?.disabled == null\n ? []\n : Array.isArray(calendarProps.disabled)\n ? calendarProps.disabled\n : [calendarProps.disabled];\n\n for (const rule of rules) {\n if (rule == null || typeof rule !== \"object\" || rule instanceof Date) {\n return null;\n }\n const keys = Object.keys(rule);\n // `{ before }` and `{ after }` alone are the two the OS understands; the\n // pair of them is DayPicker's *interval*, which means the opposite.\n if (keys.length !== 1) return null;\n if (\"before\" in rule && rule.before instanceof Date) {\n min = later(min, startOfDay(rule.before));\n } else if (\"after\" in rule && rule.after instanceof Date) {\n max = earlier(max, endOfDay(rule.after));\n } else {\n return null;\n }\n }\n\n if (calendarProps?.startMonth) {\n min = later(min, startOfMonth(calendarProps.startMonth));\n }\n if (calendarProps?.endMonth) {\n max = earlier(max, endOfDay(endOfMonth(calendarProps.endMonth)));\n }\n return { min, max };\n}\n\n/* --------------------------------------------------------------- devices */\n\nconst COARSE_POINTER = \"(pointer: coarse)\";\n\n/**\n * True where the primary input is a finger. `useSyncExternalStore` so the\n * server and the first client render agree (no match) and the swap happens in\n * the same commit as hydration, rather than as a mismatch.\n */\nfunction useCoarsePointer(): boolean {\n const subscribe = useCallback((notify: () => void) => {\n if (typeof window === \"undefined\" || !window.matchMedia) return () => {};\n const query = window.matchMedia(COARSE_POINTER);\n query.addEventListener(\"change\", notify);\n return () => query.removeEventListener(\"change\", notify);\n }, []);\n\n return useSyncExternalStore(\n subscribe,\n () =>\n typeof window !== \"undefined\" &&\n typeof window.matchMedia === \"function\" &&\n window.matchMedia(COARSE_POINTER).matches,\n () => false,\n );\n}\n\n/* ------------------------------------------------------------------ props */\n\n/**\n * A window the page offers by name — `Last 7 days` — beside the calendar.\n * Pass a function for anything measured from now, so it is resolved at the\n * click rather than at render.\n */\nexport interface DatePickerPreset<T> {\n label: string;\n value: T | (() => T);\n}\n\n/** Extra about a change — present when the value came from a named window. */\nexport interface DatePickerChangeDetails<T> {\n preset: DatePickerPreset<T>;\n}\n\ninterface DatePickerBaseProps {\n /** Field label (associated for accessibility). */\n label?: ReactNode;\n /** Helper text below the field; rendered in the error color when `invalid`. */\n hint?: ReactNode;\n /**\n * What the field shows until something is chosen.\n * @default the shape to type, in this locale's order (`mm/dd/yyyy`)\n */\n placeholder?: string;\n /** Render the invalid state (error ring + error-colored hint). */\n invalid?: boolean;\n disabled?: boolean;\n /** Marks the label with the required asterisk. */\n required?: boolean;\n /** Size variant. @default \"md\" */\n size?: DatePickerSize;\n /**\n * `fill` takes the column it is in, like every other field. `hug` shrinks\n * to the words it is showing, for a field that sits in a toolbar or beside\n * a title rather than in a form.\n * @default \"fill\"\n */\n width?: \"fill\" | \"hug\";\n /**\n * Ask for a time as well as a day, this fine. `hour` sets the hour and\n * zeroes the rest, `minute` the hour and minute, `second` all three. Omit\n * it and the value is midnight on the chosen day.\n */\n time?: DatePickerTime;\n /** Locale for the trigger's words. Defaults to the viewer's. */\n locales?: Intl.LocalesArgument;\n /**\n * Everything else React DayPicker takes — `disabled` days, `startMonth` /\n * `endMonth`, `numberOfMonths`, `weekStartsOn`, `captionLayout`.\n */\n calendarProps?: PropsBase;\n /** Id for the trigger, if the page needs its own. */\n id?: string;\n /** Class applied to the trigger. */\n className?: string;\n /**\n * Accessible name when there is no visible label — a toolbar control\n * beside a page title, which already says what the field is for.\n */\n \"aria-label\"?: string;\n /**\n * The named window the field should read. A page that already knows the\n * name (`Last 24 hours` in the URL) passes it so a remount, and a rolling\n * window recomputed each render, still write the name rather than the\n * figures. The name drops the moment the value is no longer that window\n * — a day picked by hand, or the page clearing this.\n */\n selectedPreset?: string;\n /**\n * How the popover lines up with the field. A hug field on the right of a\n * header wants `end`, so the calendar grows left instead of off-screen.\n * @default \"start\"\n */\n align?: \"start\" | \"center\" | \"end\";\n}\n\nexport interface DatePickerSingleProps extends DatePickerBaseProps {\n /** @default \"single\" */\n mode?: \"single\";\n value?: Date;\n defaultValue?: Date;\n onValueChange?: (\n value: Date | undefined,\n details?: DatePickerChangeDetails<Date>,\n ) => void;\n /** Named days offered beside the calendar. */\n presets?: DatePickerPreset<Date>[];\n}\n\nexport interface DatePickerRangeProps extends DatePickerBaseProps {\n mode: \"range\";\n value?: DateRange;\n defaultValue?: DateRange;\n onValueChange?: (\n value: DateRange | undefined,\n details?: DatePickerChangeDetails<DateRange>,\n ) => void;\n /** Named windows offered beside the calendar — `Last 7 days`, and so on. */\n presets?: DatePickerPreset<DateRange>[];\n /**\n * Shortest and longest span the viewer may pick, counted in days. A pick\n * that would break either restarts the span from the day just clicked, so\n * the bound is felt rather than explained.\n */\n minDays?: number;\n maxDays?: number;\n}\n\nexport type DatePickerProps = DatePickerSingleProps | DatePickerRangeProps;\n\n/* ------------------------------------------------------------- the clock */\n\n/** One labelled time field — the popover's way of asking for the clock. */\nfunction ClockField({\n label,\n value,\n time,\n disabled,\n onChange,\n}: {\n label: string;\n value: Date | undefined;\n time: DatePickerTime;\n disabled?: boolean;\n onChange: (next: string) => void;\n}) {\n return (\n <>\n <span className=\"text-pho-description text-xs\">{label}</span>\n <label\n className={cn(\n \"bg-pho-primary ring-pho-primary rounded-sm px-2 py-1 ring-1 ring-inset\",\n \"focus-within:ring-pho-brand transition-shadow duration-100 ease-linear focus-within:ring-2\",\n )}\n >\n <input\n type=\"time\"\n step={TIME_STEP[time]}\n disabled={disabled}\n aria-label={label}\n value={value ? toClockValue(value, time) : \"\"}\n onChange={(event) => onChange(event.target.value)}\n className={cn(\n \"text-pho-primary w-full bg-transparent text-base tabular-nums outline-none\",\n // The browser's own clock glyph is off-brand and unstyleable;\n // the field's words are the control.\n \"[&::-webkit-calendar-picker-indicator]:hidden\",\n )}\n />\n </label>\n </>\n );\n}\n\n/* ------------------------------------------------------------ the picker */\n\n/**\n * Date Picker — a field that shows the chosen date and opens a `Calendar` to\n * change it. `mode=\"range\"` picks a span instead of a day; the popover stays\n * open until both ends are down.\n *\n * The value is a `Date` (or a `{ from, to }` range), never a string: pass\n * `value` to control it, `defaultValue` to let it keep its own. Clearing is\n * built in — clicking the chosen day again unsets it.\n *\n * `time` asks for the clock as well, to the hour, the minute, or the second.\n *\n * On a touch device the field hands off to the system picker — the OS wheel or\n * dialog, which people already know — as long as the rules the page set are\n * ones it can enforce. A weekday rule or a predicate keeps the calendar, which\n * can; so does `mode=\"range\"`, which no system picker offers.\n */\nexport function DatePicker(props: DatePickerProps) {\n const {\n mode = \"single\",\n defaultValue,\n onValueChange,\n label,\n hint,\n placeholder,\n invalid,\n disabled,\n required,\n size = \"md\",\n width = \"fill\",\n time,\n locales,\n calendarProps,\n id,\n className,\n selectedPreset,\n align = \"start\",\n \"aria-label\": ariaLabel,\n } = props;\n const presets = props.presets as\n DatePickerPreset<Date | DateRange>[] | undefined;\n // Range-only, and read off the union the same way.\n const { minDays, maxDays } = props as DatePickerRangeProps;\n\n // Presence of the prop, not its value: an empty controlled picker is the\n // normal starting state, so `value === undefined` cannot mean \"uncontrolled\".\n const controlled = \"value\" in props;\n const [ownValue, setOwnValue] = useState<Date | DateRange | undefined>(\n defaultValue,\n );\n const value = controlled ? props.value : ownValue;\n const [open, setOpen] = useState(false);\n // A range takes two clicks, and the first one already reads as a complete\n // one-day range ({ from, to } both set), so the value alone can't say when\n // the question is answered. Count the picks in this opening instead.\n const picks = useRef(0);\n\n // Empty, the field shows the shape to type. A span cannot be typed, so it\n // asks in words instead.\n const fieldPlaceholder =\n placeholder ??\n (mode === \"range\" ? \"Pick a date range\" : dateFieldMask(locales, time));\n\n const generatedId = useId();\n const triggerId = id ?? generatedId;\n const hintId = hint ? `${triggerId}-hint` : undefined;\n const calendarId = `${triggerId}-calendar`;\n\n // Whether the calendar should take the caret as it appears — true only when\n // a key asked for it, so a click leaves the caret in the field.\n const [gridFocus, setGridFocus] = useState(false);\n\n // The field is not a `Popover.Trigger`, so Base UI never routes its own\n // opening through `onOpenChange`: a controlled `open` is written straight\n // into the store. Every way in goes through here instead, or the reset an\n // opening owes — the pick count, the month on screen — silently never runs.\n const openPicker = (focusGrid = false) => {\n if (open) return;\n picks.current = 0;\n setMonth(undefined);\n setGridFocus(focusGrid);\n setOpen(true);\n };\n\n const notify = onValueChange as\n | ((\n v: Date | DateRange | undefined,\n d?: DatePickerChangeDetails<Date | DateRange>,\n ) => void)\n | undefined;\n\n const commit = (\n next: Date | DateRange | undefined,\n details?: DatePickerChangeDetails<Date | DateRange>,\n ) => {\n if (details) {\n setIgnoreSelected(false);\n } else {\n setIgnoreSelected(true);\n setChosen(null);\n }\n if (!controlled) setOwnValue(next);\n // The two modes have disjoint value types, and the union's callback is\n // only ever handed the shape its own mode produces. A second argument\n // is reserved for a named window, so a calendar pick stays a one-arg\n // call — existing listeners keep matching.\n if (details) notify?.(next, details);\n else notify?.(next);\n };\n\n const single = mode === \"single\" ? (value as Date | undefined) : undefined;\n const range = mode === \"range\" ? (value as DateRange | undefined) : undefined;\n // Reopen where the value lives, not on today's month.\n const anchor = single ?? range?.from;\n\n // The field is a text input, so the words in it are the viewer's until they\n // leave: `null` means \"whatever the value says\", anything else is what they\n // typed. Blur, a pick, and closing all hand the field back to the value.\n const [draft, setDraft] = useState<string | null>(null);\n // A preset names the window it set; the name stands only while the value is\n // still the one it produced, so a day picked afterwards drops the name with\n // no bookkeeping.\n const [chosen, setChosen] = useState<{ label: string; key: string } | null>(\n null,\n );\n // `selectedPreset` is the page's name for a rolling window. A hand pick\n // has to drop that name even if the page is a frame late clearing it —\n // otherwise the field still says \"Last 24 hours\" over a day the viewer\n // just chose. A new name from the page (or the same name after a remount)\n // starts honoring it again.\n const [ignoreSelected, setIgnoreSelected] = useState(false);\n useEffect(() => {\n setIgnoreSelected(false);\n }, [selectedPreset]);\n const presetLabel =\n selectedPreset && !ignoreSelected\n ? selectedPreset\n : chosen && chosen.key === valueKey(value)\n ? chosen.label\n : null;\n\n const text = draft ?? presetLabel ?? formatDateLabel(value, locales, time);\n // A typeable field stays wide enough for the shape to type, so it does\n // not jump when a date answers it. A span is read-only — hug the words\n // on screen, not the empty-state sentence sitting underneath.\n const hugChars = Math.max(\n text.length,\n mode === \"range\" ? 0 : fieldPlaceholder.length,\n 1,\n );\n const hugToWords = width === \"hug\" && mode === \"range\";\n\n const pickPreset = (preset: DatePickerPreset<Date | DateRange>) => {\n const next =\n typeof preset.value === \"function\" ? preset.value() : preset.value;\n setChosen({ label: preset.label, key: valueKey(next) });\n setDraft(null);\n commit(next, { preset });\n // A named window is the whole answer, clock included.\n setOpen(false);\n };\n\n // The month on screen follows what is typed, and resets to the value's own\n // month each time the calendar opens. Held from the first render rather than\n // handed over later: DayPicker keeps its own month until the prop arrives,\n // and a calendar that starts uncontrolled would ignore the first jump.\n const [month, setMonth] = useState<Date | undefined>(undefined);\n const [thisMonth] = useState(() => calendarProps?.today ?? new Date());\n const shownMonth =\n month ?? calendarProps?.defaultMonth ?? anchor ?? thisMonth;\n\n const fieldRef = useRef<HTMLDivElement>(null);\n const popupRef = useRef<HTMLDivElement>(null);\n\n const coarse = useCoarsePointer();\n const bounds = nativeBounds(calendarProps);\n // No system picker offers a range, so that mode keeps the calendar; so does\n // a rule the OS cannot enforce.\n const native =\n coarse && mode === \"single\" && bounds != null && !presets?.length;\n\n const face = (\n <>\n <IconCalendar className=\"text-pho-secondary size-4 shrink-0\" />\n <span\n className={cn(\n \"min-w-0 flex-1 truncate\",\n text === \"\" && \"text-pho-placeholder\",\n )}\n >\n {text === \"\" ? fieldPlaceholder : text}\n </span>\n </>\n );\n\n return (\n <div\n className={cn(\n \"flex flex-col gap-1.5\",\n width === \"hug\" ? \"w-fit\" : \"w-full\",\n )}\n >\n {label ? (\n <label\n htmlFor={triggerId}\n className=\"text-pho-secondary flex w-fit cursor-default items-center gap-0.5 text-base font-medium\"\n >\n {label}\n {required ? <span className=\"text-pho-brand\">*</span> : null}\n </label>\n ) : null}\n\n {native ? (\n <div\n data-invalid={invalid || undefined}\n className={cn(\n TRIGGER_BASE,\n TRIGGER_NATIVE,\n width === \"hug\" ? \"w-fit\" : \"w-full\",\n SIZE_PAD[size],\n SIZE_RADIUS[size],\n className,\n )}\n >\n {face}\n {/* The system field lies over the whole control at zero opacity:\n the tap opens the OS picker, the words underneath stay Pho's. */}\n <input\n id={triggerId}\n type={time ? \"datetime-local\" : \"date\"}\n step={time ? TIME_STEP[time] : undefined}\n min={\n bounds?.min\n ? time\n ? toDateTimeValue(clampTime(bounds.min, time), time)\n : toDateValue(bounds.min)\n : undefined\n }\n max={\n bounds?.max\n ? time\n ? toDateTimeValue(clampTime(bounds.max, time), time)\n : toDateValue(bounds.max)\n : undefined\n }\n required={required}\n disabled={disabled}\n aria-label={ariaLabel}\n aria-describedby={hintId}\n value={\n single\n ? time\n ? toDateTimeValue(single, time)\n : toDateValue(single)\n : \"\"\n }\n onChange={(event) => {\n const next = fromInputValue(event.target.value);\n commit(next ? clampTime(next, time) : undefined);\n }}\n className=\"absolute inset-0 size-full cursor-pointer opacity-0\"\n />\n </div>\n ) : (\n <Popover.Root\n open={open}\n onOpenChange={(next, details) => {\n // Clicking in the field is how the viewer reaches the caret, so it\n // opens the calendar and never takes it away again — the field is\n // not a trigger Base UI knows about, so its own presses arrive\n // here as presses from outside.\n if (\n !next &&\n details.reason === \"outside-press\" &&\n details.event.target instanceof Node &&\n fieldRef.current?.contains(details.event.target)\n ) {\n return;\n }\n // Opening is `openPicker`'s job; this only ever hears about\n // closes (Escape, a click outside) and the odd programmatic open.\n if (next) {\n picks.current = 0;\n setMonth(undefined);\n } else {\n setDraft(null);\n setGridFocus(false);\n }\n setOpen(next);\n }}\n >\n <div\n ref={fieldRef}\n data-invalid={invalid || undefined}\n data-popup-open={open || undefined}\n className={cn(\n TRIGGER_BASE,\n TRIGGER_FIELD,\n width === \"hug\" ? \"w-fit\" : \"w-full\",\n SIZE_PAD[size],\n SIZE_RADIUS[size],\n className,\n )}\n >\n <IconCalendar className=\"text-pho-secondary size-4 shrink-0\" />\n <input\n id={triggerId}\n type=\"text\"\n // A span is two dates and a separator; there is nothing\n // sensible to type, so the field only opens the calendar.\n readOnly={mode === \"range\"}\n disabled={disabled}\n required={required}\n placeholder={fieldPlaceholder}\n aria-label={ariaLabel}\n aria-describedby={hintId}\n // The APG's date-picker combobox: a text field that also says\n // what it opens. `textbox` alone does not support `aria-expanded`.\n role=\"combobox\"\n aria-haspopup=\"dialog\"\n aria-expanded={open}\n aria-controls={open ? calendarId : undefined}\n autoComplete=\"off\"\n spellCheck={false}\n value={text}\n onFocus={() => openPicker()}\n onMouseDown={() => openPicker()}\n onChange={(event) => {\n const typed = event.target.value;\n setDraft(typed);\n if (typed.trim() === \"\") {\n commit(undefined);\n return;\n }\n const parsed = parseDateText(typed, locales);\n if (parsed) {\n commit(clampTime(parsed, time));\n // Follow the words: the calendar shows what was typed.\n setMonth(parsed);\n }\n }}\n onBlur={() => setDraft(null)}\n onKeyDown={(event) => {\n if (event.key === \"Escape\" && open) {\n event.preventDefault();\n setDraft(null);\n setOpen(false);\n return;\n }\n if (event.key === \"ArrowDown\") {\n event.preventDefault();\n // Hand the caret to the grid, where the arrows mean days.\n const grid = popupRef.current?.querySelector<HTMLElement>(\n \"td[data-day] button[tabindex='0']\",\n );\n if (grid) {\n grid.focus();\n return;\n }\n // Closed: the grid is not mounted yet, so the calendar takes\n // the caret itself as it appears — one press, not two.\n openPicker(true);\n }\n }}\n // Typed fields use `size`, not `field-sizing: content` — that\n // sizes from the current content and ignores `size` outright,\n // so a one-letter draft collapsed the field to 20px against\n // the shape to type. A span cannot be typed, so it hugs the\n // glyphs on screen (`Last 30 minutes`, not sixteen `M`s).\n size={width === \"hug\" && !hugToWords ? hugChars : undefined}\n className={cn(\n \"text-pho-primary placeholder:text-pho-placeholder bg-transparent outline-none\",\n hugToWords\n ? \"field-sizing-content w-auto min-w-min\"\n : width === \"hug\"\n ? \"min-w-0\"\n : \"min-w-0 flex-1\",\n mode === \"range\" && \"cursor-pointer\",\n )}\n />\n </div>\n\n <Popover.Portal>\n <Popover.Positioner anchor={fieldRef} align={align} sideOffset={6}>\n {/* Two months on a phone are taller than the room under the\n field; cap the popup at what Base UI measured and let it\n scroll rather than running off the screen. */}\n <Popover.Popup\n ref={popupRef}\n id={calendarId}\n // The field keeps the caret: the viewer is mid-word, and the\n // calendar is a second way to answer, not a takeover.\n initialFocus={false}\n finalFocus={false}\n className=\"max-h-[var(--available-height)] overflow-y-auto p-3\"\n >\n <div className=\"flex flex-col gap-3 sm:flex-row\">\n {presets?.length ? (\n // Beside the calendar where there is room, above it on a\n // phone, where a row that scrolls sideways costs no height.\n <div\n // A labelled set of buttons, not a form section.\n // oxlint-disable-next-line jsx-a11y/prefer-tag-over-role\n role=\"group\"\n aria-label=\"Presets\"\n className={cn(\n \"flex shrink-0 gap-1 overflow-x-auto\",\n \"sm:border-pho-secondary sm:w-36 sm:flex-col sm:gap-0.5 sm:overflow-visible sm:border-r sm:pr-3\",\n )}\n >\n {presets.map((preset) => (\n <button\n key={preset.label}\n type=\"button\"\n aria-pressed={preset.label === presetLabel}\n onClick={() => pickPreset(preset)}\n className={cn(\n PRESET,\n preset.label === presetLabel && PRESET_ON,\n )}\n >\n {preset.label}\n </button>\n ))}\n </div>\n ) : null}\n\n <div>\n {mode === \"range\" ? (\n <Calendar\n {...calendarProps}\n mode=\"range\"\n min={minDays}\n max={maxDays}\n month={shownMonth}\n onMonthChange={setMonth}\n // DayPicker's own prop, not the DOM attribute.\n // oxlint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={gridFocus}\n selected={range}\n onSelect={(next, clicked) => {\n const first = picks.current === 0;\n picks.current += 1;\n // Reopened on a span that is already settled: the first\n // click starts a new one. DayPicker would otherwise drag\n // the nearer end over, so asking for Sep 20 – 25 on top\n // of Sep 1 – 8 would land on Sep 1 – 25.\n if (first && range?.to) {\n const day = clampTime(\n withDay(clicked, time ? range.from : undefined),\n time,\n );\n commit({ from: day, to: new Date(day) });\n setDraft(null);\n return;\n }\n const kept = next && {\n from:\n next.from &&\n clampTime(\n withDay(\n next.from,\n time ? range?.from : undefined,\n ),\n time,\n ),\n to:\n next.to &&\n clampTime(\n withDay(next.to, time ? range?.to : undefined),\n time,\n ),\n };\n commit(kept);\n setDraft(null);\n // Second pick, and the question is answered either way:\n // both ends down, or the same day twice, which DayPicker\n // reads as clearing the span. Unless a time is still to\n // be set, which lives below.\n if (\n !time &&\n picks.current >= 2 &&\n (!kept || (kept.from && kept.to))\n ) {\n setOpen(false);\n }\n }}\n />\n ) : (\n <Calendar\n {...calendarProps}\n mode=\"single\"\n month={shownMonth}\n onMonthChange={setMonth}\n // oxlint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={gridFocus}\n selected={single}\n onSelect={(next) => {\n commit(\n next &&\n clampTime(\n withDay(next, time ? single : undefined),\n time,\n ),\n );\n setDraft(null);\n // The clock is still to be set, and it is below.\n if (!time) setOpen(false);\n }}\n />\n )}\n\n {time ? (\n <div className=\"border-pho-secondary mt-3 grid grid-cols-[auto_1fr] items-center gap-x-3 gap-y-2 border-t pt-3\">\n {mode === \"range\" ? (\n <>\n <ClockField\n label=\"From\"\n value={range?.from}\n time={time}\n onChange={(clock) => {\n if (!range?.from) return;\n const next = fromInputValue(\n `${toDateValue(range.from)}T${clock}`,\n );\n if (next) {\n commit({\n ...range,\n from: clampTime(next, time),\n });\n }\n }}\n disabled={!range?.from}\n />\n <ClockField\n label=\"To\"\n value={range?.to}\n time={time}\n onChange={(clock) => {\n if (!range?.to) return;\n const next = fromInputValue(\n `${toDateValue(range.to)}T${clock}`,\n );\n if (next) {\n commit({\n ...range,\n to: clampTime(next, time),\n });\n }\n }}\n disabled={!range?.to}\n />\n </>\n ) : (\n <ClockField\n label=\"Time\"\n value={single}\n time={time}\n onChange={(clock) => {\n if (!single) return;\n const next = fromInputValue(\n `${toDateValue(single)}T${clock}`,\n );\n if (next) commit(clampTime(next, time));\n }}\n disabled={!single}\n />\n )}\n </div>\n ) : null}\n </div>\n </div>\n </Popover.Popup>\n </Popover.Positioner>\n </Popover.Portal>\n </Popover.Root>\n )}\n\n {hint ? (\n <p\n id={hintId}\n className={cn(\n \"text-pho-description text-base\",\n invalid && \"text-pho-error\",\n )}\n >\n {hint}\n </p>\n ) : null}\n </div>\n );\n}\n\nDatePicker.displayName = \"DatePicker\";"],"ignoreList":[0],"mappings":";;;;;;;AASA,IAAMc,KAAa;AAAA,EAAC,CAAC,QAAQ;AAAA,IAAE,GAAK;AAAA,IAAkF,KAAO;AAAA,EAAQ,CAAC;AAAA,EAAG,CAAC,QAAQ;AAAA,IAAE,GAAK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EAAC4F,IAAD;AAAA,kBACE,OAAM;AAAA,kBACN,OAAO4C;AAAA,kBACD,MAAAnH;AAAA,kBACN,UAAA,CAAWyC,MAAU;AACnB,wBAAI,CAAC0E,EAAQ;AACb,0BAAMjE,IAAOrB,EACX,GAAGL,EAAY2F,CAAM,CAAA,IAAK1E,CAAA,EAC5B;AACA,oBAAIS,KAAM6D,EAAO9D,EAAUC,GAAMlD,CAAI,CAAC;AAAA,kBACxC;AAAA,kBACA,UAAU,CAACmH;AAAA,gBACZ,CAAA;AAAA,cAEA,CAAA,IACH,IACD,EAAA,CAAA,CACF;AAAA,Y;A,UACQ,CAAA;AAAA,QACG,CAAA,EACN,CAAA,CACJ;AAAA,M;A,MAGflC,IACC,gBAAAtG,EAAC,KAAD;AAAA,QACE,IAAI6H;AAAA,QACJ,WAAWxI,EACT,kCACAmH,KAAW,gBACb;AAAA,QAEC,UAAAF;AAAA,MACA,CAAA,IACD;AAAA,IACD;AAAA,E;AAET;AAEAL,GAAW,cAAc"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as s } from "./cn-
|
|
3
|
-
import { n as y } from "./copy-button-
|
|
2
|
+
import { t as s } from "./cn-CPbhpG1q.js";
|
|
3
|
+
import { n as y } from "./copy-button-BLvirhXk.js";
|
|
4
4
|
import { createContext as N, useContext as v } from "react";
|
|
5
5
|
import { jsx as t, jsxs as p } from "react/jsx-runtime";
|
|
6
6
|
var d = N("inline"), b = {
|
|
@@ -57,4 +57,4 @@ export {
|
|
|
57
57
|
D as t
|
|
58
58
|
};
|
|
59
59
|
|
|
60
|
-
//# sourceMappingURL=description-list-
|
|
60
|
+
//# sourceMappingURL=description-list-Duhhralt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"description-list-Duhhralt.js","names":["cn","CopyButton","createContext","useContext","jsx","jsxs","LayoutContext","COLUMNS","Root","layout","columns","className","props","Item","label","value","children","mono","copy","optional","empty","content","absent","copyText","copyLabel","shown","DescriptionList"],"sources":["../../src/components/description-list/description-list.tsx"],"sourcesContent":["import {\n createContext,\n useContext,\n type ComponentProps,\n type ReactNode,\n type Ref,\n} from \"react\";\nimport { CopyButton } from \"../copy-button\";\nimport { cn } from \"../../utils/cn\";\n\n/**\n * Description List — the facts about one record, label beside value:\n * the status, the request id, the time, the ip, the api version, the\n * idempotency key, the api key. A `<dl>` under the hood.\n *\n * Where `BasicPage.Row` is a 68px row built for a control on its right,\n * these are dense lines of text: `inline` puts the label in a column\n * beside the value, every label the same width (a subgrid), one line per\n * fact; `stacked` puts the label above the value and flows the pairs\n * into `columns`. A `mono` value wears the mono face with a copy\n * control after it; a value that is not there says so in muted ink.\n */\n\nexport type DescriptionListLayout = \"inline\" | \"stacked\";\n\nconst LayoutContext = createContext<DescriptionListLayout>(\"inline\");\n\nexport interface DescriptionListRootProps extends ComponentProps<\"dl\"> {\n /**\n * `inline` (default): label column beside the value column, one line\n * per item. `stacked`: label above value, pairs flowing into `columns`.\n */\n layout?: DescriptionListLayout;\n /** For `stacked`: pairs per row from `sm` up. @default 1 */\n columns?: 1 | 2 | 3;\n ref?: Ref<HTMLDListElement>;\n}\n\nconst COLUMNS: Record<1 | 2 | 3, string> = {\n 1: \"\",\n 2: \"sm:grid-cols-2\",\n 3: \"sm:grid-cols-3\",\n};\n\nfunction Root({\n layout = \"inline\",\n columns = 1,\n className,\n ...props\n}: DescriptionListRootProps) {\n return (\n <LayoutContext.Provider value={layout}>\n <dl\n data-description-list={layout}\n className={cn(\n \"m-0 grid min-w-0\",\n layout === \"inline\"\n ? \"grid-cols-[minmax(0,auto)_minmax(0,1fr)] gap-x-6\"\n : cn(\"gap-x-6 gap-y-3\", COLUMNS[columns]),\n className,\n )}\n {...props}\n />\n </LayoutContext.Provider>\n );\n}\n\nexport interface DescriptionListItemProps extends Omit<\n ComponentProps<\"div\">,\n \"children\" | \"title\"\n> {\n /** The fact's name — \"Request ID\", \"Idempotency key\". */\n label: ReactNode;\n /** The fact. A string wears the item's type; a node is yours to style. */\n value?: ReactNode;\n /** Composed content instead of `value` — a `Badge`, a link. */\n children?: ReactNode;\n /** The value in the mono face — ids, keys, addresses. */\n mono?: boolean;\n /**\n * A copy control after the value, and a click on the value copies\n * too. `true` copies a string `value`; pass the text to copy when the\n * value is composed.\n */\n copy?: boolean | string;\n /** Marks the label `(Optional)` — a fact that may not be there. */\n optional?: boolean;\n /** What an absent value says. @default \"Not set\" */\n empty?: ReactNode;\n ref?: Ref<HTMLDivElement>;\n}\n\nfunction Item({\n label,\n value,\n children,\n mono,\n copy,\n optional,\n empty = \"Not set\",\n className,\n ...props\n}: DescriptionListItemProps) {\n const layout = useContext(LayoutContext);\n const content = children ?? value;\n const absent = content == null || content === \"\" || content === false;\n const copyText =\n typeof copy === \"string\"\n ? copy\n : copy && typeof value === \"string\"\n ? value\n : null;\n // Verbatim: \"Copy Trace ID\" reads the acronym, \"Copy Meta number ID\" the brand.\n const copyLabel = typeof label === \"string\" ? label : \"value\";\n // An id keeps its line and truncates; prose wraps, in its own face\n // over the copy view's mono default.\n const shown = (\n <span\n className={cn(\n \"min-w-0\",\n mono\n ? \"truncate\"\n : \"font-sans text-base [overflow-wrap:anywhere] whitespace-normal\",\n )}\n >\n {content}\n </span>\n );\n return (\n <div\n data-description-item=\"\"\n data-empty={absent || undefined}\n className={cn(\n \"min-w-0\",\n layout === \"inline\"\n ? \"col-span-2 grid grid-cols-subgrid items-baseline py-1\"\n : \"flex flex-col gap-0.5\",\n className,\n )}\n {...props}\n >\n <dt className=\"text-pho-description min-w-0 text-base [overflow-wrap:anywhere]\">\n {label}\n {optional ? (\n <span className=\"text-pho-placeholder\"> (Optional)</span>\n ) : null}\n </dt>\n <dd\n className={cn(\n \"m-0 flex min-w-0 items-center gap-1\",\n absent\n ? \"text-pho-placeholder text-base\"\n : mono\n ? \"text-pho-primary font-mono text-xs\"\n : \"text-pho-primary text-base\",\n )}\n >\n {absent ? (\n <span className=\"truncate\">{empty}</span>\n ) : copyText != null && copyText !== \"\" ? (\n // The value is the copy control's too: a click on it copies.\n <CopyButton\n value={copyText}\n label={copyLabel}\n size=\"xs\"\n className=\"-my-1\"\n >\n {shown}\n </CopyButton>\n ) : (\n shown\n )}\n </dd>\n </div>\n );\n}\n\n/**\n * ```tsx\n * <DescriptionList.Root>\n * <DescriptionList.Item label=\"Status\"><Badge …/></DescriptionList.Item>\n * <DescriptionList.Item label=\"Request ID\" value=\"pho_req_…\" mono copy />\n * <DescriptionList.Item label=\"Idempotency key\" optional mono copy />\n * </DescriptionList.Root>\n * ```\n */\nexport const DescriptionList = { Root, Item };\n"],"mappings":";;;;;AAyBA,IAAMM,IAAgBJ,EAAqC,QAAQ,GAa7DK,IAAqC;AAAA,EACzC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,SAASC,EAAK,EACZ,QAAAC,IAAS,UACT,SAAAC,IAAU,GACV,WAAAC,GACA,GAAGC,EAAA,GACwB;AAC3B,SACE,gBAAAR,EAACE,EAAc,UAAf;AAAA,IAAwB,OAAOG;AAAA,IAC7B,UAAA,gBAAAL,EAAC,MAAD;AAAA,MACE,yBAAuBK;AAAA,MACvB,WAAWT,EACT,oBACAS,MAAW,WACP,qDACAT,EAAG,mBAAmBO,EAAQG,CAAA,CAAQ,GAC1CC,CACF;AAAA,MACA,GAAIC;AAAA,IACL,CAAA;AAAA,EACqB,CAAA;AAE5B;AA2BA,SAASC,EAAK,EACZ,OAAAC,GACA,OAAAC,GACA,UAAAC,GACA,MAAAC,GACA,MAAAC,GACA,UAAAC,GACA,OAAAC,IAAQ,WACR,WAAAT,GACA,GAAGC,EAAA,GACwB;AAC3B,QAAMH,IAASN,EAAWG,CAAa,GACjCe,IAAUL,KAAYD,GACtBO,IAASD,KAAW,QAAQA,MAAY,MAAMA,MAAY,IAC1DE,IACJ,OAAOL,KAAS,WACZA,IACAA,KAAQ,OAAOH,KAAU,WACvBA,IACA,MAEFS,IAAY,OAAOV,KAAU,WAAWA,IAAQ,SAGhDW,IACJ,gBAAArB,EAAC,QAAD;AAAA,IACE,WAAWJ,EACT,WACAiB,IACI,aACA,gEACN;AAAA,IAEC,UAAAI;AAAA,EACG,CAAA;AAER,SACE,gBAAAhB,EAAC,OAAD;AAAA,IACE,yBAAsB;AAAA,IACtB,cAAYiB,KAAU;AAAA,IACtB,WAAWtB,EACT,WACAS,MAAW,WACP,0DACA,yBACJE,CACF;AAAA,IACA,GAAIC;AAAA,IAVN,UAAA,CAYE,gBAAAP,EAAC,MAAD;AAAA,MAAI,WAAU;AAAA,MAAd,UAAA,CACGS,GACAK,IACC,gBAAAf,EAAC,QAAD;AAAA,QAAM,WAAU;AAAA,QAAuB,UAAA;AAAA,MAAiB,CAAA,IACtD,IACF;AAAA,IACJ,CAAA,GAAA,gBAAAA,EAAC,MAAD;AAAA,MACE,WAAWJ,EACT,uCACAsB,IACI,mCACAL,IACE,uCACA,4BACR;AAAA,MAEC,UAAAK,IACC,gBAAAlB,EAAC,QAAD;AAAA,QAAM,WAAU;AAAA,QAAY,UAAAgB;AAAA,MAAY,CAAA,IACtCG,KAAY,QAAQA,MAAa,KAEnC,gBAAAnB,EAACH,GAAD;AAAA,QACE,OAAOsB;AAAA,QACP,OAAOC;AAAA,QACP,MAAK;AAAA,QACL,WAAU;AAAA,QAET,UAAAC;AAAA,MACS,CAAA,IAEZA;AAAA,IAEA,CAAA,CACD;AAAA,E;AAET;AAWA,IAAaC,IAAkB;AAAA,EAAE,MAAAlB;AAAA,EAAM,MAAAK;AAAK"}
|
|
@@ -1,121 +1,122 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as
|
|
3
|
-
import { a as
|
|
4
|
-
import { t as P } from "./close-button-
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { createContext as F, useCallback as
|
|
8
|
-
import { jsx as e, jsxs as
|
|
9
|
-
import { Dialog as
|
|
2
|
+
import { t as u } from "./cn-CPbhpG1q.js";
|
|
3
|
+
import { a as V } from "./button-CLfWdqm-.js";
|
|
4
|
+
import { t as P } from "./close-button-Ck4rY1Fp.js";
|
|
5
|
+
import { t as E } from "./animated-height-zr7BmFY1.js";
|
|
6
|
+
import { t as f } from "./scroll-area-Dhl5hqay.js";
|
|
7
|
+
import { createContext as F, useCallback as L, useContext as j, useEffect as R, useMemo as M, useRef as C, useState as A } from "react";
|
|
8
|
+
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
9
|
+
import { Dialog as h } from "@base-ui/react/dialog";
|
|
10
10
|
var w = F(null);
|
|
11
|
-
function
|
|
11
|
+
function le() {
|
|
12
12
|
return j(w)?.pending ?? !1;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
const [r,
|
|
16
|
-
|
|
14
|
+
function W({ onOpenChange: t, actionsRef: n, ...o }) {
|
|
15
|
+
const [r, l] = A(!1), i = C(!1), a = C(null);
|
|
16
|
+
R(() => {
|
|
17
17
|
if (n)
|
|
18
|
-
return n.current =
|
|
18
|
+
return n.current = a.current, () => {
|
|
19
19
|
n.current = null;
|
|
20
20
|
};
|
|
21
21
|
}, [n]);
|
|
22
|
-
const d =
|
|
23
|
-
if (!
|
|
22
|
+
const d = L((p, g) => {
|
|
23
|
+
if (!p && i.current) {
|
|
24
24
|
g.cancel();
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
|
-
t?.(
|
|
27
|
+
t?.(p, g);
|
|
28
28
|
}, [t]), c = M(() => ({
|
|
29
29
|
pending: r,
|
|
30
30
|
beginPending: () => {
|
|
31
|
-
i.current = !0,
|
|
31
|
+
i.current = !0, l(!0);
|
|
32
32
|
},
|
|
33
33
|
endPending: () => {
|
|
34
|
-
i.current = !1,
|
|
34
|
+
i.current = !1, l(!1);
|
|
35
35
|
},
|
|
36
|
-
close: () =>
|
|
36
|
+
close: () => a.current?.close()
|
|
37
37
|
}), [r]);
|
|
38
38
|
return /* @__PURE__ */ e(w.Provider, {
|
|
39
39
|
value: c,
|
|
40
|
-
children: /* @__PURE__ */ e(
|
|
41
|
-
actionsRef:
|
|
40
|
+
children: /* @__PURE__ */ e(h.Root, {
|
|
41
|
+
actionsRef: a,
|
|
42
42
|
onOpenChange: d,
|
|
43
|
-
...
|
|
43
|
+
...o
|
|
44
44
|
})
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
-
var
|
|
48
|
-
function
|
|
47
|
+
var $ = h.Trigger, x = h.Portal, y = h.Close;
|
|
48
|
+
function G(t) {
|
|
49
49
|
return t != null && typeof t.then == "function";
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
const
|
|
53
|
-
|
|
51
|
+
function J({ onClick: t, loading: n, disabled: o, ...r }) {
|
|
52
|
+
const l = j(w), [i, a] = A(!1), d = C(!0);
|
|
53
|
+
R(() => (d.current = !0, () => {
|
|
54
54
|
d.current = !1;
|
|
55
55
|
}), []);
|
|
56
56
|
function c(g) {
|
|
57
57
|
if (i || n) return;
|
|
58
58
|
const m = t?.(g);
|
|
59
|
-
if (!
|
|
60
|
-
|
|
59
|
+
if (!G(m)) {
|
|
60
|
+
l?.close();
|
|
61
61
|
return;
|
|
62
62
|
}
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
a(!0), l?.beginPending(), m.then(() => {
|
|
64
|
+
l?.endPending(), d.current && a(!1), l?.close();
|
|
65
65
|
}, (v) => {
|
|
66
|
-
|
|
66
|
+
l?.endPending(), d.current && a(!1), typeof process < "u" && process.env.NODE_ENV !== "production" && console.error("Dialog.Action: async onClick rejected —", v);
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
const
|
|
70
|
-
return /* @__PURE__ */ e(
|
|
69
|
+
const p = i || n;
|
|
70
|
+
return /* @__PURE__ */ e(V, {
|
|
71
71
|
...r,
|
|
72
|
-
disabled:
|
|
73
|
-
loading:
|
|
72
|
+
disabled: o || p,
|
|
73
|
+
loading: p,
|
|
74
74
|
onClick: c
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
77
|
function z({ className: t, ...n }) {
|
|
78
|
-
return /* @__PURE__ */ e(
|
|
79
|
-
className:
|
|
78
|
+
return /* @__PURE__ */ e(h.Backdrop, {
|
|
79
|
+
className: u("bg-pho-overlay fixed inset-0 z-50 transition-opacity duration-200 ease-out", "data-[ending-style]:opacity-0 data-[ending-style]:duration-150 data-[starting-style]:opacity-0", t),
|
|
80
80
|
...n
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
|
-
function
|
|
84
|
-
return /* @__PURE__ */ e(
|
|
85
|
-
className:
|
|
83
|
+
function S({ className: t, ...n }) {
|
|
84
|
+
return /* @__PURE__ */ e(h.Popup, {
|
|
85
|
+
className: u("border-pho-secondary bg-pho-primary shadow-pho-xl fixed top-1/2 left-1/2 z-50 w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 overflow-hidden rounded-lg border outline-none", "flex max-h-[calc(100dvh-2rem)] flex-col sm:max-h-[calc(100dvh-4rem)]", "transition-[opacity,scale] duration-200 ease-out", "data-[starting-style]:scale-95 data-[starting-style]:opacity-0", "data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:duration-150", t),
|
|
86
86
|
...n
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
89
|
function N({ className: t, ...n }) {
|
|
90
|
-
return /* @__PURE__ */ e(
|
|
91
|
-
className:
|
|
90
|
+
return /* @__PURE__ */ e(h.Title, {
|
|
91
|
+
className: u("text-pho-primary font-display text-display-sm font-medium text-balance", t),
|
|
92
92
|
...n
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
95
|
function b({ className: t, ...n }) {
|
|
96
|
-
return /* @__PURE__ */ e(
|
|
97
|
-
className:
|
|
96
|
+
return /* @__PURE__ */ e(h.Description, {
|
|
97
|
+
className: u("text-pho-description text-display-xs font-normal", t),
|
|
98
98
|
...n
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
101
|
function B({ children: t, size: n = "md" }) {
|
|
102
102
|
return /* @__PURE__ */ e("span", {
|
|
103
103
|
"aria-hidden": !0,
|
|
104
|
-
className:
|
|
104
|
+
className: u("text-pho-secondary mb-1", n === "lg" ? "[&>svg]:size-12" : "[&>svg]:size-8"),
|
|
105
105
|
children: t
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
108
|
+
var k = "[&:has(>:nth-child(3))>:first-child]:me-auto";
|
|
109
|
+
function K({ icon: t, title: n, description: o, consequences: r, warning: l, actions: i, caption: a, showClose: d = !0, children: c, className: p, ...g }) {
|
|
110
|
+
const m = i == null && d, v = !!(t || n || o || m), T = r != null && r.length > 0, D = T || l != null || c != null;
|
|
111
|
+
return /* @__PURE__ */ s(x, { children: [/* @__PURE__ */ e(z, {}), /* @__PURE__ */ s(S, {
|
|
112
|
+
className: p,
|
|
112
113
|
...g,
|
|
113
114
|
children: [
|
|
114
|
-
v && /* @__PURE__ */
|
|
115
|
+
v && /* @__PURE__ */ s("div", {
|
|
115
116
|
className: "flex shrink-0 flex-col gap-1 px-6 pt-6",
|
|
116
117
|
children: [
|
|
117
118
|
t && /* @__PURE__ */ e(B, { children: t }),
|
|
118
|
-
(n || m) && /* @__PURE__ */
|
|
119
|
+
(n || m) && /* @__PURE__ */ s("div", {
|
|
119
120
|
className: "relative",
|
|
120
121
|
children: [n ? /* @__PURE__ */ e(N, {
|
|
121
122
|
className: m ? "pr-12" : void 0,
|
|
@@ -125,57 +126,57 @@ function L({ icon: t, title: n, description: s, consequences: r, warning: a, act
|
|
|
125
126
|
"aria-hidden": "true"
|
|
126
127
|
}), m && /* @__PURE__ */ e(y, { render: /* @__PURE__ */ e(P, { className: "absolute top-1/2 right-0 z-10 -translate-y-1/2" }) })]
|
|
127
128
|
}),
|
|
128
|
-
|
|
129
|
+
o && /* @__PURE__ */ e(b, { children: o })
|
|
129
130
|
]
|
|
130
131
|
}),
|
|
131
|
-
D && /* @__PURE__ */
|
|
132
|
+
D && /* @__PURE__ */ s(f.Root, {
|
|
132
133
|
className: "min-h-0 flex-1",
|
|
133
|
-
children: [/* @__PURE__ */ e(
|
|
134
|
+
children: [/* @__PURE__ */ e(f.Viewport, { children: /* @__PURE__ */ s(f.Content, {
|
|
134
135
|
className: "flex flex-col gap-5 px-6 py-5",
|
|
135
136
|
children: [
|
|
136
|
-
|
|
137
|
+
T && /* @__PURE__ */ e("ul", {
|
|
137
138
|
className: "text-pho-description text-md [&_strong]:text-pho-secondary space-y-1 [&_strong]:font-medium",
|
|
138
|
-
children: r.map((
|
|
139
|
+
children: r.map((_, O) => /* @__PURE__ */ e("li", {
|
|
139
140
|
className: "relative pl-4 before:absolute before:top-2.5 before:left-1 before:size-1 before:rounded-full before:bg-current",
|
|
140
|
-
children:
|
|
141
|
-
},
|
|
141
|
+
children: _
|
|
142
|
+
}, O))
|
|
142
143
|
}),
|
|
143
|
-
|
|
144
|
+
l != null && /* @__PURE__ */ e("p", {
|
|
144
145
|
className: "text-pho-error text-display-xs font-medium",
|
|
145
|
-
children:
|
|
146
|
+
children: l
|
|
146
147
|
}),
|
|
147
148
|
c
|
|
148
149
|
]
|
|
149
|
-
}) }), /* @__PURE__ */ e(
|
|
150
|
+
}) }), /* @__PURE__ */ e(f.Scrollbar, { children: /* @__PURE__ */ e(f.Thumb, {}) })]
|
|
150
151
|
}),
|
|
151
|
-
(i != null ||
|
|
152
|
-
className:
|
|
153
|
-
children: [
|
|
152
|
+
(i != null || a != null) && /* @__PURE__ */ s("div", {
|
|
153
|
+
className: u("flex shrink-0 flex-wrap items-center justify-end gap-x-2 gap-y-3 px-6 pb-5", a == null && k, !D && "pt-5"),
|
|
154
|
+
children: [a != null && /* @__PURE__ */ e("p", {
|
|
154
155
|
"data-dialog-caption": "",
|
|
155
156
|
className: "text-pho-description min-w-48 flex-1 pr-2 text-xs",
|
|
156
|
-
children:
|
|
157
|
+
children: a
|
|
157
158
|
}), i]
|
|
158
159
|
})
|
|
159
160
|
]
|
|
160
161
|
})] });
|
|
161
162
|
}
|
|
162
163
|
function H({ className: t, ...n }) {
|
|
163
|
-
return /* @__PURE__ */ e(
|
|
164
|
-
className:
|
|
164
|
+
return /* @__PURE__ */ e(h.Popup, {
|
|
165
|
+
className: u("border-pho-secondary bg-pho-primary shadow-pho-xl fixed inset-4 z-50 flex flex-col overflow-hidden rounded-lg border outline-none sm:inset-8", "transition-[opacity,scale] duration-200 ease-out", "data-[starting-style]:scale-[0.98] data-[starting-style]:opacity-0", "data-[ending-style]:scale-[0.98] data-[ending-style]:opacity-0 data-[ending-style]:duration-150", t),
|
|
165
166
|
...n
|
|
166
167
|
});
|
|
167
168
|
}
|
|
168
|
-
function Q({ icon: t, title: n, description:
|
|
169
|
-
const c = r == null &&
|
|
170
|
-
return /* @__PURE__ */
|
|
171
|
-
className:
|
|
169
|
+
function Q({ icon: t, title: n, description: o, actions: r, showClose: l = !0, children: i, className: a, ...d }) {
|
|
170
|
+
const c = r == null && l;
|
|
171
|
+
return /* @__PURE__ */ s(x, { children: [/* @__PURE__ */ e(z, {}), /* @__PURE__ */ s(H, {
|
|
172
|
+
className: a,
|
|
172
173
|
...d,
|
|
173
174
|
children: [
|
|
174
|
-
!!(t || n ||
|
|
175
|
+
!!(t || n || o || c) && /* @__PURE__ */ s("div", {
|
|
175
176
|
className: "flex shrink-0 flex-col gap-1 px-6 pt-6",
|
|
176
177
|
children: [
|
|
177
178
|
t && /* @__PURE__ */ e(B, { children: t }),
|
|
178
|
-
(n || c) && /* @__PURE__ */
|
|
179
|
+
(n || c) && /* @__PURE__ */ s("div", {
|
|
179
180
|
className: "relative",
|
|
180
181
|
children: [n ? /* @__PURE__ */ e(N, {
|
|
181
182
|
className: c ? "pr-12" : void 0,
|
|
@@ -185,41 +186,41 @@ function Q({ icon: t, title: n, description: s, actions: r, showClose: a = !0, c
|
|
|
185
186
|
"aria-hidden": "true"
|
|
186
187
|
}), c && /* @__PURE__ */ e(y, { render: /* @__PURE__ */ e(P, { className: "absolute top-1/2 right-0 z-10 -translate-y-1/2" }) })]
|
|
187
188
|
}),
|
|
188
|
-
|
|
189
|
+
o && /* @__PURE__ */ e(b, { children: o })
|
|
189
190
|
]
|
|
190
191
|
}),
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
+
/* @__PURE__ */ s(f.Root, {
|
|
192
193
|
className: "min-h-0 flex-1",
|
|
193
|
-
children: [/* @__PURE__ */ e(
|
|
194
|
+
children: [/* @__PURE__ */ e(f.Viewport, { children: /* @__PURE__ */ e(f.Content, {
|
|
194
195
|
className: "px-6 py-5",
|
|
195
196
|
children: i
|
|
196
|
-
}) }), /* @__PURE__ */ e(
|
|
197
|
+
}) }), /* @__PURE__ */ e(f.Scrollbar, { children: /* @__PURE__ */ e(f.Thumb, {}) })]
|
|
197
198
|
}),
|
|
198
199
|
r != null && /* @__PURE__ */ e("div", {
|
|
199
|
-
className: "flex shrink-0 items-center justify-end gap-2 px-6 pb-5",
|
|
200
|
+
className: u("flex shrink-0 items-center justify-end gap-2 px-6 pb-5", k),
|
|
200
201
|
children: r
|
|
201
202
|
})
|
|
202
203
|
]
|
|
203
204
|
})] });
|
|
204
205
|
}
|
|
205
|
-
function
|
|
206
|
-
return /* @__PURE__ */ e(
|
|
207
|
-
className:
|
|
206
|
+
function I({ className: t, ...n }) {
|
|
207
|
+
return /* @__PURE__ */ e(h.Popup, {
|
|
208
|
+
className: u("bg-pho-page fixed inset-0 z-50 overflow-y-auto outline-none", "transition-opacity duration-200 ease-out", "data-[ending-style]:opacity-0 data-[ending-style]:duration-150 data-[starting-style]:opacity-0", t),
|
|
208
209
|
...n
|
|
209
210
|
});
|
|
210
211
|
}
|
|
211
|
-
function U({ icon: t, title: n, description:
|
|
212
|
-
const
|
|
213
|
-
return /* @__PURE__ */ e(x, { children: /* @__PURE__ */
|
|
212
|
+
function U({ icon: t, title: n, description: o, actions: r, showClose: l = !0, frameClassName: i, children: a, className: d, ...c }) {
|
|
213
|
+
const p = r == null && l;
|
|
214
|
+
return /* @__PURE__ */ e(x, { children: /* @__PURE__ */ s(I, {
|
|
214
215
|
className: d,
|
|
215
216
|
...c,
|
|
216
|
-
children: [
|
|
217
|
-
className:
|
|
218
|
-
children: /* @__PURE__ */
|
|
217
|
+
children: [p && /* @__PURE__ */ e(y, { render: /* @__PURE__ */ e(P, { className: "fixed top-4 right-4 z-10" }) }), /* @__PURE__ */ e("div", {
|
|
218
|
+
className: u("flex min-h-full items-center justify-center px-6 pt-6 pb-20", i),
|
|
219
|
+
children: /* @__PURE__ */ s("div", {
|
|
219
220
|
className: "w-full max-w-md",
|
|
220
|
-
children: [/* @__PURE__ */
|
|
221
|
+
children: [/* @__PURE__ */ s(E, {
|
|
221
222
|
className: "flex flex-col gap-5",
|
|
222
|
-
children: [(t || n ||
|
|
223
|
+
children: [(t || n || o) && /* @__PURE__ */ s("div", {
|
|
223
224
|
className: "flex flex-col gap-1",
|
|
224
225
|
children: [
|
|
225
226
|
t && /* @__PURE__ */ e(B, {
|
|
@@ -227,11 +228,11 @@ function U({ icon: t, title: n, description: s, actions: r, showClose: a = !0, f
|
|
|
227
228
|
children: t
|
|
228
229
|
}),
|
|
229
230
|
n && /* @__PURE__ */ e(N, { children: n }),
|
|
230
|
-
|
|
231
|
+
o && /* @__PURE__ */ e(b, { children: o })
|
|
231
232
|
]
|
|
232
|
-
}),
|
|
233
|
+
}), a]
|
|
233
234
|
}), r != null && /* @__PURE__ */ e("div", {
|
|
234
|
-
className: "mt-5 flex items-center justify-end gap-2",
|
|
235
|
+
className: u("mt-5 flex items-center justify-end gap-2", k),
|
|
235
236
|
children: r
|
|
236
237
|
})]
|
|
237
238
|
})
|
|
@@ -239,24 +240,24 @@ function U({ icon: t, title: n, description: s, actions: r, showClose: a = !0, f
|
|
|
239
240
|
}) });
|
|
240
241
|
}
|
|
241
242
|
var ae = {
|
|
242
|
-
Root:
|
|
243
|
-
Trigger:
|
|
243
|
+
Root: W,
|
|
244
|
+
Trigger: $,
|
|
244
245
|
Portal: x,
|
|
245
246
|
Backdrop: z,
|
|
246
|
-
Popup:
|
|
247
|
+
Popup: S,
|
|
247
248
|
InsetPopup: H,
|
|
248
|
-
FullscreenPopup:
|
|
249
|
+
FullscreenPopup: I,
|
|
249
250
|
Title: N,
|
|
250
251
|
Description: b,
|
|
251
252
|
Close: y,
|
|
252
|
-
Action:
|
|
253
|
-
Content:
|
|
253
|
+
Action: J,
|
|
254
|
+
Content: K,
|
|
254
255
|
InsetContent: Q,
|
|
255
256
|
FullscreenContent: U
|
|
256
257
|
};
|
|
257
258
|
export {
|
|
258
|
-
|
|
259
|
+
le as n,
|
|
259
260
|
ae as t
|
|
260
261
|
};
|
|
261
262
|
|
|
262
|
-
//# sourceMappingURL=dialog-
|
|
263
|
+
//# sourceMappingURL=dialog-DORIrfyJ.js.map
|