efficient-shell 8.17.0 → 8.18.1
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 +69 -6
- package/dist/{Browser-GZXTAL7Z.js → Browser-EE7TUWTN.js} +14 -14
- package/dist/Calculator-YTIRFXXR.js +29 -0
- package/dist/{CurrencyConverter-XK6SETYS.js → CurrencyConverter-NDMWLX7M.js} +8 -8
- package/dist/{Documents-GXYD4UD2.js → Documents-XSDBD4T7.js} +19 -19
- package/dist/Files-B5HKRQN3.js +87 -0
- package/dist/{Notepad-L4TKPWZ7.js → Notepad-2SXHFPFX.js} +10 -10
- package/dist/PdfViewer-456B27TB.js +1 -0
- package/dist/{PomodoroTimer-D37Y6TE7.js → PomodoroTimer-L72X22QZ.js} +58 -58
- package/dist/{Preview-MPDXIVGC.js → Preview-DJHBCRKW.js} +47 -47
- package/dist/Sidebar-YCSGGCLW.js +43 -0
- package/dist/{Spreadsheet-JBPWIBDY.js → Spreadsheet-VHFYYFLK.js} +13 -13
- package/dist/{Stock-ZUTJX6S6.js → Stock-C3DDF3V3.js} +7 -7
- package/dist/{Weather-4GPPPHK5.js → Weather-2XG5AIW2.js} +19 -19
- package/dist/{WorldClock-TW36BP7G.js → WorldClock-2MU5CFUN.js} +6 -6
- package/dist/ai/index.js +15 -15
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/CartesianPlot.js +1 -1
- package/dist/charts/ChartBrush.js +1 -1
- package/dist/charts/ChartFrame.js +1 -1
- package/dist/charts/ChartSkeleton.js +1 -1
- package/dist/charts/ChordChart.js +1 -1
- package/dist/charts/ColumnChart.js +1 -1
- package/dist/charts/FunnelChart.js +1 -1
- package/dist/charts/HeatmapChart.js +1 -1
- package/dist/charts/HistogramChart.js +1 -1
- package/dist/charts/Meter.js +1 -1
- package/dist/charts/PieChart.js +1 -1
- package/dist/charts/RadarChart.js +1 -1
- package/dist/charts/RadialBarChart.js +1 -1
- package/dist/charts/RangeChart.js +1 -1
- package/dist/charts/RankedBars.js +1 -1
- package/dist/charts/SankeyChart.js +1 -1
- package/dist/charts/ScatterChart.js +1 -1
- package/dist/charts/StatTile.js +1 -1
- package/dist/charts/SunburstChart.js +1 -1
- package/dist/charts/TimeSeriesChart.js +1 -1
- package/dist/charts/TreemapChart.js +1 -1
- package/dist/charts/WaterfallChart.js +1 -1
- package/dist/{chunk-KIGGG3LT.js → chunk-2MMEGCYI.js} +1 -1
- package/dist/{chunk-WAMBQNDN.js → chunk-2QYQDCJE.js} +14 -14
- package/dist/{chunk-T6L6HQI5.js → chunk-2RKTVTJJ.js} +1 -1
- package/dist/{chunk-42U4LJT7.js → chunk-2VFRVO3N.js} +26 -26
- package/dist/{chunk-B4LK7WL6.js → chunk-2YZ3ITNG.js} +2 -2
- package/dist/{chunk-CP6Q24MP.js → chunk-2ZIVFBJN.js} +8 -8
- package/dist/{chunk-LJSJFS2M.js → chunk-37DRDM4D.js} +12 -12
- package/dist/{chunk-2VLQECPC.js → chunk-3NU2B2WM.js} +9 -9
- package/dist/{chunk-QV2GME3Y.js → chunk-3XLDWJDG.js} +6 -6
- package/dist/{chunk-VJPJNCB4.js → chunk-42BBJJDP.js} +2 -1
- package/dist/{chunk-TWWJLFTD.js → chunk-4JCNWUVZ.js} +4 -4
- package/dist/{chunk-7UBV5MPQ.js → chunk-4NB3WHWK.js} +1 -1
- package/dist/{chunk-O6TKI4F5.js → chunk-4S724CEA.js} +1 -1
- package/dist/{chunk-S2ONNZVX.js → chunk-56CQPUIJ.js} +15 -15
- package/dist/{chunk-CASSD64W.js → chunk-5N6VSOZV.js} +5 -5
- package/dist/chunk-5QFPTDQF.js +1 -0
- package/dist/{chunk-UL4WB3VH.js → chunk-5WYCXSUM.js} +1 -1
- package/dist/{chunk-NIULZZAI.js → chunk-6EAVTBKE.js} +1 -1
- package/dist/{chunk-XF2NZVXW.js → chunk-6JLZMVVE.js} +6 -6
- package/dist/{chunk-RECXXFYW.js → chunk-6MN2JR25.js} +8 -8
- package/dist/{chunk-SDIGC5NU.js → chunk-73FD77RD.js} +1 -1
- package/dist/{chunk-QP2S2K2Y.js → chunk-7GCBMTP2.js} +3 -3
- package/dist/{chunk-PRR2GXBV.js → chunk-7NOU275V.js} +2 -2
- package/dist/{chunk-IJMV4F2Q.js → chunk-A3MOA3T7.js} +1 -1
- package/dist/{chunk-OS57C5J7.js → chunk-A3R6DKQ5.js} +1 -1
- package/dist/{chunk-KLAZTKN2.js → chunk-AAYACT5T.js} +4 -4
- package/dist/{chunk-Y3XH4HJQ.js → chunk-ABD34D3N.js} +3 -3
- package/dist/chunk-AG3ALTVD.js +20 -0
- package/dist/{chunk-LI7D6SMK.js → chunk-APMBWBD7.js} +1 -1
- package/dist/{chunk-UWHGJTAL.js → chunk-B6BE4WSP.js} +6 -6
- package/dist/chunk-BE4APEUI.js +2 -0
- package/dist/{chunk-OU3ITBK5.js → chunk-BG5BCF64.js} +6 -6
- package/dist/{chunk-ENSA3NAS.js → chunk-BJGD2ZWK.js} +1 -1
- package/dist/{chunk-O3WSAR62.js → chunk-BVDGHZ4H.js} +1 -1
- package/dist/{chunk-7KYFOYC7.js → chunk-CG4KTWP4.js} +5 -5
- package/dist/chunk-CGY5RNAF.js +3 -0
- package/dist/chunk-CKDFXYYY.js +8 -0
- package/dist/{chunk-XTPDXB4X.js → chunk-DBBUHXRT.js} +1 -1
- package/dist/{chunk-XKCEVZZB.js → chunk-DGTP6BGV.js} +1 -1
- package/dist/{chunk-CTB634WT.js → chunk-DQEST7MN.js} +1 -1
- package/dist/{chunk-QIEMOYTG.js → chunk-DTJQHW3Q.js} +1 -1
- package/dist/chunk-EA37JL6P.js +3 -0
- package/dist/{chunk-PSOHSTXL.js → chunk-EFUQ4KAH.js} +1 -1
- package/dist/{chunk-SWSN3HZX.js → chunk-EO2XHSIK.js} +2 -2
- package/dist/{chunk-HEJTHEXN.js → chunk-EOPPYQIT.js} +1 -1
- package/dist/chunk-EUFALBK3.js +1 -0
- package/dist/{chunk-76YDO3KA.js → chunk-F2HM7SV4.js} +1 -1
- package/dist/{chunk-GATOVTJT.js → chunk-FJ72DO6A.js} +1 -1
- package/dist/{chunk-KSYNJTVA.js → chunk-FJUFQXDS.js} +20 -20
- package/dist/chunk-FNQJO3HZ.js +11 -0
- package/dist/{chunk-EDYCBXWD.js → chunk-FTQ5DH5U.js} +7 -7
- package/dist/chunk-GTRUBA2R.js +1 -0
- package/dist/chunk-GVKFLNRP.js +12 -0
- package/dist/{chunk-YYUICWSB.js → chunk-GVYJYXVH.js} +7 -7
- package/dist/{chunk-PDPBIDHF.js → chunk-HBBTB6RW.js} +1 -1
- package/dist/{chunk-2LKH6JM5.js → chunk-HIDOSOI4.js} +1 -1
- package/dist/{chunk-MH4EUGAB.js → chunk-HKAWQF7O.js} +7 -7
- package/dist/{chunk-HEM6NC23.js → chunk-HKTU536H.js} +1 -1
- package/dist/{chunk-4B7ZRWDA.js → chunk-HMA4ZSCS.js} +1 -1
- package/dist/{chunk-IH2DJOTW.js → chunk-HNFLUVVM.js} +10 -10
- package/dist/{chunk-S3RTAWEU.js → chunk-HQIUFRWO.js} +13 -13
- package/dist/{chunk-BMBQ3IX3.js → chunk-HQNR4JQG.js} +1 -1
- package/dist/{chunk-5BLAPU7W.js → chunk-I5T3A4KI.js} +1 -1
- package/dist/chunk-IC72MGON.js +1 -0
- package/dist/{chunk-WKSVUJZA.js → chunk-JBMGI5YX.js} +3 -3
- package/dist/{chunk-SNDYD76W.js → chunk-JLDGZFNY.js} +10 -10
- package/dist/chunk-JSOO4O5K.js +10 -0
- package/dist/chunk-JSVYN6D6.js +3 -0
- package/dist/{chunk-4AFNDOPF.js → chunk-K2DUF2AR.js} +1 -1
- package/dist/{chunk-BGVN7HOZ.js → chunk-K5UPORAA.js} +2 -2
- package/dist/{chunk-KBHC4VLA.js → chunk-KAELFRN4.js} +1 -1
- package/dist/{chunk-HPQ56MKK.js → chunk-KH6GERFP.js} +1 -1
- package/dist/{chunk-ION2GBY3.js → chunk-KIYO4U4T.js} +12 -12
- package/dist/{chunk-YO52QEKT.js → chunk-KW4VUPJV.js} +9 -9
- package/dist/chunk-LACL4MAR.js +1 -0
- package/dist/{chunk-2DGTGJYJ.js → chunk-LAHK4WVH.js} +7 -7
- package/dist/{chunk-4EIGXW4U.js → chunk-LDHYCVMV.js} +1 -1
- package/dist/{chunk-EKFIRCNP.js → chunk-LJVLMM3Q.js} +8 -8
- package/dist/{chunk-RQARJHDB.js → chunk-LWGNNVDA.js} +1 -1
- package/dist/{chunk-ZEDYXP2J.js → chunk-MKTO2FHK.js} +1 -1
- package/dist/chunk-MNQ6EPAR.js +9 -0
- package/dist/{chunk-VAACOJ2H.js → chunk-MPN267PR.js} +1 -1
- package/dist/{chunk-DVFMCVI5.js → chunk-MVYOBV4I.js} +2 -2
- package/dist/{chunk-2M5JD52X.js → chunk-MWGVFDEV.js} +2 -2
- package/dist/{chunk-PK4ZY4GZ.js → chunk-NADUURUA.js} +3 -3
- package/dist/{chunk-EDEQRSJC.js → chunk-NQ46AZ3D.js} +1 -1
- package/dist/{chunk-EVKBV6IV.js → chunk-NU55QIUV.js} +1 -1
- package/dist/{chunk-5GHLKEJQ.js → chunk-O5PJELY7.js} +1 -1
- package/dist/chunk-OLFYNMTD.js +1 -0
- package/dist/{chunk-CD6PGAYP.js → chunk-P5ILG2DA.js} +1 -1
- package/dist/{chunk-OHHJF547.js → chunk-P5QRK7WD.js} +1 -1
- package/dist/{chunk-PG665FWX.js → chunk-PEEVPAIJ.js} +9 -9
- package/dist/{chunk-E4YSP5RD.js → chunk-Q6BY4BME.js} +2 -2
- package/dist/{chunk-LC52BB6N.js → chunk-QAR4NYW6.js} +1 -1
- package/dist/{chunk-35DHYR37.js → chunk-QCP4F6EF.js} +1 -1
- package/dist/{chunk-T2VNNW6Z.js → chunk-QMLG5XKP.js} +7 -7
- package/dist/chunk-QSVKEONU.js +2 -0
- package/dist/{chunk-TUT6SGH2.js → chunk-QSW26NAH.js} +1 -1
- package/dist/{chunk-UWNL4FO2.js → chunk-QTK5NV7L.js} +1 -1
- package/dist/{chunk-6AKXEUZA.js → chunk-QTNPOMXM.js} +5 -5
- package/dist/chunk-QYGBWH5J.js +15 -0
- package/dist/{chunk-MV7WC6SL.js → chunk-R6WJ2NTT.js} +45 -45
- package/dist/{chunk-C4D4L2E5.js → chunk-RPY7FBYY.js} +1 -1
- package/dist/{chunk-SEFPZXO5.js → chunk-S2PKTGHB.js} +6 -6
- package/dist/{chunk-HHXP34PV.js → chunk-SACUPX6L.js} +4 -4
- package/dist/{chunk-LT2MMSHH.js → chunk-SGVIMTN6.js} +16 -16
- package/dist/{chunk-PMJMPYLQ.js → chunk-SLC3KT7F.js} +4 -4
- package/dist/{chunk-LR2X6MKB.js → chunk-SS7BG7BS.js} +1 -1
- package/dist/{chunk-RD5UPROC.js → chunk-TDAFCJY7.js} +6 -6
- package/dist/{chunk-HXXUMKTV.js → chunk-TF3E5J3Y.js} +1 -1
- package/dist/chunk-TQP3L4OC.js +7 -0
- package/dist/{chunk-TLZVEW34.js → chunk-TSOK3QNK.js} +4 -4
- package/dist/chunk-U5KIRPLV.js +2 -0
- package/dist/chunk-U5YJREQJ.js +14 -0
- package/dist/{chunk-QQVLFDX6.js → chunk-UB6TIA2R.js} +4 -4
- package/dist/{chunk-QGU24ERZ.js → chunk-UJULZQM2.js} +1 -1
- package/dist/{chunk-XZLBPVRH.js → chunk-UNDHDLWB.js} +1 -1
- package/dist/chunk-UPHXYWL6.js +15 -0
- package/dist/{chunk-7KZ65FSA.js → chunk-USE4HNZ2.js} +1 -1
- package/dist/{chunk-7IHH5CDD.js → chunk-V5GDA4I6.js} +3 -3
- package/dist/{chunk-JIJOXLDJ.js → chunk-V7NVQ3Z7.js} +1 -1
- package/dist/{chunk-GLVEL6AQ.js → chunk-VKLVHULL.js} +9 -9
- package/dist/chunk-VLKDWKVR.js +1 -0
- package/dist/chunk-VSQSBY2P.js +5 -0
- package/dist/chunk-W4YNYZDQ.js +6 -0
- package/dist/{chunk-TYEXEETI.js → chunk-WDIFRAQM.js} +5 -5
- package/dist/chunk-WEJFTUS7.js +9 -0
- package/dist/{chunk-65HOBHY7.js → chunk-WOHOIJRZ.js} +3 -3
- package/dist/{chunk-AGPQEI3I.js → chunk-WVSLFX37.js} +7 -7
- package/dist/{chunk-BUDBBIKN.js → chunk-WVWIRII2.js} +9 -9
- package/dist/chunk-XDG2RWUO.js +2 -0
- package/dist/{chunk-EPGKTANF.js → chunk-XW56UIDQ.js} +6 -6
- package/dist/{chunk-VANXHWGP.js → chunk-Y67ILJVG.js} +1 -1
- package/dist/{chunk-PEELLEPP.js → chunk-YFY2LSWZ.js} +6 -6
- package/dist/{chunk-FARRGETL.js → chunk-YGITR6I5.js} +1 -1
- package/dist/chunk-YULJ7F6Z.js +19 -0
- package/dist/{chunk-PRXPLEVZ.js → chunk-Z3ZIVVKE.js} +1 -1
- package/dist/{chunk-R6XC7X63.js → chunk-Z7PS4QUO.js} +6 -6
- package/dist/{chunk-PPSIMRJM.js → chunk-ZGCLFQS5.js} +7 -7
- package/dist/{chunk-JHXYW542.js → chunk-ZQGPJZY4.js} +3 -3
- package/dist/{chunk-YT32RSS6.js → chunk-ZVK74ERI.js} +1 -1
- package/dist/{chunk-6EJ7G234.js → chunk-ZVY4J3PU.js} +7 -7
- package/dist/chunk-ZWQRFYE6.js +11 -0
- package/dist/{chunk-2OTCFJCU.js → chunk-ZXI4CWTI.js} +1 -1
- package/dist/data/DataTable.js +1 -1
- package/dist/data/Kanban.js +1 -1
- package/dist/data/ListFooter.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/Pagination.js +1 -1
- package/dist/file-intake/index.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Calendar.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DatePicker.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DateTimePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/FormErrorSummary.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/ImageFocusPoint.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.d.ts +24 -0
- package/dist/forms/MediaUsedInList.js +2 -0
- package/dist/forms/NumericKeypad.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/Select.js +1 -1
- package/dist/forms/SidesInput.js +1 -1
- package/dist/forms/Slider.js +1 -1
- package/dist/forms/Snippet.js +1 -1
- package/dist/forms/SplitButton.js +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/TimePicker.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/mediaMoveItems.d.ts +31 -0
- package/dist/forms/mediaMoveItems.js +2 -0
- package/dist/forms/useFileIntake.js +1 -1
- package/dist/hooks/useGridSelection.d.ts +70 -0
- package/dist/hooks/useGridSelection.js +2 -0
- package/dist/hooks/useMarquee.d.ts +68 -0
- package/dist/hooks/useMarquee.js +2 -0
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +20 -3
- package/dist/index.js +695 -694
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +4 -4
- package/dist/markdown/index.js +1 -1
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/shell/Accordion.js +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/Avatar.js +1 -1
- package/dist/shell/Banner.js +1 -1
- package/dist/shell/Breadcrumbs.js +1 -1
- package/dist/shell/BudgetBar.js +1 -1
- package/dist/shell/Card.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContainerFillChart.js +1 -1
- package/dist/shell/ContextMenu.d.ts +12 -4
- package/dist/shell/ContextMenu.js +1 -1
- package/dist/shell/CountBadge.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/DropdownMenu.d.ts +18 -2
- package/dist/shell/DropdownMenu.js +1 -1
- package/dist/shell/EditableGrid.js +1 -1
- package/dist/shell/EmptyState.js +1 -1
- package/dist/shell/GlobalSearch.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/IconRail.js +1 -1
- package/dist/shell/ImageLightbox.d.ts +32 -0
- package/dist/shell/ImageLightbox.js +2 -0
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/MarqueeBox.d.ts +17 -0
- package/dist/shell/MarqueeBox.js +1 -0
- package/dist/shell/MetricBar.js +1 -1
- package/dist/shell/MetricBarLegend.js +1 -1
- package/dist/shell/MilestoneTimeline.js +1 -1
- package/dist/shell/PageHeader.js +1 -1
- package/dist/shell/PopupMenu.d.ts +9 -1
- package/dist/shell/PopupMenu.js +1 -1
- package/dist/shell/ProductionTimeline.js +1 -1
- package/dist/shell/ResizeHandle.js +1 -1
- package/dist/shell/Result.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SettingRow.js +1 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/SidebarNav.js +1 -1
- package/dist/shell/SortableList.js +1 -1
- package/dist/shell/Statistic.js +1 -1
- package/dist/shell/StepChain.js +1 -1
- package/dist/shell/Stepper.js +1 -1
- package/dist/shell/TimeAgo.js +1 -1
- package/dist/shell/TimelineTrack.js +1 -1
- package/dist/shell/TopNav.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/ZoomableImage.d.ts +49 -0
- package/dist/shell/ZoomableImage.js +2 -0
- package/dist/shell/contextMenuTarget.d.ts +30 -4
- package/dist/shell/contextMenuTarget.js +1 -1
- package/dist/shell/language.js +1 -1
- package/dist/shell/strings.d.ts +23 -0
- package/dist/shell/strings.js +1 -1
- package/dist/shell/toast.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/AuthScreen.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DashboardTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/ErrorBoundary.js +1 -1
- package/dist/templates/ErrorPage.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.d.ts +10 -2
- package/dist/ui/index.js +1 -1
- package/dist/utils/edgeScroll.d.ts +25 -0
- package/dist/utils/edgeScroll.js +1 -0
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-TYZWIYJW.js +0 -29
- package/dist/Files-OYZXQMRA.js +0 -87
- package/dist/PdfViewer-Q7IS273H.js +0 -1
- package/dist/Sidebar-F4LYK5XP.js +0 -43
- package/dist/chunk-26DGOAPH.js +0 -14
- package/dist/chunk-3S52QOEP.js +0 -20
- package/dist/chunk-62LFDQGF.js +0 -15
- package/dist/chunk-6TWRV44R.js +0 -15
- package/dist/chunk-7GU3LUMW.js +0 -11
- package/dist/chunk-7IF3RZF3.js +0 -15
- package/dist/chunk-7UEFFCQV.js +0 -12
- package/dist/chunk-ARC3R4I2.js +0 -3
- package/dist/chunk-B3LWYJS7.js +0 -2
- package/dist/chunk-GLCKZI3N.js +0 -1
- package/dist/chunk-GZCAFWWB.js +0 -1
- package/dist/chunk-LPYFS4RV.js +0 -19
- package/dist/chunk-OVNRVFWS.js +0 -1
- package/dist/chunk-R6N26ITY.js +0 -5
- package/dist/chunk-RKWGWBET.js +0 -9
- package/dist/chunk-TB3AK6XF.js +0 -2
- package/dist/chunk-XMGXVMVS.js +0 -6
- package/dist/chunk-Y4NIZQNT.js +0 -8
- package/dist/chunk-YEY6YPTM.js +0 -2
- package/dist/chunk-ZOGEAYWJ.js +0 -9
- /package/dist/{chunk-4MNNVSHD.js → chunk-PCGZS6S4.js} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{optionMatches as e,OptionSublabel as t}from"./chunk-
|
|
2
|
-
return v("div",{ref:
|
|
3
|
-
/* @__PURE__ */v("div",{onMouseDown:e=>{C||e.target.closest("button")||(e.preventDefault(),
|
|
4
|
-
/* @__PURE__ */x("span",{className:"truncate",children:U(e)}),!C&&/* @__PURE__ */x("button",{type:"button","aria-label":
|
|
5
|
-
/* @__PURE__ */x("input",{id:D,ref:
|
|
6
|
-
/* @__PURE__ */x("div",{ref:
|
|
1
|
+
import{optionMatches as e,OptionSublabel as t}from"./chunk-QSW26NAH.js";import{inputClasses as n}from"./chunk-JFSYWEHD.js";import{GROUP_COLORS as r}from"./chunk-5SULG7D5.js";import{Tooltip as o}from"./chunk-2LXTJXWC.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as i}from"./chunk-62LW225J.js";import{useDropdownPosition as a,POPUP_MAX_WIDTH as s,MENU_MAX_HEIGHT as c}from"./chunk-GLUJS42B.js";import{glassStyle as u}from"./chunk-DTJRIWFR.js";import{useShellStrings as d}from"./chunk-GTRUBA2R.js";import{useState as m,useRef as h,useMemo as p,useEffect as f}from"react";import{createPortal as g}from"react-dom";import{jsxs as v,jsx as x,Fragment as b}from"react/jsx-runtime";var w={accent:{chip:"inline-flex max-w-full items-center gap-1 rounded bg-blue-50 px-2 py-0.5 text-xs font-medium text-blue-700",remove:"text-blue-400 hover:text-red-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"},danger:{chip:`inline-flex max-w-full items-center gap-1 rounded ${r.danger} px-2 py-0.5 text-xs font-medium`,remove:"text-current opacity-70 hover:opacity-100 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"}};function y({value:r,onChange:y,options:k=[],placeholder:N,allowFreeText:j=!1,invalid:L,disabled:C,id:D,className:W="",tone:E,tooltip:S,split:J}){const[T,$]=m(!1),[B,F]=m(""),G=d(),H=h(null),M=h(null),R=h(null),I=a(H,T),U=e=>k.find(t=>t.value===e)?.label??e,A=p(()=>{const t=new Set(r),n=[],o=B.trim().toLowerCase();for(const r of k)t.has(r.value)||(t.add(r.value),o&&!e(r,o)||n.push(r));return n},[k,r,B]),X=e=>{const t=[...r];for(const n of e){const e=n.trim();if(!e)continue;const r=e.toLowerCase(),o=k.find(t=>t.value===e||t.label.toLowerCase()===r)?.value,l=o??(j?e:null);l&&!t.includes(l)&&t.push(l)}t.length!==r.length&&y(t)},z=e=>{e&&!r.includes(e)?(y([...r,e]),F("")):F("")},K=e=>y(r.filter(t=>t!==e)),P=()=>{const e=B.trim();if(J&&e)return X(e.split(J)),void F("");j&&e?z(e):F("")},Q=h(()=>{});Q.current=()=>{P(),$(!1)},f(()=>{if(!T)return;const e=e=>{const t=e.target;H.current?.contains(t)||R.current?.contains(t)||(P(),$(!1))};document.addEventListener("mousedown",e);const t=l(()=>Q.current());return()=>{document.removeEventListener("mousedown",e),t()}});const Y=k.length>0;/* @__PURE__ */
|
|
2
|
+
return v("div",{ref:H,className:"relative",children:[
|
|
3
|
+
/* @__PURE__ */v("div",{onMouseDown:e=>{C||e.target.closest("button")||(e.preventDefault(),M.current?.focus())},className:n({invalid:L,multiline:!0,className:`flex flex-wrap items-center gap-1 cursor-text focus-within:border-blue-400 has-focus-visible:ring-2 has-focus-visible:ring-[color:var(--rosh-focus-ring)] ${C?"bg-gray-50 cursor-not-allowed":""} ${W}`}),children:[r.map(e=>{const t=E?.(e),n=w[t??"accent"],r=/* @__PURE__ */v("span",{"data-tone":t,className:n.chip,children:[
|
|
4
|
+
/* @__PURE__ */x("span",{className:"truncate",children:U(e)}),!C&&/* @__PURE__ */x("button",{type:"button","aria-label":G.select.removeItem?.(U(e))??`${G.select.remove} ${U(e)}`,onClick:()=>K(e),className:n.remove,children:"×"})]},e),l=S?.(e);return null==l?r:/* @__PURE__ */x(o,{content:l,className:"relative inline-flex max-w-full",children:r},e)}),
|
|
5
|
+
/* @__PURE__ */x("input",{id:D,ref:M,type:"text",autoComplete:"off",role:"combobox","aria-expanded":T&&Y,"aria-invalid":L||void 0,disabled:C,value:B,placeholder:0===r.length?N:void 0,onChange:e=>{(e=>{if(J){const t=e.split(J);if(t.length>1)return X(t.slice(0,-1)),void F(t[t.length-1])}F(e)})(e.target.value),$(!0)},onFocus:()=>{!C&&Y&&$(!0)},onKeyDown:t=>{if("Enter"===t.key||","===t.key&&j){t.preventDefault();const n=B.trim(),r=n?A.filter(t=>e(t,n.toLowerCase())):[];1===r.length?z(r[0].value):P()}else"Backspace"===t.key&&""===B&&r.length>0?K(r[r.length-1]):"Escape"===t.key?($(!1),F(""),M.current?.blur()):"Tab"===t.key&&(P(),$(!1))},className:"min-w-[8ch] flex-1 border-none bg-transparent p-0 text-sm text-gray-800 placeholder:text-gray-400 rosh-focus-ring focus-visible:ring-0 disabled:cursor-not-allowed"})]}),T&&Y&&g(
|
|
6
|
+
/* @__PURE__ */x("div",{ref:R,className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:i.popup,left:I?.left,right:I?.right,top:I?.top,bottom:I?.bottom,minWidth:I?.minWidth,maxWidth:I?.maxWidth??s,width:"max-content",visibility:I?void 0:"hidden",...u()},children:/* @__PURE__ */x("div",{className:"overflow-y-auto",style:{maxHeight:I?.maxHeight??c},children:0===A.length?/* @__PURE__ */x("p",{className:"px-3 py-3 text-sm text-gray-400 text-center",children:k.length>0&&r.length>=k.length?G.select.allSelected:G.select.noMatches}):A.map(e=>/* @__PURE__ */x("button",{type:"button",onMouseDown:t=>{t.preventDefault(),z(e.value)},className:e.sublabel?"w-full text-left px-3 min-h-(--row-height-menu) py-2 text-sm hover:bg-gray-50 text-gray-700 whitespace-nowrap flex items-center justify-between gap-3":"w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm hover:bg-gray-50 text-gray-700 whitespace-nowrap",children:e.sublabel?/* @__PURE__ */v(b,{children:[
|
|
7
7
|
/* @__PURE__ */x("span",{className:"min-w-0 truncate",children:e.label}),
|
|
8
8
|
/* @__PURE__ */x(t,{grows:!0,children:e.sublabel})]}):e.label},e.value))})}),document.body)]})}export{y as TagInput};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{useSidebarSheet as e}from"./chunk-QWK6DRSN.js";import{resolveSeverity as t,severityWord as r}from"./chunk-TZFNWAED.js";import{Icon as n}from"./chunk-
|
|
1
|
+
import{useSidebarSheet as e}from"./chunk-QWK6DRSN.js";import{resolveSeverity as t,severityWord as r}from"./chunk-TZFNWAED.js";import{Icon as n}from"./chunk-42BBJJDP.js";import{useBrowserState as a}from"./chunk-D65T4H6J.js";import{useShellStrings as l}from"./chunk-GTRUBA2R.js";import{useId as i,useRef as s,useEffect as c,Children as o,isValidElement as u}from"react";import{jsx as d,jsxs as m,Fragment as h}from"react/jsx-runtime";function p(e){return"shrink-0 inline-flex items-center justify-center min-w-[1.25rem] px-2 h-5 rounded-full text-2xs font-medium "+(e?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-600")}function f({children:e,count:t}){return null==t?/* @__PURE__ */d("p",{className:"px-3 pb-1 pt-1 text-xs font-semibold uppercase tracking-wide text-gray-500",children:e}):/* @__PURE__ */m("p",{className:"flex items-center justify-between gap-2 px-3 pb-1 pt-1 text-xs font-semibold uppercase tracking-wide text-gray-500",children:[
|
|
2
2
|
/* @__PURE__ */d("span",{className:"min-w-0 truncate",children:e}),
|
|
3
|
-
/* @__PURE__ */d("span",{className:"shrink-0 normal-case tracking-normal tabular-nums",children:t})]})}function g(e){return"flex min-w-0 flex-1 items-center justify-between gap-2 rounded-r-lg border-l-2 h-8 px-3 text-sm "+(e?"border-blue-500 bg-blue-50 font-medium text-blue-700":"border-gray-200 text-gray-700 hover:bg-gray-100")}function x({label:n,count:a,active:o,onClick:u,icon:f,trailing:x,severity:b,depth:y=0}){const w=t(b,"SidebarNavItem"),
|
|
4
|
-
/* @__PURE__ */d("span",{"aria-hidden":"true",title:
|
|
5
|
-
/* @__PURE__ */d("span",{className:"min-w-0 truncate mr-auto",title:"string"==typeof n?n:void 0,children:n}),w&&/* @__PURE__ */d("span",{className:"sr-only",children:
|
|
3
|
+
/* @__PURE__ */d("span",{className:"shrink-0 normal-case tracking-normal tabular-nums",children:t})]})}function g(e){return"flex min-w-0 flex-1 items-center justify-between gap-2 rounded-r-lg border-l-2 h-8 px-3 text-sm "+(e?"border-blue-500 bg-blue-50 font-medium text-blue-700":"border-gray-200 text-gray-700 hover:bg-gray-100")}function x({label:n,count:a,active:o,onClick:u,icon:f,trailing:x,severity:b,depth:y=0}){const w=t(b,"SidebarNavItem"),k=l().severity,N=w?r(w,k):void 0,v=e(),j=i(),S=s(null),C=s(n);C.current=n,c(()=>{if(v&&o)return v.report(j,()=>C.current,S.current)},[v,o,j]);const I=/* @__PURE__ */m(h,{children:[null!=f&&/* @__PURE__ */d("span",{"aria-hidden":"true",className:"shrink-0 h-4 w-4",children:f}),w&&
|
|
4
|
+
/* @__PURE__ */d("span",{"aria-hidden":"true",title:N,className:`shrink-0 h-1.5 w-1.5 rounded-full ${w.fill}`}),
|
|
5
|
+
/* @__PURE__ */d("span",{className:"min-w-0 truncate mr-auto",title:"string"==typeof n?n:void 0,children:n}),w&&/* @__PURE__ */d("span",{className:"sr-only",children:N}),null!=a&&a>0&&/* @__PURE__ */d("span",{className:p(o),children:a}),null!=x&&/* @__PURE__ */d("span",{className:"shrink-0",children:x})]});/* @__PURE__ */
|
|
6
6
|
return d("button",1===y?{ref:S,type:"button",onClick:u,className:"flex w-full pl-5 text-left",children:/* @__PURE__ */d("span",{className:g(o),children:I})}:{ref:S,type:"button",onClick:u,className:"flex w-full items-center justify-between gap-2 rounded-lg h-8 px-3 text-sm text-left "+(o?"bg-blue-50 font-medium text-blue-700":"text-gray-700 hover:bg-gray-100"),children:I})}function b({label:e,count:t,children:r,defaultExpanded:l=!0,storageKey:s}){const c=i(),[h,f]=a(()=>{if(s){let e=null;try{e=window.localStorage.getItem(s)}catch{}if("1"===e||"0"===e)return"1"===e}return l},l),g=!h&&o.toArray(r).some(e=>u(e)&&!0===e.props.active);/* @__PURE__ */
|
|
7
7
|
return m("div",{children:[
|
|
8
8
|
/* @__PURE__ */m("button",{type:"button",onClick:()=>{const e=!h;if(f(e),s)try{window.localStorage.setItem(s,e?"1":"0")}catch{}},"aria-expanded":h,"aria-controls":c,className:"flex w-full items-center gap-2 rounded-lg h-8 px-3 text-sm font-medium text-left "+(g?"bg-blue-50 text-blue-700":"text-gray-800 hover:bg-gray-100"),children:[
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import{Dialog as e}from"./chunk-
|
|
1
|
+
import{Dialog as e}from"./chunk-CGY5RNAF.js";import{buttonClasses as t}from"./chunk-K7U4RWXJ.js";import{Icon as r}from"./chunk-42BBJJDP.js";import{useShellStrings as n,splitAround as o}from"./chunk-GTRUBA2R.js";import{createContext as l,useContext as a,useState as i,useRef as s,useCallback as c,useEffect as u}from"react";import{jsxs as d,jsx as m,Fragment as h}from"react/jsx-runtime";var b=l(()=>Promise.resolve(!1)),f=()=>a(b),g=()=>Promise.resolve(!1),p=e=>g(e),y=()=>Promise.resolve(!1),v=e=>y(e),x=()=>Promise.resolve(null),N=e=>x(e),k={danger:{icon:"text-red-600 bg-red-100",button:t({variant:"danger"})},warning:{icon:"text-yellow-600 bg-yellow-100",button:t({variant:"warning"})},info:{icon:"text-blue-600 bg-blue-100",button:t({variant:"primary"})}},w=t({variant:"secondary"}),C=t({variant:"primary"}),L="w-full rounded-md border border-gray-300 h-8 px-3 text-sm";function P(){/* @__PURE__ */
|
|
2
2
|
return m(r,{name:"warning",className:"h-5 w-5",strokeWidth:1.5,"aria-hidden":"true"})}function j(){/* @__PURE__ */
|
|
3
|
-
return m(r,{name:"close",className:"h-5 w-5",strokeWidth:1.5,"aria-hidden":"true"})}function F({children:t}){const[r,l]=i(!1),[a,f]=i({message:""}),[p,v]=i(0),N=s(),F=s(null),E=s(0),
|
|
4
|
-
return d(b.Provider,{value
|
|
5
|
-
/* @__PURE__ */m(e,{open:r,onClose:()=>
|
|
6
|
-
/* @__PURE__ */m("button",{ref:R,type:"button",onClick:()=>
|
|
7
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>
|
|
3
|
+
return m(r,{name:"close",className:"h-5 w-5",strokeWidth:1.5,"aria-hidden":"true"})}function F({children:t}){const[r,l]=i(!1),[a,f]=i({message:""}),[p,v]=i(0),N=s(),F=s(null),E=s(0),T=s([]),R=s(null),W=s(null),$=c(e=>{F.current=e.id,N.current=e.resolve,v(e.id),f(e.options),l(!0)},[]),B=c(e=>{const t="string"==typeof e?{message:e}:e;return new Promise(e=>{const r={id:++E.current,options:t,resolve:e};null===F.current?$(r):T.current.push(r)})},[$]),[D,J]=i(!1),[K,A]=i({message:""}),[G,U]=i(""),V=s(),X=c(e=>(A(e),U(""),J(!0),new Promise(e=>{V.current=e})),[]),[Y,q]=i(!1),[z,H]=i({}),[I,M]=i(""),O=s(),Q=c(e=>{const t="string"==typeof e?{message:e}:e;return H(t),M(t.defaultValue??""),q(!0),new Promise(e=>{O.current=e})},[]);u(()=>{g=B,y=X,x=Q},[B,X,Q]);const S=(e,t)=>{if(F.current!==e)return;const r=N.current,n=T.current.shift();n?$(n):(F.current=null,N.current=void 0,l(!1)),r?.(t)},Z=e=>{J(!1),U(""),V.current?.(e)},_=e=>{if(e){const e=I.trim();if(!e&&!z.allowEmpty)return q(!1),void O.current?.(null);q(!1),O.current?.(e)}else q(!1),O.current?.(null)},ee=a.variant||(a.confirmLabel?.toLowerCase().includes("delete")||a.message.toLowerCase().includes("delete")?"danger":"info"),te=k[ee],re=k["warning"===K.variant?"warning":"danger"],ne=K.confirmWord,oe=null==ne||G===ne,le=n().dialog,[ae,ie]=o(le.typeToConfirm);/* @__PURE__ */
|
|
4
|
+
return d(b.Provider,{value:B,children:[t,
|
|
5
|
+
/* @__PURE__ */m(e,{open:r,onClose:()=>S(p,!1),initialFocus:R,footer:/* @__PURE__ */d(h,{children:[
|
|
6
|
+
/* @__PURE__ */m("button",{ref:R,type:"button",onClick:()=>S(p,!1),className:w,children:a.cancelLabel||le.cancel}),
|
|
7
|
+
/* @__PURE__ */m("button",{type:"button",onClick:()=>S(p,!0),className:te.button,children:a.confirmLabel||le.ok})]}),children:/* @__PURE__ */d("div",{className:"flex gap-4",children:[
|
|
8
8
|
/* @__PURE__ */m("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${te.icon}`,children:/* @__PURE__ */m(P,{})}),
|
|
9
9
|
/* @__PURE__ */d("div",{className:"flex-1",children:[
|
|
10
10
|
/* @__PURE__ */m("h2",{className:"text-base font-semibold text-gray-900",children:a.title||le.confirmTitle}),
|
|
11
11
|
/* @__PURE__ */m("p",{className:"mt-2 text-sm text-gray-600",children:a.message})]})]})}),
|
|
12
|
-
/* @__PURE__ */d(e,{open:
|
|
13
|
-
/* @__PURE__ */m("button",{ref:
|
|
14
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>Z(!0),disabled:!oe,className:re.button,children:ne??
|
|
12
|
+
/* @__PURE__ */d(e,{open:D,onClose:()=>Z(!1),initialFocus:null!=ne?void 0:W,footer:/* @__PURE__ */d(h,{children:[
|
|
13
|
+
/* @__PURE__ */m("button",{ref:W,type:"button",onClick:()=>Z(!1),className:w,children:K.cancelLabel||le.destructiveCancel}),
|
|
14
|
+
/* @__PURE__ */m("button",{type:"button",onClick:()=>Z(!0),disabled:!oe,className:re.button,children:ne??K.confirmLabel??le.destructiveConfirm})]}),children:[
|
|
15
15
|
/* @__PURE__ */m("button",{type:"button",onClick:()=>Z(!1),"aria-label":le.close,className:"absolute right-4 top-4 rounded-md p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600",children:/* @__PURE__ */m(j,{})}),
|
|
16
16
|
/* @__PURE__ */d("div",{className:"flex gap-4",children:[
|
|
17
17
|
/* @__PURE__ */m("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${re.icon}`,children:/* @__PURE__ */m(P,{})}),
|
|
18
18
|
/* @__PURE__ */d("div",{className:"flex-1",children:[
|
|
19
|
-
/* @__PURE__ */m("h2",{className:"text-base font-semibold text-gray-900 pr-6",children:
|
|
20
|
-
/* @__PURE__ */m("p",{className:"mt-2 text-sm text-gray-600",children:
|
|
19
|
+
/* @__PURE__ */m("h2",{className:"text-base font-semibold text-gray-900 pr-6",children:K.title||le.destructiveTitle}),
|
|
20
|
+
/* @__PURE__ */m("p",{className:"mt-2 text-sm text-gray-600",children:K.message}),null!=ne&&/* @__PURE__ */d(h,{children:[
|
|
21
21
|
/* @__PURE__ */d("p",{className:"mt-3 text-sm text-gray-700",children:[ae,
|
|
22
22
|
/* @__PURE__ */m("kbd",{className:"rounded border border-gray-300 bg-gray-50 px-2 py-0.5 text-xs font-bold text-red-600 font-mono",children:ne}),ie]}),
|
|
23
|
-
/* @__PURE__ */m("input",{autoFocus:!0,type:"text",value:
|
|
24
|
-
/* @__PURE__ */d(e,{open:
|
|
25
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>_(!1),className:w,children:
|
|
26
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>_(!0),disabled:!
|
|
27
|
-
/* @__PURE__ */m("input",{autoFocus:!0,type:"text",value:
|
|
23
|
+
/* @__PURE__ */m("input",{autoFocus:!0,type:"text",value:G,onChange:e=>U(e.target.value),onKeyDown:e=>{"Enter"===e.key&&G===ne&&Z(!0)},placeholder:ne,className:`mt-2 ${L} focus:border-red-500`})]})]})]})]}),
|
|
24
|
+
/* @__PURE__ */d(e,{open:Y,onClose:()=>_(!1),title:z.title||le.promptTitle,footer:/* @__PURE__ */d(h,{children:[
|
|
25
|
+
/* @__PURE__ */m("button",{type:"button",onClick:()=>_(!1),className:w,children:z.cancelLabel||le.cancel}),
|
|
26
|
+
/* @__PURE__ */m("button",{type:"button",onClick:()=>_(!0),disabled:!z.allowEmpty&&!I.trim(),className:C,children:z.confirmLabel||le.ok})]}),children:[z.message&&/* @__PURE__ */m("p",{className:"text-sm text-gray-600",children:z.message}),
|
|
27
|
+
/* @__PURE__ */m("input",{autoFocus:!0,type:"text",value:I,onChange:e=>M(e.target.value),onKeyDown:e=>{"Enter"===e.key?_(!0):"Escape"===e.key&&_(!1)},onFocus:e=>e.target.select(),placeholder:z.placeholder,className:`mt-3 ${L} focus:border-blue-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-accent)]`})]})]})}export{F as ConfirmProvider,p as confirm,v as confirmDestructive,N as prompt,f as useConfirm};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{parseFocal as e,formatFocal as t,nudgeFocal as a,focalFromRect as r}from"./chunk-25RR3GQW.js";import{useShellStrings as n}from"./chunk-
|
|
2
|
-
return i("div",{"data-image-focus":"",className:y||void 0,children:/* @__PURE__ */i("p",{className:"text-xs text-gray-500",children:g??N.noImage})});const
|
|
1
|
+
import{parseFocal as e,formatFocal as t,nudgeFocal as a,focalFromRect as r}from"./chunk-25RR3GQW.js";import{useShellStrings as n}from"./chunk-GTRUBA2R.js";import{useId as o,useRef as s}from"react";import{jsx as i,jsxs as l}from"react/jsx-runtime";var c={background:"color-mix(in srgb, var(--status-on-solid) 45%, transparent)"},u={borderColor:"var(--status-on-solid)",boxShadow:"0 0 0 1px var(--rosh-media-scrim-button), 0 1px 4px var(--rosh-media-scrim-button)"};function d({value:d,onChange:m,label:p,image:f,hint:h,emptyText:g,actions:x,disabled:b=!1,id:v,className:y=""}){const N=n().imageFocus,w=o(),j=s(null),k=s(!1),{x:C,y:P}=e(d),K=t(C,P),R=e=>{e!==d&&m(e)},$=(e,a)=>{const n=j.current?.getBoundingClientRect();if(!n)return;const o=r(n,e,a);R(t(o.x,o.y))},T=()=>{k.current=!1};if(!f)/* @__PURE__ */
|
|
2
|
+
return i("div",{"data-image-focus":"",className:y||void 0,children:/* @__PURE__ */i("p",{className:"text-xs text-gray-500",children:g??N.noImage})});const D=void 0===h,B=null!==h;/* @__PURE__ */
|
|
3
3
|
return l("div",{"data-image-focus":"",className:`flex flex-col gap-2 ${y}`.trim(),children:[
|
|
4
|
-
/* @__PURE__ */i("button",{id:v,type:"button","data-image-focus-picture":"",disabled:b,"aria-label":N.picture(p,K),"aria-describedby":w,onKeyDown:e=>{if(b||e.altKey||e.ctrlKey||e.metaKey)return;const t=a(d,e.key,e.shiftKey);null!==t&&(e.preventDefault()
|
|
4
|
+
/* @__PURE__ */i("button",{id:v,type:"button","data-image-focus-picture":"",disabled:b,"aria-label":N.picture(p,K),"aria-describedby":w,onKeyDown:e=>{if(b||e.altKey||e.ctrlKey||e.metaKey)return;const t=a(d,e.key,e.shiftKey);null!==t&&(e.preventDefault(),R(t))},onPointerDown:e=>{b||0!==e.button||(e.currentTarget.setPointerCapture?.(e.pointerId),e.currentTarget.focus({preventScroll:!0}),k.current=!0,$(e.clientX,e.clientY))},onPointerMove:e=>{k.current&&!b&&$(e.clientX,e.clientY)},onPointerUp:T,onPointerCancel:T,onLostPointerCapture:T,className:["flex min-h-36 w-full touch-none items-center justify-center overflow-hidden rounded-md border border-gray-200 bg-gray-50 p-0","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",b?"cursor-not-allowed opacity-60":"cursor-crosshair"].join(" "),children:/* @__PURE__ */l("span",{ref:j,"data-image-focus-pane":"",className:"relative block max-w-full",children:[
|
|
5
5
|
/* @__PURE__ */i("img",{src:f,alt:"",draggable:!1,className:"block h-auto max-h-36 w-auto max-w-full select-none object-contain"}),
|
|
6
6
|
/* @__PURE__ */i("span",{"aria-hidden":"true","data-image-focus-cross":"h",className:"pointer-events-none absolute inset-x-0 h-px",style:{top:`${P}%`,...c}}),
|
|
7
7
|
/* @__PURE__ */i("span",{"aria-hidden":"true","data-image-focus-cross":"v",className:"pointer-events-none absolute inset-y-0 w-px",style:{left:`${C}%`,...c}}),
|
|
8
|
-
/* @__PURE__ */i("span",{"aria-hidden":"true","data-image-focus-dot":"",className:"pointer-events-none absolute h-4 w-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2",style:{left:`${C}%`,top:`${P}%`,...u}})]})}),
|
|
8
|
+
/* @__PURE__ */i("span",{"aria-hidden":"true","data-image-focus-dot":"",className:"pointer-events-none absolute h-4 w-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2",style:{left:`${C}%`,top:`${P}%`,...u}})]})}),B||x?/* @__PURE__ */l("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */i("span",B?{id:D?w:void 0,className:"min-w-0 flex-1 text-xs text-gray-500",children:D?N.hint:h}:{className:"min-w-0 flex-1"}),x]}):null,!D&&/* @__PURE__ */i("span",{id:w,className:"sr-only",children:N.hint})]})}export{d as ImageFocusPoint};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-42BBJJDP.js";import{useShellStrings as r}from"./chunk-GTRUBA2R.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";var s={success:"success",error:"error",warning:"warning",info:"info",404:"info",403:"warning",500:"error"},c={success:"text-green-600 bg-green-100",error:"text-red-600 bg-red-100",warning:"text-amber-600 bg-amber-100",info:"text-blue-600 bg-blue-100"},a={404:e=>e.notFound,403:e=>e.noAccess,500:e=>e.serverError};function i({tone:r}){const t={className:"h-6 w-6",strokeWidth:1.5,"aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
|
|
2
2
|
return n(e,{name:"check",...t});case"error":/* @__PURE__ */
|
|
3
3
|
return n(e,{name:"close",...t});case"warning":/* @__PURE__ */
|
|
4
4
|
return n(e,{name:"error",...t});default:/* @__PURE__ */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{useShellLocale as e}from"./chunk-
|
|
2
|
-
return t(
|
|
3
|
-
/* @__PURE__ */t("div",{className:`${
|
|
4
|
-
/* @__PURE__ */i("p",{id:v,className:
|
|
5
|
-
/* @__PURE__ */t("div",{className:`${
|
|
6
|
-
/* @__PURE__ */i(j,{id:N,className:
|
|
1
|
+
import{useShellLocale as e}from"./chunk-GTRUBA2R.js";import{formatPlain as r}from"./chunk-C3QOHMR6.js";import{useId as a,Children as d}from"react";import{jsxs as t,jsx as i}from"react/jsx-runtime";var n={none:{body:"",edge:"px-4 py-3"},sm:{body:"p-3",edge:"px-3 py-2"},md:{body:"p-4",edge:"px-4 py-3"},lg:{body:"p-6",edge:"px-6 py-4"}},l={neutral:"border-gray-200",warning:"border-amber-300",current:"border-gray-200"};function s({children:e,header:r,description:s,footer:c,padded:o=!0,padding:m,headingLevel:b,headerActions:u,"aria-label":p,className:h="",bodyClassName:g="",style:x,tone:y="neutral"}){const f=n[m??(o?"md":"none")],N=a(),v=a(),$=null!=r&&null!=s&&""!==s,w=null!=b&&null!=r,j=`h${b}`,k=null!=p&&""!==p,A=w||k,R=A?"section":"div",B=`rounded-(--radius-card) border ${l[y]} bg-white shadow-sm ${h}`.trim(),C=d.toArray(e).length>0,G=C?"border-b border-gray-100 ":"",H="current"===y,L=H?"text-base font-semibold text-blue-700":"text-base font-semibold text-gray-900",M=H?"rounded-t-(--radius-card) bg-blue-50 ":"",O=`${G}${M}${f.edge} ${L}`;/* @__PURE__ */
|
|
2
|
+
return t(R,{className:B,style:x,...k?{"aria-label":p}:w?{"aria-labelledby":N}:{},...$&&A?{"aria-describedby":v}:{},...H?{"aria-current":!0}:{},children:[$?
|
|
3
|
+
/* @__PURE__ */t("div",{className:`${G}${M}${f.edge}`,children:[null!=u?/* @__PURE__ */t("div",{className:`flex items-center justify-between gap-3 ${L}`,children:[w?/* @__PURE__ */i(j,{id:N,children:r}):/* @__PURE__ */i("span",{children:r}),u]}):w?/* @__PURE__ */i(j,{id:N,className:L,children:r}):/* @__PURE__ */i("div",{className:L,children:r}),
|
|
4
|
+
/* @__PURE__ */i("p",{id:v,className:H?"mt-0.5 text-xs text-gray-600":"mt-0.5 text-xs text-gray-500",children:s})]}):null!=r&&(null!=u?
|
|
5
|
+
/* @__PURE__ */t("div",{className:`${O} flex items-center justify-between gap-3`,children:[w?/* @__PURE__ */i(j,{id:N,children:r}):/* @__PURE__ */i("span",{children:r}),u]}):w?
|
|
6
|
+
/* @__PURE__ */i(j,{id:N,className:O,children:r}):/* @__PURE__ */i("div",{className:O,children:r})),C&&/* @__PURE__ */i("div",{className:[f.body,g].filter(Boolean).join(" "),children:e}),c&&/* @__PURE__ */i("div",{className:`border-t border-gray-100 ${f.edge}`,children:c})]})}function c({label:a,value:d,icon:n,delta:l,className:s=""}){const c=e(),o="number"==typeof d&&c?r(d,c):d,m="up"===l?.direction?"text-green-600":"down"===l?.direction?"text-red-600":"text-gray-500",b="up"===l?.direction?"▲":"down"===l?.direction?"▼":"→";/* @__PURE__ */
|
|
7
7
|
return t("div",{className:`rounded-(--radius-card) border border-gray-200 bg-white p-4 shadow-sm ${s}`.trim(),children:[
|
|
8
8
|
/* @__PURE__ */t("div",{className:"flex items-center justify-between text-gray-500",children:[
|
|
9
9
|
/* @__PURE__ */i("span",{className:"text-xs font-medium uppercase tracking-wide",children:a}),n]}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-42BBJJDP.js";import{jsx as t,jsxs as r}from"react/jsx-runtime";var a=()=>/* @__PURE__ */t(e,{name:"check",className:"h-3.5 w-3.5","aria-hidden":"true"});function i({items:e,value:i,onChange:n,"aria-label":l,className:s=""}){const c=Math.max(0,e.findIndex(e=>e.id===i));/* @__PURE__ */
|
|
2
2
|
return t("ol",{"aria-label":l,className:`grid items-start ${s}`.trim(),style:{gridTemplateColumns:`repeat(${Math.max(e.length,1)}, minmax(0, 1fr))`},children:e.map((i,l)=>{const s=l<c?"complete":l===c?"current":"upcoming",o="complete"===s&&!!n,m=/* @__PURE__ */t("span",{"aria-hidden":"true",className:["flex h-7 w-7 shrink-0 items-center justify-center rounded-full text-xs font-semibold transition-colors","complete"===s?"bg-blue-600 text-white":"","current"===s?"border-2 border-blue-600 bg-white text-blue-600":"","upcoming"===s?"border-2 border-gray-300 bg-white text-gray-400":""].filter(Boolean).join(" "),children:"complete"===s?/* @__PURE__ */t(a,{}):l+1}),d=/* @__PURE__ */r("span",{className:"min-w-0 text-center",children:[
|
|
3
3
|
/* @__PURE__ */t("span",{className:"block text-sm font-medium "+("upcoming"===s?"text-gray-400":"text-gray-900"),children:i.label}),i.description&&/* @__PURE__ */t("span",{className:"block text-xs text-gray-500",children:i.description})]});/* @__PURE__ */
|
|
4
4
|
return r("li",{"aria-current":"current"===s?"step":void 0,className:"relative flex min-w-0 justify-center",children:[l<e.length-1&&/* @__PURE__ */t("span",{"aria-hidden":"true",className:"absolute top-3.5 h-0.5 rounded "+(l<c?"bg-blue-600":"bg-gray-200"),style:{left:"calc(50% + 0.875rem)",right:"calc(-50% + 0.875rem)"}}),o?/* @__PURE__ */r("button",{type:"button",onClick:()=>n?.(i.id),className:"relative z-10 flex min-w-0 flex-col items-center gap-2 rounded px-2 text-center rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:[m,d]}):/* @__PURE__ */r("span",{className:"relative z-10 flex min-w-0 flex-col items-center gap-2 px-2 text-center",children:[m,d]})]},i.id)})})}export{i as Stepper};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{isFocusableEntry as e,menuStatusIds as t,renderMenuEntries as r}from"./chunk-JSOO4O5K.js";import{PopupMenu as n,PopupMenuDivider as o}from"./chunk-UPHXYWL6.js";import{useTabLayer as i,focusableIn as a}from"./chunk-CDAJKLGL.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as s}from"./chunk-62LW225J.js";import{placeMenu as d,popupBounds as c,followAnchor as u}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as p}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as f}from"./chunk-TWVUQUUD.js";import{useState as m,useRef as h,useId as g,useCallback as v,useEffect as b}from"react";import{jsxs as y,jsx as x}from"react/jsx-runtime";var k=/(^|[\s:])!?z-/,w={paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:"0.25rem",paddingBottom:"0.25rem"};function D({trigger:D,items:L,align:j="end",side:K="bottom","aria-label":S,className:W="",triggerClassName:A,menuClassName:C="",minWidth:E=180,linkAs:H,disabled:$,id:N,"aria-describedby":U,"aria-disabled":T=!1,onOpenChange:J,footer:B,footerLabel:I}){const[O,q]=m(!1),[G,M]=m(-1),P=h(null),z=h(null),R=h(null),Y=h(null),Q=h(null),V=null!=B&&!1!==B,X=h({text:"",at:0}),F=g(),Z=g(),_=N??Z,ee=h(J);ee.current=J;const te=h(O);te.current=O;const re=v(e=>{q(!1),te.current&&(te.current=!1,ee.current?.(!1)),e&&z.current?.focus()},[]),ne=(t,r)=>{const n=L.length;for(let o=0;o<n;o+=1){const i=((t+r*o)%n+n)%n;if(e(L[i]))return i}return-1},oe=()=>R.current?.closest("[data-popup-menu-tree]")??null;b(()=>{if(!O)return;const e=e=>{const t=e.target;if(P.current?.contains(t)||oe()?.contains(t))return;const r=oe()?.getAttribute("data-popup-menu-tree"),n=t.closest?.("[data-popup-menu-tree]");r&&n?.getAttribute("data-popup-menu-tree")===r||re(!1)};document.addEventListener("pointerdown",e,!0);const t=l(()=>re(!1));return()=>{document.removeEventListener("pointerdown",e,!0),t()}},[O,re]);const ie=v(()=>{const e=oe(),t=z.current;if(!e||!t)return;const r=e.style;r.left="0px",r.top="0px",r.maxWidth="none",r.maxHeight="none";const n={width:e.offsetWidth,height:e.offsetHeight},o=d({trigger:t.getBoundingClientRect(),menu:n,bounds:c(t),align:j,side:K});r.left=`${o.left}px`,r.top=`${o.top}px`,r.maxWidth=`${o.maxWidth}px`,r.maxHeight=`${o.maxHeight}px`,r.overflowY=n.height>o.maxHeight?"auto":"",e.dataset.side=o.side,e.dataset.align=j},[j,K]);p(()=>{O&&ie()}),b(()=>{if(O)return u(()=>z.current,ie)},[O,ie]),b(()=>{if(!O)return;const t=R.current,r=e(L[G])?t?.querySelector(`[data-dropdown-index="${G}"]`):null;(r??t)?.focus({preventScroll:!0})},[O,G]),b(()=>{if(O)return f(e=>"Escape"===e.key&&(re(!0),!0),()=>Y.current)},[O,re]),i(Y,O&&V);const ae=h(null),le=e=>"first"===e?ne(0,1):ne(L.length-1,-1),se=e=>{M(le(e)),q(!0),te.current||(te.current=!0,ae.current=e,J?.(!0))};p(()=>{const e=ae.current;if(!O||!e)return;ae.current=null;const t=le(e);t!==G&&M(t)});const de=t(L,F),ce="function"==typeof B?B({close:()=>re(!0)}):B,ue={...k.test(C)?{}:{zIndex:s.popup},minWidth:E};/* @__PURE__ */
|
|
2
|
+
return y("div",{ref:P,className:`relative inline-flex ${W}`.trim(),children:[
|
|
3
|
+
/* @__PURE__ */x("button",{ref:z,id:_,type:"button","aria-haspopup":"menu","aria-expanded":O,"aria-controls":O?F:void 0,"aria-label":S,"aria-describedby":U,"aria-disabled":T||void 0,disabled:$,onClick:()=>{T||(O?re(!1):se("first"))},onKeyDown:e=>{T||("ArrowDown"===e.key||"Enter"===e.key||" "===e.key?(e.preventDefault(),se("first")):"ArrowUp"===e.key&&(e.preventDefault(),se("last")))},className:A??"inline-flex items-center justify-center rounded-(--radius-control) text-gray-600 transition-colors not-disabled:not-aria-disabled:hover:bg-gray-100 not-disabled:not-aria-disabled:hover:text-gray-900 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] disabled:cursor-not-allowed disabled:opacity-60 "+(S?"h-8 min-w-8 px-0":"h-8 min-w-8 gap-2 px-3"),children:D}),O&&
|
|
4
|
+
/* @__PURE__ */x(n,{portal:!0,className:C,style:ue,children:/* @__PURE__ */y("div",{ref:Y,children:[
|
|
5
|
+
/* @__PURE__ */x("div",{ref:R,id:F,role:"menu","aria-orientation":"vertical","aria-label":S,"aria-labelledby":S?void 0:_,"aria-describedby":de,tabIndex:-1,onKeyDown:t=>{if(!t.target.closest?.("[data-popup-submenu-panel]")||"Tab"===t.key)if("ArrowDown"===t.key)t.preventDefault(),M(ne(G+1,1));else if("ArrowUp"===t.key)t.preventDefault(),M(ne(G-1,-1));else if("Home"===t.key)t.preventDefault(),M(ne(0,1));else if("End"===t.key)t.preventDefault(),M(ne(L.length-1,-1));else if("Tab"===t.key){t.preventDefault();const e=!t.shiftKey&&Q.current?a(Q.current)[0]:void 0;e?e.focus({preventScroll:!0}):re(!0)}else if(" "===t.key){const e=t.target;e.matches?.("a[href]")&&(t.preventDefault(),e.click())}else 1!==t.key.length||t.ctrlKey||t.metaKey||t.altKey||(t=>{const r=Date.now(),n=t.key.toLowerCase(),o=r-X.current.at<500?X.current.text+n:n;X.current={text:o,at:r};const i=[...o].every(e=>e===o[0]),a=i?o[0]:o,l=i?G+1:Math.max(G,0),s=R.current,d=L.length;for(let r=0;r<d;r+=1){const n=((l+r)%d+d)%d;if(e(L[n])&&(s?.querySelector(`[data-dropdown-index="${n}"]`)?.textContent?.trim().toLowerCase()??"").startsWith(a))return t.preventDefault(),void M(n)}})(t)},children:r(L,{menuId:F,choose:e=>{e.disabled||(re(!0),e.onSelect())},toggle:e=>{e.disabled||e.onSelect()},followLink:()=>re(!0),rowProps:(e,t)=>({"data-dropdown-index":e,tabIndex:e===G?0:-1,onMouseEnter:()=>{t.disabled||Q.current?.contains(document.activeElement)||M(e)}}),linkAs:H})}),V&&/* @__PURE__ */y("div",{ref:Q,role:"group","aria-label":I,"data-dropdown-footer":"",onKeyDown:e=>{const t=Q.current;if("Tab"!==e.key||!t||!t.contains(e.target))return;const r=a(t),n=document.activeElement;if(e.shiftKey){if(r.length>0&&n!==r[0])return;e.preventDefault();const t=R.current?.querySelector(`[data-dropdown-index="${G}"]`);return void(t??R.current)?.focus({preventScroll:!0})}r.length>0&&n!==r[r.length-1]||(e.preventDefault(),re(!0))},children:[
|
|
6
|
+
/* @__PURE__ */x("div",{"aria-hidden":"true",children:/* @__PURE__ */x(o,{})}),
|
|
7
|
+
/* @__PURE__ */x("div",{style:w,children:ce})]})]})})]})}export{D as DropdownMenu};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{Sparkline as e}from"./chunk-CKCDGSTC.js";import{STATUS_VARS as t,resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as r,useShellLocale as n}from"./chunk-
|
|
1
|
+
import{Sparkline as e}from"./chunk-CKCDGSTC.js";import{STATUS_VARS as t,resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as r,useShellLocale as n}from"./chunk-GTRUBA2R.js";import{formatPlain as l}from"./chunk-C3QOHMR6.js";import{jsxs as s,jsx as o}from"react/jsx-runtime";var d={up:{glyph:"▲",word:"trendUp"},down:{glyph:"▼",word:"trendDown"},flat:{glyph:"■",word:"trendFlat"}};function i({label:i,value:m,unit:c,delta:h,deltaTone:p,trend:u,trendTone:g,footnote:x,className:f}){const y=r().charts,w=n(),N=null==h?null:h>0?"up":h<0?"down":"flat",b=p?t[p]:void 0,k=g?t[g]:a(0);/* @__PURE__ */
|
|
2
2
|
return s("div",{className:`flex flex-col gap-0.5 rounded-lg border border-gray-200 bg-white p-4 ${f??""}`,children:[
|
|
3
3
|
/* @__PURE__ */o("span",{className:"text-xs font-medium uppercase tracking-wide text-gray-500",children:i}),
|
|
4
4
|
/* @__PURE__ */s("span",{className:"flex items-baseline gap-2",children:[
|
|
5
|
-
/* @__PURE__ */o("span",{className:"text-2xl font-semibold leading-tight text-gray-900",children:m}),c&&/* @__PURE__ */o("span",{className:"text-sm font-medium text-gray-500",children:c})]}),
|
|
6
|
-
/* @__PURE__ */o("span",{"aria-hidden":"true",children:d[
|
|
7
|
-
/* @__PURE__ */s("span",{className:"sr-only",children:[" ",y[d[
|
|
5
|
+
/* @__PURE__ */o("span",{className:"text-2xl font-semibold leading-tight text-gray-900",children:m}),c&&/* @__PURE__ */o("span",{className:"text-sm font-medium text-gray-500",children:c})]}),N&&/* @__PURE__ */s("span",{className:"text-xs font-medium",style:b?{color:b}:void 0,children:[
|
|
6
|
+
/* @__PURE__ */o("span",{"aria-hidden":"true",children:d[N].glyph})," ",l(Math.abs(h),w),
|
|
7
|
+
/* @__PURE__ */s("span",{className:"sr-only",children:[" ",y[d[N].word]]})]}),u&&u.length>1&&/* @__PURE__ */o(e,{data:u,height:26,stroke:k,strokeWidth:2,className:"mt-2 w-full"}),x&&/* @__PURE__ */o("span",{className:"mt-1 text-xs text-gray-500",children:x})]})}export{i as StatTile};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{useRef as t,useState as e,useCallback as r,useEffect as n}from"react";import{jsx as a}from"react/jsx-runtime";var c=5,o=2.5,i={scale:1,x:0,y:0};function l(t,e,r,n=5){const a=Math.min(Math.max(t.scale,1),n);if(1===a)return i;return{scale:a,x:Math.min(0,Math.max(e-e*a,t.x)),y:Math.min(0,Math.max(r-r*a,t.y))}}function s(t,e,r,n,a,c,o=5){const i=Math.min(Math.max(t.scale*e,1),o),s=i/t.scale;return l({scale:i,x:r-(r-t.x)*s,y:n-(n-t.y)*s},a,c,o)}function m(t){const e=1===t.deltaMode?16*t.deltaY:2===t.deltaMode?400*t.deltaY:t.deltaY;return Math.exp(-e*(t.ctrlKey?.01:.002))}function h({src:c,alt:o,className:h="",frameClassName:u=""}){const d=t(null),f=t(null),[x,p]=e(i),[g,M]=e(!1),[w,v]=e(null),[y,Y]=e(c);c!==y&&(Y(c),p(i),M(!1),v(null));const b=r(()=>{const t=d.current?.getBoundingClientRect();if(!t||!t.width||!t.height)return null;const e=f.current?.naturalWidth??0;return{rect:t,maxScale:Math.max(5,e/t.width)}},[]);n(()=>{const t=t=>{t.preventDefault();const e=b();if(!e)return;const r=Math.min(Math.max(t.clientX-e.rect.left,0),e.rect.width),n=Math.min(Math.max(t.clientY-e.rect.top,0),e.rect.height);M(!1),p(a=>s(a,m(t),r,n,e.rect.width,e.rect.height,e.maxScale))};return window.addEventListener("wheel",t,{passive:!1}),()=>window.removeEventListener("wheel",t)},[b]);const C=t=>{w?.id===t.pointerId&&v(null)},P=x.scale>1,X={transform:`translate(${x.x}px, ${x.y}px) scale(${x.scale})`,transformOrigin:"0 0",transition:g?"transform 160ms ease-out":"none"};/* @__PURE__ */
|
|
2
|
+
return a("div",{ref:d,"data-zoomable-image":"","data-zoom":x.scale,className:`relative overflow-hidden select-none ${P?w?"cursor-grabbing":"cursor-grab":"cursor-zoom-in"} ${u}`.trim(),onClick:t=>t.stopPropagation(),onPointerDown:t=>{0===t.button&&1!==x.scale&&(t.currentTarget.setPointerCapture?.(t.pointerId),M(!1),v({id:t.pointerId,startX:t.clientX,startY:t.clientY,from:x}))},onPointerMove:t=>{if(!w||w.id!==t.pointerId)return;const e=b();e&&p(l({scale:w.from.scale,x:w.from.x+t.clientX-w.startX,y:w.from.y+t.clientY-w.startY},e.rect.width,e.rect.height,e.maxScale))},onPointerUp:C,onPointerCancel:C,onDoubleClick:t=>{const e=b();e&&(M(!0),p(r=>r.scale>1?i:s(r,2.5,t.clientX-e.rect.left,t.clientY-e.rect.top,e.rect.width,e.rect.height,e.maxScale)))},children:/* @__PURE__ */a("img",{ref:f,src:c,alt:o,draggable:!1,className:`block ${h}`.trim(),style:X})})}export{o as DOUBLE_CLICK_SCALE,i as FIT_VIEW,c as MAX_SCALE,h as ZoomableImage,l as clampView,m as wheelFactor,s as zoomAt};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import{useHighlight as e}from"./chunk-CNYAHYE6.js";import{ChartTooltip as t}from"./chunk-P5BOTIJU.js";import{usePlotWidth as l}from"./chunk-MAFUXCPZ.js";import{resolveSeriesColor as a,CHART_INK as n,STATUS_VARS as r}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as i}from"./chunk-GTRUBA2R.js";import{formatPercent as u,formatPlain as h}from"./chunk-C3QOHMR6.js";import{useId as c,useState as m,useRef as s}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";function x({stages:x,shape:v="funnel",height:p,width:$,gap:g=4,minBandWidth:M=0,formatValue:y,color:b,className:k,emptyLabel:A}){const N=o().charts,L=i(),S=y??(e=>h(e,L)),j=A??N.noStages,z=c(),[V,w]=m(null),{highlighted:B}=e(),C=s(null),F=l(C,560),R=$??F;if(0===x.length)/* @__PURE__ */return d("p",{className:`text-sm text-gray-500 ${k??""}`,children:j});const U=b??a(0),W=p??54*x.length,Z=Math.max(...x.map(e=>e.value),1),E="bars"===v,H=E?Math.round(Math.min(132,Math.max(80,.24*R))):Math.round(Math.min(168,Math.max(104,.38*R))),T=e=>{const t=x[e-1]?.value;return null!=t&&t>0?100*(1-x[e].value/t):null},O=e=>{const t=T(e);return{count:S(x[e].value),drop:null!=t?`−${u(t,1,L)}`:""}},P=E?Math.ceil(Math.max(...x.map((e,t)=>{const{count:l,drop:a}=O(t);return.62*(l.length+(a?a.length+1:0))*12}))+16):0,Y=R-H-P,G=Math.max(E?2:0,Math.min(M,Y)),I=e=>Math.max(G,Y*Math.max(0,e/Z)),J=e=>I(e)/2,Q=H+Y/2,X=e=>46+e/Math.max(1,x.length-1)*54,q=e=>`color-mix(in oklab, ${U} ${X(e).toFixed(0)}%, ${n.surface})`,D=e=>X(e)>=55?n.surface:n.label,K=(e,t)=>null!==V?V!==e:null!==B&&B!==t,_=null!==V?x[V]:void 0;/* @__PURE__ */
|
|
2
|
+
return f("div",{className:`relative ${k??""}`,ref:C,children:[
|
|
3
|
+
/* @__PURE__ */f("svg",{width:"100%",height:W,viewBox:`0 0 ${R} ${W}`,role:"img","aria-labelledby":z,onMouseLeave:()=>w(null),children:[
|
|
4
|
+
/* @__PURE__ */d("title",{id:z,children:N.funnel(x.length,S(x[0].value),S(x[x.length-1].value))}),x.map((e,t)=>{const l=t*W/x.length+g/2,a=(t+1)*W/x.length-g/2,r=(l+a)/2,o=u(e.value/(x[0].value||1)*100,0,L),i=.62*o.length*12+12;if(E){const u=H,h=u+I(e.value),{count:c,drop:m}=O(t);/* @__PURE__ */
|
|
5
|
+
return f("g",{opacity:K(t,e.key)?.45:1,onMouseEnter:()=>w(t),children:[
|
|
6
|
+
/* @__PURE__ */d("path",{d:`M${u},${l} L${h},${l} L${h},${a} L${u},${a} Z`,fill:q(t)}),
|
|
7
|
+
/* @__PURE__ */d("text",{x:H-12,y:r+4,textAnchor:"end",fontSize:12,fill:n.label,children:e.label}),h-u>=i&&/* @__PURE__ */d("text",{x:u+8,y:r+4,textAnchor:"start",fontSize:12,fontWeight:600,fill:D(t),style:{fontVariantNumeric:"tabular-nums"},children:o}),
|
|
8
|
+
/* @__PURE__ */f("text",{"data-funnel-value":"true",x:h+8,y:r+4,textAnchor:"start",fontSize:12,fill:n.label,style:{fontVariantNumeric:"tabular-nums"},children:[
|
|
9
|
+
/* @__PURE__ */d("tspan",{fontWeight:600,children:c}),m&&/* @__PURE__ */d("tspan",{fill:n.muted,children:` ${m}`})]})]},e.key)}const h=J(e.value),c="cone"===v?J(x[t+1]?.value??e.value):h,m=T(t),s=2*Math.min(h,c)>=i;/* @__PURE__ */
|
|
10
|
+
return f("g",{opacity:K(t,e.key)?.45:1,onMouseEnter:()=>w(t),children:[
|
|
11
|
+
/* @__PURE__ */d("path",{d:`M${Q-h},${l} L${Q+h},${l} L${Q+c},${a} L${Q-c},${a} Z`,fill:q(t)}),
|
|
12
|
+
/* @__PURE__ */d("text",{x:H-14,y:r-2,textAnchor:"end",fontSize:12,fill:n.label,children:e.label}),
|
|
13
|
+
/* @__PURE__ */f("text",{x:H-14,y:r+14,textAnchor:"end",fontSize:11,fill:n.muted,style:{fontVariantNumeric:"tabular-nums"},children:[S(e.value),null!=m?` · −${u(m,1,L)}`:""]}),
|
|
14
|
+
/* @__PURE__ */d("text",{x:s?Q:Q+Math.max(h,c)+6,y:r+4,textAnchor:s?"middle":"start",fontSize:12,fontWeight:600,fill:s?D(t):n.label,style:{fontVariantNumeric:"tabular-nums"},children:o})]},e.key)})]}),_&&null!==V&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(t,{title:_.label,rows:[{key:"value",label:N.count,color:q(V),value:S(_.value)},{key:"share",label:N.ofFirstStage,color:n.muted,value:u(_.value/(x[0].value||1)*100,0,L)},...V>0&&x[V-1].value>0?[{key:"drop",label:N.droppedHere,color:r.critical,value:`−${u(100*(1-_.value/x[V-1].value),1,L)}`}]:[]]})})]})}export{x as FunnelChart};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{ChartTooltip as t}from"./chunk-P5BOTIJU.js";import{CartesianPlot as a}from"./chunk-
|
|
2
|
-
return i(a,{labels:c.map(t=>t.label),values:j,height:u,width:m,formatValue:y,yAxisLabel:f,className:p,emptyLabel:d,bandPadding:.36,ariaLabel:v.waterfall(c.length,y(
|
|
3
|
-
return i(t,{title:e?.label,rows:[{key:"step",color:o,label:e?.total?v.balance:e.value>=0?v.increase:v.decrease,value:e?.total?y(e.to):`${e.value>=0?"+":"−"}${y(Math.abs(e.value))}`},...e?.total?[]:[{key:"running",label:v.runningTotal,color:l.neutral,value:y(e.to)}]]})},children:({x:t,y:a,active:o})=>/* @__PURE__ */s("g",{children:[g&&
|
|
4
|
-
/* @__PURE__ */i("line",{x1:t.end(o),y1:a(l.to),x2:t(o+1),y2:a(l.to),stroke:e.grid,strokeWidth:1,shapeRendering:"crispEdges"},`c${o}`)),
|
|
1
|
+
import{ChartTooltip as t}from"./chunk-P5BOTIJU.js";import{CartesianPlot as a}from"./chunk-ZGCLFQS5.js";import{CHART_INK as e,STATUS_VARS as l}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as r}from"./chunk-GTRUBA2R.js";import{formatPlain as n}from"./chunk-C3QOHMR6.js";import{jsx as i,jsxs as s}from"react/jsx-runtime";function c({steps:c,height:u=240,width:m,formatValue:h,yAxisLabel:f,className:p,emptyLabel:d,radius:b=3,connectors:g=!0}){const v=o().charts,x=r(),y=h??(t=>n(t,x));let k=0;const M=c.map(t=>{if(t.total){const a={from:0,to:k,value:k,total:!0};return{...t,...a}}const a=k;return k+=t.value,{...t,from:a,to:k,value:t.value,total:!1}}),j=M.flatMap(t=>[t.from,t.to]);/* @__PURE__ */
|
|
2
|
+
return i(a,{labels:c.map(t=>t.label),values:j,height:u,width:m,formatValue:y,yAxisLabel:f,className:p,emptyLabel:d,bandPadding:.36,ariaLabel:v.waterfall(c.length,y(M[0]?.from??0),y(k)),tooltip:a=>{const e=M[a],o=e?.total?l.neutral:e.value>=0?l.good:l.critical;/* @__PURE__ */
|
|
3
|
+
return i(t,{title:e?.label,rows:[{key:"step",color:o,label:e?.total?v.balance:e.value>=0?v.increase:v.decrease,value:e?.total?y(e.to):`${e.value>=0?"+":"−"}${y(Math.abs(e.value))}`},...e?.total?[]:[{key:"running",label:v.runningTotal,color:l.neutral,value:y(e.to)}]]})},children:({x:t,y:a,active:o})=>/* @__PURE__ */s("g",{children:[g&&M.slice(0,-1).map((l,o)=>
|
|
4
|
+
/* @__PURE__ */i("line",{x1:t.end(o),y1:a(l.to),x2:t(o+1),y2:a(l.to),stroke:e.grid,strokeWidth:1,shapeRendering:"crispEdges"},`c${o}`)),M.map((e,r)=>{const n=e.total?l.neutral:e.value>=0?l.good:l.critical,s=Math.min(a(e.from),a(e.to)),c=Math.max(1,Math.abs(a(e.to)-a(e.from)));/* @__PURE__ */
|
|
5
5
|
return i("rect",{x:t(r),y:s,width:Math.max(1,t.bandwidth),height:c,rx:b,fill:n,fillOpacity:null===o||o===r?1:.45},r)})]})})}export{c as WaterfallChart};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{inputClasses as t}from"./chunk-JFSYWEHD.js";import{useShellLocale as e}from"./chunk-
|
|
1
|
+
import{inputClasses as t}from"./chunk-JFSYWEHD.js";import{useShellLocale as e}from"./chunk-GTRUBA2R.js";import{forwardRef as n}from"react";import{jsx as a}from"react/jsx-runtime";var r=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?$/,i=t=>String(t).padStart(2,"0");function l(t){return null==t||""===t?"":t instanceof Date?Number.isNaN(t.getTime())?"":`${(e=t).getFullYear()}-${i(e.getMonth()+1)}-${i(e.getDate())}T${i(e.getHours())}:${i(e.getMinutes())}`:r.test(t)?t:"";var e}var o=n(function({value:n,onChange:i,min:o,max:u,invalid:m,size:s,className:c="",...d},g){const p=e();/* @__PURE__ */
|
|
2
2
|
return a("input",{ref:g,type:"datetime-local",lang:p,"aria-invalid":m||void 0,value:l(n),min:l(o)||void 0,max:l(u)||void 0,onChange:t=>i?.(function(t){if(!r.test(t))return null;const[e,n]=t.split("T"),[a,i,l]=e.split("-").map(Number),[o,u,m=0]=n.split(":").map(Number);if(o>23||u>59||m>59)return null;const s=new Date(a,i-1,l,o,u,m);return s.getMonth()===i-1&&s.getDate()===l?s:null}(t.target.value)),className:t({invalid:m,size:s,className:c}),...d})});export{o as DateTimePicker_default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-42BBJJDP.js";import{useShellStrings as t}from"./chunk-GTRUBA2R.js";import{jsxs as r,jsx as a}from"react/jsx-runtime";function n({title:n,message:s,description:d,hint:i,variant:m,frameless:c,icon:o,children:l}){const h=c?"none":m??"dashed",x="boolean"!=typeof o&&null!=o?o:null,p=!x&&(o??"card"!==h),u=t().emptyState,y=s??(n?void 0:u.message),f=d??i;/* @__PURE__ */
|
|
2
2
|
return r("div",{className:`flex flex-col items-center justify-center text-center ${"card"===h?"rounded-md border border-gray-200 bg-white px-6 py-12":"none"===h?"px-6 py-12":"rounded-lg border-2 border-dashed border-gray-300 px-6 py-12"}`,children:[x&&/* @__PURE__ */a("div",{className:"mb-3 flex h-10 w-10 items-center justify-center text-gray-300","aria-hidden":"true",children:x}),p&&/* @__PURE__ */a(e,{name:"inbox",className:"h-10 w-10 text-gray-300 mb-3","aria-hidden":"true",strokeWidth:1}),n&&/* @__PURE__ */a("h3",{className:"text-sm font-medium text-gray-900",children:n}),y&&/* @__PURE__ */a("p",{className:"text-sm text-gray-500 "+(n?"mt-2":""),children:y}),f&&/* @__PURE__ */a("p",{className:"text-xs text-gray-400 mt-1",children:f}),l&&/* @__PURE__ */a("div",{className:"mt-4",children:l})]})}export{n as EmptyState};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import{keepsNativeMenu as e}from"./chunk-5QFPTDQF.js";import{optionNoteClass as t}from"./chunk-QR4RM7PO.js";import{Icon as n}from"./chunk-42BBJJDP.js";import{onOverlayOpen as r}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as o}from"./chunk-62LW225J.js";import{useHydrated as i,useBrowserLayoutEffect as a}from"./chunk-D65T4H6J.js";import{glassStyle as l,GLASS_DIVIDER as c}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{createContext as u,forwardRef as d,useContext as p,useId as m,useRef as h,useState as f,useEffect as g,useMemo as y,useCallback as b}from"react";import{createPortal as w}from"react-dom";import{jsxs as x,jsx as k,Fragment as v}from"react/jsx-runtime";function N(e,t,n){return e.length===t+1&&e[t].key===n.key?e:[...e.slice(0,t),n]}function C(e,t){const n=Math.max(0,t);return e.length>n?e.slice(0,n):e}function T(e,t,n){if(0===t.length||0===e.length)return[];const r=[e];for(let e=1;e<t.length;e++){const o=r[e-1].find(n=>n.to===t[e].key),i=o?n(o):[];if(0===i.length)break;r.push(i)}return r}function E(e,t,n,r){const o=Math.max(0,r-n),i=Math.min(t,o),a=e-i/2;return a<n?n:a+i>r?Math.max(n,r-i):a}function M(e,t,n,r,o,i=!1,a=8){const l=t+o,c=e-o-n,s=c>=a;return i&&s?{left:c,flipped:!0}:l+n<=r-a?{left:l,flipped:!1}:s?{left:c,flipped:!0}:i?{left:a,flipped:!0}:{left:Math.max(a,r-a-n),flipped:!1}}function W(){try{return getComputedStyle(document.documentElement).getPropertyValue("--menu-density")?.trim()||"normal"}catch{return"normal"}}var B=u(null),$=u(!1);function L({children:t,style:n,className:a="",onClose:c,minWidth:u=180,portal:d=!1}){const p=h(null),b=m(),[x,v]=f([]),T=h();g(()=>()=>clearTimeout(T.current),[]);const E=i(),M=y(()=>{const e=()=>clearTimeout(T.current);return{id:b,depth:0,path:x,open:(t,n)=>{e(),v(e=>N(e,t,n))},scheduleClose:t=>{e(),T.current=setTimeout(()=>v(e=>C(e,t)),200)},closeBelow:t=>{e(),v(e=>C(e,t))},cancelClose:e,closeTree:()=>{e(),v([]),c?.()},root:p}},[b,x,c]);g(()=>{if(!c)return;const e=e=>{e.target.closest("[data-menu-toggle]")||e.target.closest?.(`[data-popup-menu-tree="${b}"]`)||p.current&&!p.current.contains(e.target)&&c()},t=e=>{"Escape"===e.key&&c()};window.addEventListener("pointerdown",e),window.addEventListener("keydown",t);const n=r(c),o=s(()=>!1,()=>p.current);return()=>{window.removeEventListener("pointerdown",e),window.removeEventListener("keydown",t),n(),o()}},[c,b]),g(()=>{const e=p.current;e&&requestAnimationFrame(()=>{const t=e.getBoundingClientRect();if(t.right>window.innerWidth-8){const n=t.right-window.innerWidth+8;e.style.left?e.style.left=parseFloat(e.style.left)-n+"px":e.style.right||(e.style.left=t.left-n+"px")}if(t.left<8&&(e.style.left?e.style.left="8px":e.style.right&&(e.style.right=window.innerWidth-t.width-8+"px")),t.bottom>window.innerHeight-8){const n=t.bottom-window.innerHeight+8;e.style.top?e.style.top=parseFloat(e.style.top)-n+"px":e.style.bottom?e.style.bottom="8px":e.style.top=t.top-n+"px"}t.top<8&&(e.style.top?e.style.top="8px":e.style.bottom&&(e.style.bottom=window.innerHeight-t.height-8+"px"))})});const $=W(),L=/(^|[\s:])!?z-/.test(a),R=/* @__PURE__ */k("div",{ref:p,"data-popup-menu-tree":b,className:`fixed rounded-(--radius-popup) ${"tight"===$?"py-1":"large"===$?"py-2":"py-1"} ${a}`,onContextMenu:t=>{e(t.target)||t.preventDefault()},style:{...L?{}:{zIndex:o.menu},minWidth:u,animation:"popup-in 0.12s ease-out",...l(),...n},children:/* @__PURE__ */k(B.Provider,{value:M,children:t})});return d?E?w(R,document.body):null:R}function R(e,t,n,r=!1){const o=W(),i="tight"===o?"0.25rem":"large"===o?"0.6rem":0;return{className:`w-full flex items-center gap-2 text-left transition-colors rounded-lg mx-auto\n ${e?"text-red-600 not-disabled:not-aria-disabled:hover:bg-red-50":r?"bg-blue-50 text-blue-700":"text-gray-700 not-disabled:not-aria-disabled:hover:bg-blue-50 not-disabled:not-aria-disabled:hover:text-blue-700"}\n ${t?"opacity-40 cursor-not-allowed":""}\n ${n}`,style:{width:"calc(100% - 8px)",marginLeft:4,marginRight:4,fontSize:"var(--menu-font-size, 14px)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:i,paddingBottom:i,..."normal"===o?{minHeight:"calc(var(--row-height-menu, 2.25rem) + 2 * (var(--menu-padding-y, 0.5rem) - 0.5rem))"}:{}}}}var j=/* @__PURE__ */k(n,{name:"check","aria-hidden":!0,className:"h-4 w-4",strokeWidth:2});function D({kind:e,checked:t}){/* @__PURE__ */
|
|
2
|
+
return k("span","checkbox"===e?{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center rounded border "+(t?"border-blue-600 bg-blue-600 text-white":"border-gray-400"),children:t&&j}:{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:t&&j})}var P=d(function({onClick:e,children:n,className:r="",danger:o,disabled:i,role:a,checked:l,icon:c,description:s,tabIndex:u,id:d,onMouseEnter:h},f){const g=p(B),y=m(),b=null!=s&&!1!==s,w=`${d??y}-label`,N=`${d??y}-note`,C=p($),T=R(o,i,r),E=void 0===l?null:"menuitemradio"===a?"radio":"checkbox";/* @__PURE__ */
|
|
3
|
+
return x("button",{ref:f,id:d,role:"radio"===E?"menuitemradio":"checkbox"===E?"menuitemcheckbox":a??(C?"menuitem":void 0),"aria-checked":E?l:void 0,"aria-labelledby":b?w:void 0,"aria-describedby":b?N:void 0,tabIndex:u,onClick:()=>{e?.(),g&&g.depth>0&&"checkbox"!==E&&g.closeTree()},onMouseEnter:()=>{g?.scheduleClose(g.depth),h?.()},disabled:i,className:T.className,style:T.style,children:[E&&/* @__PURE__ */k(D,{kind:E,checked:!!l}),b?
|
|
4
|
+
/* @__PURE__ */x("span",{className:"block min-w-0 flex-1 py-2",children:[
|
|
5
|
+
/* @__PURE__ */x("span",{className:"flex items-center gap-2",children:[null!=c&&/* @__PURE__ */k(A,{children:c}),
|
|
6
|
+
/* @__PURE__ */k("span",{id:w,className:"min-w-0",children:n})]}),
|
|
7
|
+
/* @__PURE__ */k("span",{id:N,"data-menu-note":"",className:t(),style:null!=c?{paddingLeft:"1.5rem"}:void 0,children:s})]}):/* @__PURE__ */x(v,{children:[null!=c&&/* @__PURE__ */k(A,{children:c}),n]})]})});function A({children:e}){/* @__PURE__ */
|
|
8
|
+
return k("span",{"aria-hidden":"true","data-menu-icon":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:e})}var F=/* @__PURE__ */k(n,{name:"chevron-right","aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0 ml-auto",strokeWidth:2});function H(e){let t=o.menu;for(let n=e;n&&n!==document.body;n=n.parentElement){const e=parseInt(getComputedStyle(n).zIndex,10);Number.isNaN(e)||(t=e)}return t}function I(e){return e?[...e.querySelectorAll("button:not([disabled]), a[href]")].filter(t=>t.closest("[data-popup-submenu-panel]")===e):[]}function z({label:t,icon:n,children:r,disabled:o,className:i="",minWidth:c=180,maxHeight:u,rowProps:d}){const f=p(B),N=m(),C=h(null),T=h(null),$=h(),L=h(!1),j=`${N}-menu`;g(()=>()=>clearTimeout($.current),[]);const D=f?.depth??0,P=f?.path[D],A=!!P&&P.key===N&&!o,z=b(e=>{if(!f||o||!C.current)return;clearTimeout($.current),L.current=e;const t=C.current.getBoundingClientRect(),n=C.current.closest("[data-popup-submenu-panel]")??C.current.closest("[data-popup-menu-tree]"),r=n?.getBoundingClientRect()??t,i=D>0&&(f.path[D-1]?.flipped??!1),a=M(r.left,r.right,c,window.innerWidth,4,i);f.open(D,{key:N,y:t.top,...a})},[f,o,D,N,c]),S=e=>{f?.closeBelow(D),C.current?.focus()};g(()=>{if(A)return s(e=>"Escape"===e.key&&(!(f&&f.path.length>D+1)&&(S(),!0)),()=>T.current)}),a(()=>{if(!A||!P)return;const e=()=>{const e=T.current;if(!e||!C.current)return;const t=C.current.closest("[data-popup-submenu-panel]")??C.current.closest("[data-popup-menu-tree]"),n=t?.getBoundingClientRect()??C.current.getBoundingClientRect(),r=D>0&&(f?.path[D-1]?.flipped??!1),o=e.offsetWidth||c,i=M(n.left,n.right,o,window.innerWidth,4,r,8),a=e.offsetHeight,l=E(C.current.getBoundingClientRect().top+a/2,a,8,window.innerHeight-8);e.style.left=`${i.left}px`,e.style.top=`${l}px`,e.dataset.flipped=String(i.flipped)};e();let t=0;const n=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>{cancelAnimationFrame(n),cancelAnimationFrame(t)}}),g(()=>{A&&L.current&&(L.current=!1,I(T.current)[0]?.focus())},[A]);const J=y(()=>f&&{...f,depth:D+1},[f,D]);if(!f)throw new Error("PopupSubmenu must be rendered inside a PopupMenu");const q=R(!1,o,i,A),Q=W();/* @__PURE__ */
|
|
9
|
+
return x(v,{children:[
|
|
10
|
+
/* @__PURE__ */x("button",{ref:C,type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":A,"aria-controls":A?j:void 0,disabled:o,"data-popup-submenu-row":!0,className:q.className,style:q.style,onClick:e=>{const t=0===e.detail;A?t&&I(T.current)[0]?.focus():z(t)},...d,onKeyDown:e=>{"ArrowRight"===e.key&&(e.preventDefault(),e.stopPropagation(),z(!0))},onMouseEnter:()=>{d?.onMouseEnter?.(),o||(f.cancelClose(),A?f.closeBelow(D+1):(clearTimeout($.current),$.current=setTimeout(()=>z(!1),120)))},onMouseLeave:()=>{clearTimeout($.current),f.scheduleClose(D)},children:[n,
|
|
11
|
+
/* @__PURE__ */k("span",{className:"min-w-0 flex-1 truncate",children:t}),F]}),A&&w(
|
|
12
|
+
/* @__PURE__ */k("div",{ref:T,id:j,role:"menu","data-popup-menu-tree":f.id,"data-popup-submenu-panel":!0,className:"fixed rounded-(--radius-popup) overflow-x-hidden overflow-y-auto overscroll-contain "+("tight"===Q?"py-1":"large"===Q?"py-2":"py-1"),style:{left:P.left,top:P.y,minWidth:c,maxHeight:void 0===u?"calc(100vh - 16px)":`min(${"number"==typeof u?`${u}px`:u}, calc(100vh - 16px))`,zIndex:H(f.root.current)+D+1,animation:(P.flipped?"popup-submenu-in-left":"popup-submenu-in")+" 0.1s ease-out",...l()},onKeyDown:e=>{if(e.target.closest("[data-popup-submenu-panel]")!==e.currentTarget)return;const t=I(T.current),n=t.indexOf(document.activeElement),r=n=>{e.preventDefault(),e.stopPropagation(),t[(n+t.length)%t.length]?.focus()};"ArrowDown"===e.key?r(n+1):"ArrowUp"===e.key?r(n<0?t.length-1:n-1):"Home"===e.key?r(0):"End"===e.key?r(t.length-1):"ArrowLeft"===e.key&&(e.preventDefault(),e.stopPropagation(),S())},onMouseEnter:()=>{f.cancelClose(),clearTimeout($.current)},onMouseLeave:()=>f.scheduleClose(D+1),onContextMenu:t=>{e(t.target)||t.preventDefault()},children:/* @__PURE__ */k(B.Provider,{value:J,children:r})}),document.body)]})}function S(){const e=W();/* @__PURE__ */
|
|
13
|
+
return k("div",{className:`border-t ${c} ${"tight"===e?"my-0.5":"large"===e?"my-2":"my-1"} mx-3`})}function J(){const e=W(),t="tight"===e?"0.125rem":"large"===e?"0.375rem":"0.25rem";return{color:"var(--ink-muted)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:t,paddingBottom:t}}function q({children:e}){/* @__PURE__ */
|
|
14
|
+
return k("div",{className:"text-xs font-medium uppercase tracking-wide",style:J(),children:e})}function Q({d:e,className:t="h-4 w-4"}){/* @__PURE__ */
|
|
15
|
+
return k("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */k("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})})}export{D as MenuCheckMark,Q as MenuIcon,$ as MenuSemanticsContext,L as PopupMenu,S as PopupMenuDivider,P as PopupMenuItem,q as PopupMenuLabel,z as PopupSubmenu,E as clampMenuTop,C as closeMenuBelow,R as itemLook,M as menuPanelLeft,J as menuTextRowStyle,N as openMenuLevel,T as resolveMenuLevels};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Card as e}from"./chunk-
|
|
1
|
+
import{Card as e}from"./chunk-TDAFCJY7.js";import{Select_default as a}from"./chunk-AG3ALTVD.js";import{Input_default as r}from"./chunk-UNEJ2ABD.js";import{Pagination as t}from"./chunk-DGTP6BGV.js";import{StatusBadgeProvider as i,StatusBadge as s}from"./chunk-5SULG7D5.js";import{TH_ONE_LINE as l}from"./chunk-7T3COEQK.js";import{Button_default as c}from"./chunk-UDD7GB4F.js";import{Icon as m}from"./chunk-42BBJJDP.js";import{useState as n}from"react";import{jsx as d,jsxs as o}from"react/jsx-runtime";var h={active:"success",invited:"queued",suspended:"danger",pending:"pending"},p=[{name:"Alice Nguyen",email:"alice@acme.co",role:"Admin",status:"active"},{name:"Marco Reyes",email:"marco@acme.co",role:"Editor",status:"invited"},{name:"Priya Patel",email:"priya@acme.co",role:"Editor",status:"active"},{name:"Tom Becker",email:"tom@acme.co",role:"Viewer",status:"suspended"},{name:"Sara Lind",email:"sara@acme.co",role:"Viewer",status:"pending"},{name:"Yuki Tanaka",email:"yuki@acme.co",role:"Editor",status:"active"}];function u(){const[m,u]=n(1),[g,f]=n(""),[y,v]=n("");/* @__PURE__ */
|
|
2
2
|
return d(i,{groups:h,children:/* @__PURE__ */d("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */o("div",{className:"mx-auto max-w-5xl space-y-4",children:[
|
|
3
3
|
/* @__PURE__ */o("div",{className:"flex items-center justify-between gap-4",children:[
|
|
4
4
|
/* @__PURE__ */d("h1",{className:"text-xl font-semibold text-gray-900",children:"Members"}),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{CountBadge as e}from"./chunk-
|
|
2
|
-
return o("div",{"data-accordion":$,className:`@container/acc flex flex-col ${"band"===$?"gap-0.5":""} ${g}`.trim(),children:d.map(i=>{const t=
|
|
1
|
+
import{CountBadge as e}from"./chunk-A3MOA3T7.js";import{Icon as n}from"./chunk-42BBJJDP.js";import{useShellStrings as i,useShellLocale as t}from"./chunk-GTRUBA2R.js";import{formatPlain as r}from"./chunk-C3QOHMR6.js";import{useState as a,useId as s}from"react";import{jsx as o,jsxs as c,Fragment as l}from"react/jsx-runtime";var d="px-4 @max-[260px]/acc:px-3",h={band:{head:`${d} py-3 bg-(--rosh-fold-band)`,press:"hover:bg-(--rosh-fold-band-hover)",title:"text-base font-semibold text-(--ink-strongest)",chev:"text-(--ink-strongest)",body:`${d} pb-2`},row:{head:`${d} py-2`,press:"hover:bg-gray-50",title:"text-sm font-medium text-(--ink-strong)",chev:"text-(--ink-strong)",body:`${d} pb-2`}},m=e=>[...e].map(e=>/[A-Za-z0-9_-]/.test(e)?e:`-u${e.codePointAt(0).toString(16)}-`).join(""),u="m-0 p-0 border-0 [font:inherit] [letter-spacing:inherit] [text-transform:inherit]";function f({items:d,defaultOpenIds:f=[],openIds:p,onOpenChange:b,allowMultiple:v=!1,level:x=3,tier:$="band",className:g=""}){const N=h[$],y=i(),k=t(),[w,j]=a(f),A=s(),O=`h${x}`,B=p??w;/* @__PURE__ */
|
|
2
|
+
return o("div",{"data-accordion":$,className:`@container/acc flex flex-col ${"band"===$?"gap-0.5":""} ${g}`.trim(),children:d.map(i=>{const t=B.includes(i.id),a=`${A}-${m(i.id)}-head`,s=`${A}-${m(i.id)}-panel`;/* @__PURE__ */
|
|
3
3
|
return c("div",{children:[
|
|
4
|
-
/* @__PURE__ */o(O,{className:u,children:/* @__PURE__ */c("button",{type:"button",id:a,disabled:i.disabled,"aria-expanded":t,"aria-controls":t?s:void 0,onClick:()=>(e=>{const n=
|
|
4
|
+
/* @__PURE__ */o(O,{className:u,children:/* @__PURE__ */c("button",{type:"button",id:a,disabled:i.disabled,"aria-expanded":t,"aria-controls":t?s:void 0,onClick:()=>(e=>{const n=B.includes(e)?B.filter(n=>n!==e):v?[...B,e]:[e];void 0===p&&j(n),b?.(n)})(i.id),className:`flex w-full items-center gap-2 text-left transition-colors duration-(--motion-fast) disabled:cursor-not-allowed disabled:opacity-50 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${N.head} ${N.press}`,children:[null!=i.icon&&/* @__PURE__ */o("span",{"aria-hidden":"true",className:`inline-flex h-4 w-4 shrink-0 items-center justify-center ${N.chev}`,children:i.icon}),
|
|
5
5
|
/* @__PURE__ */o("span",{className:`min-w-0 flex-1 ${N.title}`,children:i.title}),"number"==typeof i.count&&i.count>0&&
|
|
6
6
|
/* @__PURE__ */c(l,{children:[
|
|
7
7
|
/* @__PURE__ */o("span",{"aria-hidden":"true",className:"inline-flex",children:/* @__PURE__ */o(e,{count:i.count,tone:"accent"})}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Card as e}from"./chunk-
|
|
1
|
+
import{Card as e}from"./chunk-TDAFCJY7.js";import{Input_default as t}from"./chunk-UNEJ2ABD.js";import{FormField as r}from"./chunk-MVQBVPWP.js";import{Checkbox_default as l}from"./chunk-CGZBDI6C.js";import{Button_default as a}from"./chunk-UDD7GB4F.js";import{useState as i}from"react";import{jsx as c,jsxs as n,Fragment as s}from"react/jsx-runtime";var o={login:{title:"Welcome back",subtitle:"Sign in to your account",cta:"Sign in"},register:{title:"Create your account",subtitle:"Start your 14-day free trial",cta:"Create account"},forgot:{title:"Reset password",subtitle:"We'll email you a reset link",cta:"Send reset link"}};function m({mode:m="login"}){const[u,d]=i(!0),h=o[m];/* @__PURE__ */
|
|
2
2
|
return c("div",{className:"flex h-full items-center justify-center overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */n("div",{className:"w-full max-w-sm",children:[
|
|
3
3
|
/* @__PURE__ */n("div",{className:"mb-6 text-center",children:[
|
|
4
4
|
/* @__PURE__ */c("div",{className:"mx-auto mb-3 flex h-10 w-10 items-center justify-center rounded-lg bg-blue-600 text-sm font-bold text-white",children:"A"}),
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import{useCopyText as e,CopyGlyph as n}from"./chunk-
|
|
1
|
+
import{useCopyText as e,CopyGlyph as n}from"./chunk-O5PJELY7.js";import{PopupMenu as t,PopupMenuItem as r,PopupMenuDivider as l}from"./chunk-UPHXYWL6.js";import{Icon as i}from"./chunk-42BBJJDP.js";import{useShellStrings as a}from"./chunk-GTRUBA2R.js";import{useState as o,useEffect as s,Fragment as c,useRef as d,useLayoutEffect as m}from"react";import{jsxs as u,jsx as p,Fragment as h}from"react/jsx-runtime";var f="flex-[0_1_15rem]",y=f,b="outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-500";function x(){/* @__PURE__ */
|
|
2
2
|
return p(i,{name:"close",look:"mini","aria-hidden":"true",className:"size-3.5"})}function g({text:t,label:r,copiedLabel:l}){const{copied:i,copy:a}=e(t);/* @__PURE__ */
|
|
3
|
-
return p("button",{type:"button",tabIndex:-1,"aria-label":i?l:r,title:i?l:r,onClick:a,className:"flex size-5 shrink-0 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 @max-[10rem]:hidden",children:/* @__PURE__ */p(n,{copied:i,className:"size-3.5"})})}function k({node:e}){const n=d(null);return m(()=>{const t=n.current;if(t)return t.appendChild(e),()=>{e.parentNode===t&&t.removeChild(e)}},[e]),/* @__PURE__ */p("span",{ref:n,className:"ml-1 flex shrink-0 items-center"})}function v({tabs:e,activeKey:n,idFor:d,panelMounted:m,onActivate:v,onClose:N,onCloseMany:w,label:C,className:$,activeClassName:j,end:z,afterPinned:I,onIconMenu:D,menuItems:
|
|
3
|
+
return p("button",{type:"button",tabIndex:-1,"aria-label":i?l:r,title:i?l:r,onClick:a,className:"flex size-5 shrink-0 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 @max-[10rem]:hidden",children:/* @__PURE__ */p(n,{copied:i,className:"size-3.5"})})}function k({node:e}){const n=d(null);return m(()=>{const t=n.current;if(t)return t.appendChild(e),()=>{e.parentNode===t&&t.removeChild(e)}},[e]),/* @__PURE__ */p("span",{ref:n,className:"ml-1 flex shrink-0 items-center"})}function v({tabs:e,activeKey:n,idFor:d,panelMounted:m,onActivate:v,onClose:N,onCloseMany:w,label:C,className:$,activeClassName:j,end:z,afterPinned:I,onIconMenu:D,menuItems:B,sizing:M="even"}){const A=a().pageTabs,[_,E]=o(null),L=e.length;s(()=>{if(!n)return;const e=document.getElementById(d(n,"tab"));e?.scrollIntoView?.({block:"nearest",inline:"nearest"})},[d,n,L]);const R=I?e.findIndex(e=>!e.pinned):-1,P=e.some(e=>e.key===n)?n:e[0]?.key,T=n=>{const t=e[(n+e.length)%e.length];t&&document.getElementById(d(t.key,"tab"))?.focus()},J=_?e.find(e=>e.key===_.key):void 0,O=J&&B?B(J.key):[],Y=J?e.indexOf(J):-1,F=e=>e.some(e=>!e.pinned),H=e=>()=>{E(null),e()};/* @__PURE__ */
|
|
4
4
|
return u("div",{className:$??"relative flex h-10 shrink-0 items-end gap-3 bg-gray-100 px-3",children:[
|
|
5
5
|
/* @__PURE__ */p("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 h-px bg-gray-200"}),
|
|
6
|
-
/* @__PURE__ */u("div",{role:"tablist","aria-label":C,onKeyDown:n=>{const t=e.findIndex(e=>document.getElementById(d(e.key,"tab"))===n.target);if(!(t<0)){if("ArrowRight"===n.key)
|
|
6
|
+
/* @__PURE__ */u("div",{role:"tablist","aria-label":C,onKeyDown:n=>{const t=e.findIndex(e=>document.getElementById(d(e.key,"tab"))===n.target);if(!(t<0)){if("ArrowRight"===n.key)T(t+1);else if("ArrowLeft"===n.key)T(t-1);else if("Home"===n.key)T(0);else if("End"===n.key)T(e.length-1);else{if("Delete"!==n.key||e[t].pinned)return;N(e[t].key)}n.preventDefault()}},className:"flex min-w-0 flex-1 items-end overflow-x-auto overflow-y-hidden [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[e.map((t,r)=>{const l=t.key===n,a=!!t.dirty,o=t.icon,s=l?j??"z-[1] border-gray-200 bg-gray-50 text-gray-900":"border-transparent text-gray-600 hover:bg-gray-200/70 hover:text-gray-900",h=r>0&&r!==R&&!l&&e[r-1].key!==n,w={type:"button",role:"tab",id:d(t.key,"tab"),"aria-selected":l,"aria-controls":m?.(t.key)?d(t.key,"panel"):void 0,tabIndex:t.key===P?0:-1,title:t.title,onClick:()=>v(t.key)},C={onContextMenu:e=>((e,n)=>{e.preventDefault(),E({x:e.clientX,y:e.clientY,key:n.key})})(e,t),onAuxClick:e=>((e,n)=>{1!==e.button||n.pinned||(e.preventDefault(),N(n.key))})(e,t),onMouseDown:e=>{1===e.button&&e.preventDefault()}},$=o&&
|
|
7
7
|
/* @__PURE__ */u("span",{className:"relative flex size-4 shrink-0 items-center justify-center text-gray-500 [&>svg]:size-4","aria-hidden":"true",children:[o,a&&!l&&!t.pinned&&
|
|
8
8
|
/* @__PURE__ */p("span",{className:"absolute -right-1 -top-1 hidden size-2 rounded-full bg-gray-500 ring-2 ring-gray-100 @max-[6.5rem]:block @max-[6.5rem]:group-hover:hidden"})]}),z=l&&!!D&&!!o;return t.pinned?/* @__PURE__ */p("div",{role:"presentation",className:`group relative flex h-8 flex-none items-center justify-center rounded-t-md border border-b-0 transition-colors ${o?"w-10":""} ${s}`,...C,children:/* @__PURE__ */u("button",{...w,className:`flex h-full items-center justify-center rounded-t-md ${o?"w-full":"px-3"} ${b}`,children:[$,
|
|
9
9
|
/* @__PURE__ */p("span",{className:o?"sr-only":"whitespace-nowrap text-sm",children:t.title})]})},t.key):/* @__PURE__ */u(c,{children:[r===R&&I,h&&/* @__PURE__ */p("span",{"aria-hidden":"true",className:"mb-3 h-4 w-px shrink-0 self-end border-l border-gray-300"}),
|
|
10
|
-
/* @__PURE__ */u("div",{role:"presentation",className:`group relative flex h-8 items-center rounded-t-md border border-b-0 text-sm transition-colors ${"active-full"===
|
|
10
|
+
/* @__PURE__ */u("div",{role:"presentation",className:`group relative flex h-8 items-center rounded-t-md border border-b-0 text-sm transition-colors ${"active-full"===M&&l?"":"@container"} ${"active-full"===M?l?"flex-none min-w-[12rem] max-w-[40rem]":y:l&&(t.copy||z)?"flex-[0_1_20rem]":f} ${l?"active-full"===M?"":"min-w-[4.25rem]":"min-w-[2.75rem]"} ${s}`,...C,children:[z&&
|
|
11
11
|
/* @__PURE__ */p("button",{type:"button",tabIndex:-1,"aria-haspopup":"menu","aria-label":A.tabMenu,title:A.tabMenu,onClick:e=>{const n=e.currentTarget.getBoundingClientRect();D?.(t.key,n.left,n.bottom+4)},className:`ml-2 flex size-6 shrink-0 items-center justify-center rounded hover:bg-gray-200 @max-[5rem]:ml-2 ${b}`,children:$}),
|
|
12
12
|
/* @__PURE__ */u("button",{...w,className:`flex h-full min-w-0 flex-1 items-center gap-2 rounded-t-md pr-1 text-left ${z?"pl-2":"pl-3"} ${b} ${l?z?"":"@max-[5rem]:pl-3":"@max-[6.5rem]:pr-3 @max-[6.5rem]:group-hover:pr-1 @max-[4.5rem]:justify-center @max-[4.5rem]:px-0 @max-[4.5rem]:group-hover:pl-2"}`,children:[!z&&$,
|
|
13
|
-
/* @__PURE__ */u("span",{className:`min-w-0 flex-1 overflow-hidden whitespace-nowrap [mask-image:linear-gradient(to_right,#000_calc(100%-1rem),transparent)] ${"active-full"===
|
|
13
|
+
/* @__PURE__ */u("span",{className:`min-w-0 flex-1 overflow-hidden whitespace-nowrap [mask-image:linear-gradient(to_right,#000_calc(100%-1rem),transparent)] ${"active-full"===M&&l?"pr-4":""} ${o?l?"@max-[5rem]:sr-only":"@max-[4.5rem]:sr-only":""}`,children:[t.title,t.favorite&&
|
|
14
14
|
/* @__PURE__ */p("span",{role:"img","aria-label":A.favorite,title:A.favorite,className:"ml-1 inline-flex align-[-0.125em] text-yellow-500",children:/* @__PURE__ */p(i,{name:"star","aria-hidden":"true",className:"size-3.5",fill:"currentColor",strokeWidth:1.5})})]})]}),l&&t.actions&&/* @__PURE__ */p(k,{node:t.actions}),l&&t.copy&&/* @__PURE__ */p(g,{text:t.copy,label:A.copy(t.copy),copiedLabel:A.copied}),
|
|
15
15
|
/* @__PURE__ */u("span",{className:"mr-2 flex size-5 shrink-0 items-center justify-center "+(l?"":"@max-[6.5rem]:hidden @max-[6.5rem]:group-hover:flex"),children:[a&&/* @__PURE__ */p("span",{role:"img","aria-label":A.unsaved,className:"size-2 rounded-full bg-gray-500 group-hover:hidden"}),
|
|
16
|
-
/* @__PURE__ */p("button",{type:"button",tabIndex:-1,"aria-label":A.closeTab?.(t.title)??`${A.close} ${t.title}`,onClick:()=>N(t.key),className:"size-5 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 "+(a?"hidden group-hover:flex":l?"flex":"flex opacity-0 group-hover:opacity-100 focus-visible:opacity-100"),children:/* @__PURE__ */p(x,{})})]})]})]},t.key)}),I&&R<0&&I]}),z&&/* @__PURE__ */p("div",{className:"flex shrink-0 items-center gap-2 self-center",children:z}),
|
|
16
|
+
/* @__PURE__ */p("button",{type:"button",tabIndex:-1,"aria-label":A.closeTab?.(t.title)??`${A.close} ${t.title}`,onClick:()=>N(t.key),className:"size-5 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 "+(a?"hidden group-hover:flex":l?"flex":"flex opacity-0 group-hover:opacity-100 focus-visible:opacity-100"),children:/* @__PURE__ */p(x,{})})]})]})]},t.key)}),I&&R<0&&I]}),z&&/* @__PURE__ */p("div",{className:"flex shrink-0 items-center gap-2 self-center",children:z}),_&&J&&/* @__PURE__ */u(t,{portal:!0,style:{left:_.x,top:_.y},onClose:()=>E(null),children:[O.length>0&&/* @__PURE__ */u(h,{children:[O.map((e,n)=>/* @__PURE__ */u(r,{onClick:H(e.onSelect),children:[e.icon,e.label]},n)),
|
|
17
17
|
/* @__PURE__ */p(l,{})]}),
|
|
18
18
|
/* @__PURE__ */p(r,{disabled:J.pinned,onClick:H(()=>N(J.key)),children:A.close}),
|
|
19
19
|
/* @__PURE__ */p(l,{}),
|
|
20
|
-
/* @__PURE__ */p(r,{disabled:!
|
|
21
|
-
/* @__PURE__ */p(r,{disabled:!
|
|
22
|
-
/* @__PURE__ */p(r,{disabled:!
|
|
20
|
+
/* @__PURE__ */p(r,{disabled:!F(e.filter(e=>e.key!==J.key)),onClick:H(()=>w("others",J.key)),children:A.closeOthers}),
|
|
21
|
+
/* @__PURE__ */p(r,{disabled:!F(e.slice(Y+1)),onClick:H(()=>w("right",J.key)),children:A.closeRight}),
|
|
22
|
+
/* @__PURE__ */p(r,{disabled:!F(e),onClick:H(()=>w("all",null)),children:A.closeAll})]})]})}export{v as TabStrip};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useState as e,useCallback as t}from"react";function n(n,l=!0,s=n){const[i,r]=e(()=>/* @__PURE__ */new Set),[c,o]=e(null);if(l){if(i.size||null!==c){const e=new Set(s);i.size&&![...i].every(t=>e.has(t))&&r(new Set([...i].filter(t=>e.has(t)))),null===c||e.has(c)||o(null)}}else i.size&&r(/* @__PURE__ */new Set),null!==c&&o(null);const u=t((e,t={})=>{const l=n,s=null==c?-1:l.indexOf(c);if(t.shift&&s>=0){const n=l.indexOf(e);if(n<0)return;const[i,c]=s<=n?[s,n]:[n,s],o=l.slice(i,c+1);return void r(e=>t.ctrl?/* @__PURE__ */new Set([...e,...o]):new Set(o))}if(t.ctrl)return r(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),void o(e);r(/* @__PURE__ */new Set([e])),o(e)},[n,c]),S=t(()=>r(new Set(n)),[n]),w=t((e,t)=>r(n=>t?.additive?/* @__PURE__ */new Set([...n,...e]):new Set(e)),[]),d=t(()=>{r(/* @__PURE__ */new Set),o(null)},[]),f=t(e=>i.has(e),[i]);return{selected:i,size:i.size,isSelected:f,anchor:c,select:u,selectAll:S,setSelection:w,clear:d}}export{n as useGridSelection};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{InputNumber_default as e}from"./chunk-EO2XHSIK.js";import{useSettingAuto as t,useInSettingRow as i}from"./chunk-E4Z5OXBI.js";import{useShellStrings as n}from"./chunk-GTRUBA2R.js";import{createContext as r,useState as l,useMemo as a,useId as o,useRef as d,useContext as s,useEffect as u,useLayoutEffect as c}from"react";import{jsx as m,jsxs as f}from"react/jsx-runtime";var p=(e,t,i)=>Math.min(i,Math.max(t,e));function h(e){const t=String(e),i=/e-(\d+)$/.exec(t);return i?Number(i[1]):t.split(".")[1]?.length??0}var v=8,x=40;function b(e){return Math.max(1,...e.map(e=>(e??"").length))}var w="undefined"==typeof window?u:c;function y(e,t,i,n){return Number(p(e,t,i).toFixed(n))}var g=r(null);function S({children:e}){const[t,i]=l({}),n=a(()=>(e,t)=>i(i=>{if(null===t){if(!(e in i))return i;const t={...i};return delete t[e],t}return i[e]===t?i:{...i,[e]:t}}),[]),r=a(()=>{const e=Object.values(t);return{set:n,width:e.length?`max(${e.join(", ")})`:null}},[t,n]);/* @__PURE__ */
|
|
2
|
+
return m(g.Provider,{value:r,children:e})}function z({value:r,onChange:a,min:c,max:S,step:z=1,shiftStep:F,precision:$,inputMin:k,inputMax:N,suffix:j,showInput:K=!0,emptyLabel:L,placeholderValue:A,stepFrom:E,label:M,"aria-labelledby":R,valueText:C,id:B,disabled:D,size:I="md",className:O="",auto:T}){const U=n(),V=o(),W=t(),X=T??W,q=o(),G=B??V,H=$??h(z),P=k??c,Z=N??S,J=void 0!==L||void 0!==A,Q=E??A,Y=p(r??A??c,c,S),_=d(null),[ee,te]=l(null),ie=Boolean(j);w(()=>{const e=()=>{const e=_.current?.querySelector("input");if(!e)return;const t=getComputedStyle(e),i=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"].reduce((e,i)=>e+(parseFloat(t[i])||0),0);i<=0||te(e=>e&&e.frame===i&&e.fontSize===t.fontSize?e:{frame:i,fontSize:t.fontSize})};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[ie,K]);const ne=e=>C?C(e):"string"==typeof j?`${e.toFixed(H)} ${j}`:void 0,re=null==r?L??(null!=A?ne(A)??String(A):void 0):ne(r),le=`calc(${b([c.toFixed(H),S.toFixed(H),r?.toFixed(H),L,A?.toFixed(H)])}ch + ${(ee?.frame??10+(ie?x:v))+2}px)`,ae=s(g),oe=o(),de=ae?.set;w(()=>{de&&de(oe,K?le:null)},[de,oe,le,K]),u(()=>()=>de?.(oe,null),[de,oe]);const se=i();/* @__PURE__ */
|
|
3
|
+
return f("div",{"data-slider":"",className:`flex w-full min-w-0 items-center ${se?"flex-wrap gap-2":"gap-3"} ${O}`.trim(),children:[
|
|
4
|
+
/* @__PURE__ */m("input",{id:G,type:"range",min:c,max:S,step:z,value:Y,disabled:D,"aria-label":R?void 0:M,"aria-labelledby":R,"aria-valuetext":re,"aria-describedby":X?q:void 0,onKeyDown:e=>{const t="ArrowUp"===e.key||"ArrowRight"===e.key?1:"ArrowDown"===e.key||"ArrowLeft"===e.key?-1:0;if(!t||e.altKey||e.ctrlKey||e.metaKey)return;const i=e.shiftKey&&null!=F;if(!i&&!(null==r&&null!=Q))return;e.preventDefault();a(y((r??Q??Y)+t*(i?F??z:z),c,S,H))},onChange:e=>a(y(Number(e.target.value),c,S,H)),className:`min-w-24 flex-1 ${se?"basis-24":""} cursor-pointer accent-blue-600 disabled:cursor-not-allowed disabled:opacity-60 ${"sm"===I?"h-1":"h-1.5"}`}),K&&
|
|
5
|
+
/* @__PURE__ */m("div",{ref:_,"data-slider-box":"",className:se?"ml-auto shrink-0":"shrink-0 text-xs",style:se?void 0:{width:ae?.width??le,...ee?{fontSize:ee.fontSize}:{}},children:/* @__PURE__ */m(e,{value:r,onChange:e=>{null!=e?e<P||e>Z||a(e):J&&a(null)},min:P,max:Z,step:z,shiftStep:F,stepFrom:Q,precision:H,snap:!0,allowEmpty:J,suffix:j,disabled:D,placeholder:L??(null!=A?A.toFixed(H):void 0),size:se?void 0:"sm",auto:X,"aria-label":M?U.slider.value(M):void 0,"aria-labelledby":M?void 0:R})}),X&&/* @__PURE__ */m("span",{id:q,hidden:!0,children:U.settingView.auto})]})}export{z as Slider,S as SliderGroup,y as settleSliderValue,b as sliderBoxChars,h as stepDecimals};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{areaBetween as e,curvePath as i}from"./chunk-VFC6QUEN.js";import{ChartTooltip as l}from"./chunk-P5BOTIJU.js";import{CartesianPlot as t}from"./chunk-ZGCLFQS5.js";import{resolveSeriesColor as r,CHART_INK as a}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as n}from"./chunk-GTRUBA2R.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{jsx as s,jsxs as m,Fragment as c}from"react/jsx-runtime";function u({rows:u,labels:d,variant:p="area",curve:f="linear",height:k=220,width:g,max:b,min:x,formatValue:w,yAxisLabel:y,color:j,tone:L,label:v,className:M,emptyLabel:O,radius:A=3}){const C=o().charts,F=n(),N=w??(e=>h(e,F)),R=v??C.range,U=u.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),Q=r(0,j,L);/* @__PURE__ */
|
|
2
|
+
return s(t,{labels:d,values:U,height:k,width:g,max:b,min:x,formatValue:N,yAxisLabel:y,className:M,emptyLabel:O,bandPadding:"bar"===p?.34:0,ariaLabel:C.rangeLabel(R,d.length),tooltip:e=>/* @__PURE__ */s(l,{title:d[e],rows:[{key:"high",label:C.high,color:Q,value:null==u[e]?void 0:N(u[e].high)},{key:"low",label:C.low,color:Q,value:null==u[e]?void 0:N(u[e].low)}]}),children:({x:l,y:t,active:r})=>"bar"===p?/* @__PURE__ */s("g",{children:u.map((e,i)=>/* @__PURE__ */s("rect",{x:l(i),y:t(e.high),width:Math.max(1,l.bandwidth),height:Math.max(1,t(e.low)-t(e.high)),rx:A,fill:Q,fillOpacity:null===r||r===i?.85:.4},i))}):/* @__PURE__ */m("g",{children:[(()=>{const r=u.map((e,i)=>[l.center(i),t(e.high)]),a=u.map((e,i)=>[l.center(i),t(e.low)]);/* @__PURE__ */
|
|
3
|
+
return m(c,{children:[
|
|
4
|
+
/* @__PURE__ */s("path",{d:e(i(r,f),a),fill:Q,fillOpacity:.2,stroke:"none"}),
|
|
5
|
+
/* @__PURE__ */s("path",{d:i(r,f),fill:"none",stroke:Q,strokeWidth:2,strokeLinejoin:"round"}),
|
|
6
|
+
/* @__PURE__ */s("path",{d:i(a,f),fill:"none",stroke:Q,strokeWidth:2,strokeLinejoin:"round",strokeOpacity:.7})]})})(),null!==r&&/* @__PURE__ */s("line",{x1:l.center(r),y1:t(u[r].high),x2:l.center(r),y2:t(u[r].low),stroke:a.axis,strokeWidth:1})]})})}export{u as RangeChart};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{LoadingSpinner as e}from"./chunk-Q5MD3VY6.js";import{useBrowserLayoutEffect as n}from"./chunk-D65T4H6J.js";import{useShellStrings as t,useShellLocale as r}from"./chunk-
|
|
2
|
-
return u("div",{className:"group flex flex-col w-72 shrink-0 rounded-xl bg-gray-50 border transition-colors "+(t?"border-blue-400 ring-2 ring-blue-300/60":"border-gray-200"),onDragOver:e=>{e.preventDefault();try{e.dataTransfer.dropEffect="move"}catch{}},onDrop:n=>{n.preventDefault(),(e=>{if(
|
|
1
|
+
import{LoadingSpinner as e}from"./chunk-Q5MD3VY6.js";import{useBrowserLayoutEffect as n}from"./chunk-D65T4H6J.js";import{useShellStrings as t,useShellLocale as r}from"./chunk-GTRUBA2R.js";import{formatPlain as a}from"./chunk-C3QOHMR6.js";import{useState as o,useMemo as l,useRef as i,Fragment as s}from"react";import{jsx as d,Fragment as c,jsxs as u}from"react/jsx-runtime";function m({items:m,columns:f,columnOf:p,getId:g,onMove:h,renderCard:x,onCardClick:y,sortInColumn:b,isLoading:v=!1,loadingText:N,emptyState:w,showColumnsWhenEmpty:k=!1,columnEmptyText:C,onAddItem:D,addItemText:j}){const E=t().kanban,I=r(),T=N??E.loading,A=C??E.dropHere,M=j??E.addItem,[O,R]=o(null),[$,H]=o(null),S=l(()=>{const e={};for(const n of f)e[n.value]=[];for(const n of m)(e[p(n)]??=[]).push(n);if(b)for(const n of Object.keys(e))e[n].sort(b);return e},[m,f,p,b]),q=()=>{R(null),H(null)},z=i(null),B=i(/* @__PURE__ */new Map);n(()=>{if(null!==O)return;const e=z.current;if(!e)return;const n=/* @__PURE__ */new Map,t=[];if(e.querySelectorAll("[data-kanban-card]").forEach(e=>{const r=e.dataset.kanbanCard,a=e.getBoundingClientRect();n.set(r,a);const o=B.current.get(r);if(o){const n=o.left-a.left,r=o.top-a.top;(n||r)&&t.push([e,n,r])}}),B.current=n,t.length){for(const[e,n,r]of t)e.style.transition="none",e.style.transform=`translate(${n}px, ${r}px)`;requestAnimationFrame(()=>{for(const[e]of t)e.style.transition="transform 200ms cubic-bezier(0.2, 0, 0, 1)",e.style.transform="",e.addEventListener("transitionend",()=>{e.style.transition="",e.style.transform=""},{once:!0})})}},[S,O]);return v?/* @__PURE__ */d(e,{size:"sm",padding:"p-4",label:T}):0!==m.length||k?/* @__PURE__ */d("div",{ref:z,className:"flex-1 overflow-x-auto grid-scroll",children:/* @__PURE__ */d("div",{className:"flex gap-3 h-full min-w-max pb-2",children:f.map(e=>{const n=S[e.value]??[],t=null!==$&&$.col===e.value,r=null!==O?n.findIndex(e=>g(e)===O):-1,o=t&&(-1===r||$.index!==r&&$.index!==r+1)?$.index:-1;/* @__PURE__ */
|
|
2
|
+
return u("div",{className:"group flex flex-col w-72 shrink-0 rounded-xl bg-gray-50 border transition-colors "+(t?"border-blue-400 ring-2 ring-blue-300/60":"border-gray-200"),onDragOver:e=>{e.preventDefault();try{e.dataTransfer.dropEffect="move"}catch{}},onDrop:n=>{n.preventDefault(),(e=>{if(O&&$&&$.col===e){const n=(S[e]??[]).findIndex(e=>g(e)===O),t=-1!==n;if(!t||$.index!==n&&$.index!==n+1){const r=t&&$.index>n?$.index-1:$.index;h(O,e,r)}}q()})(e.value)},children:[
|
|
3
3
|
/* @__PURE__ */u("div",{className:`flex items-center justify-between px-3 py-2 rounded-t-xl text-sm font-medium ${e.accent??"text-gray-700 bg-gray-100"}`,children:[
|
|
4
4
|
/* @__PURE__ */u("span",{className:"flex items-center gap-2",children:[
|
|
5
5
|
/* @__PURE__ */d("span",{className:`h-2 w-2 rounded-full ${e.dot??"bg-gray-400"}`}),e.label]}),
|
|
6
6
|
/* @__PURE__ */d("span",{className:"text-xs opacity-70",children:a(n.length,I)})]}),
|
|
7
|
-
/* @__PURE__ */u("div",{className:"flex-1 overflow-y-auto p-2 space-y-2 min-h-[120px]",onDragEnter:()=>
|
|
7
|
+
/* @__PURE__ */u("div",{className:"flex-1 overflow-y-auto p-2 space-y-2 min-h-[120px]",onDragEnter:()=>H(t=>t&&t.col===e.value&&t.index===n.length?t:{col:e.value,index:n.length}),children:[n.map((t,r)=>{const a=g(t),l=a===O;/* @__PURE__ */
|
|
8
8
|
return u(s,{children:[o===r&&/* @__PURE__ */d("div",{className:"h-0.5 rounded-full bg-blue-500","aria-hidden":!0}),
|
|
9
|
-
/* @__PURE__ */d("div",{"data-kanban-card":a,draggable:!0,onDragStart:e=>{
|
|
10
|
-
/* @__PURE__ */d("span",{"aria-hidden":!0,className:"text-sm leading-none",children:"+"}),
|
|
9
|
+
/* @__PURE__ */d("div",{"data-kanban-card":a,draggable:!0,onDragStart:e=>{R(a);try{e.dataTransfer.effectAllowed="move"}catch{}},onDragEnter:t=>{t.stopPropagation();const a=null!==O?n.findIndex(e=>g(e)===O):-1,o=-1!==a&&a<r?r+1:r;H(n=>n&&n.col===e.value&&n.index===o?n:{col:e.value,index:o})},onDragEnd:q,onClick:y?()=>y(t):void 0,style:null===O?void 0:{opacity:l?.4:1,transition:"opacity 120ms ease"},className:"rounded-lg bg-white border border-gray-200 p-3 shadow-sm hover:border-blue-400 hover:shadow transition "+(y?"cursor-pointer":""),children:x(t)})]},a)}),n.length>0&&o===n.length&&/* @__PURE__ */d("div",{className:"h-0.5 rounded-full bg-blue-500","aria-hidden":!0}),0===n.length&&/* @__PURE__ */d("div",{className:"text-2xs text-center rounded-lg transition-all duration-150 "+(t?"border-2 border-dashed border-blue-300 bg-blue-50/50 text-blue-400 py-8":"text-gray-400 py-6"),children:A})]}),D&&/* @__PURE__ */d("div",{className:"p-2 pt-0",children:/* @__PURE__ */u("button",{type:"button",onClick:()=>D(e.value),className:"flex w-full items-center justify-center gap-1 rounded-lg px-2 min-h-8 py-1 text-xs font-medium text-gray-500 opacity-0 transition hover:bg-gray-100 hover:text-gray-700 focus-visible:opacity-100 group-hover:opacity-100",children:[
|
|
10
|
+
/* @__PURE__ */d("span",{"aria-hidden":!0,className:"text-sm leading-none",children:"+"}),M]})})]},e.value)})})}):/* @__PURE__ */d(c,{children:w??/* @__PURE__ */d("div",{className:"text-sm text-gray-500 p-4",children:E.empty})})}export{m as Kanban};
|