efficient-shell 8.21.0 → 8.22.0
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 +35 -11
- package/dist/{Browser-WJ7YGO3M.js → Browser-VZU2MTSA.js} +14 -14
- package/dist/Calculator-DKZHOHOD.js +29 -0
- package/dist/{CurrencyConverter-ONCRQNI4.js → CurrencyConverter-BSQCX3HS.js} +9 -9
- package/dist/{Documents-YEMIR4WQ.js → Documents-NR3T434J.js} +17 -17
- package/dist/{Files-QWSOYRD4.js → Files-QMV2E74S.js} +16 -16
- package/dist/{Notepad-MFVUGAGD.js → Notepad-M5MCY5DV.js} +10 -10
- package/dist/{PdfViewer-ZFZ4PEAV.js → PdfViewer-OODU3XIT.js} +1 -1
- package/dist/{PomodoroTimer-JVQ5K7B4.js → PomodoroTimer-I423ZZOQ.js} +58 -58
- package/dist/{Preview-7G2WM7DN.js → Preview-QTDCPMCL.js} +26 -26
- package/dist/Sidebar-UVBEI4DQ.js +43 -0
- package/dist/{Spreadsheet-VKOS3PUA.js → Spreadsheet-V2EWOJML.js} +13 -13
- package/dist/{Stock-TWJNCTNT.js → Stock-U3G45T36.js} +2 -2
- package/dist/{Weather-RM7GPLAH.js → Weather-GEC4VHLM.js} +15 -15
- package/dist/{WorldClock-ITJ2MO75.js → WorldClock-6ORV4NHF.js} +5 -5
- package/dist/ai/index.js +14 -14
- 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/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-255BENW2.js +7 -0
- package/dist/{chunk-ZBLNVAZ4.js → chunk-2IV4XF3Y.js} +2 -2
- package/dist/{chunk-MHYOQMBV.js → chunk-2JYQF3PJ.js} +1 -1
- package/dist/{chunk-3Z7LIHMB.js → chunk-2RJKMYON.js} +1 -1
- package/dist/{chunk-6V753BUI.js → chunk-2TBC254V.js} +3 -3
- package/dist/{chunk-5Z2WLSFM.js → chunk-352MVBF7.js} +20 -20
- package/dist/{chunk-CFLVEKSH.js → chunk-35VA5UFB.js} +1 -1
- package/dist/{chunk-IJA5ZAGL.js → chunk-3APQ5V6P.js} +1 -1
- package/dist/{chunk-D5HHU5AO.js → chunk-3UL7IB25.js} +7 -7
- package/dist/{chunk-N7VNKAXZ.js → chunk-46M6AYFJ.js} +1 -1
- package/dist/{chunk-AH2AUQYM.js → chunk-4ELYV3L6.js} +1 -1
- package/dist/{chunk-YGEK2Z6P.js → chunk-52L6IBTN.js} +1 -1
- package/dist/{chunk-B55IXYDR.js → chunk-53ROHXAV.js} +2 -2
- package/dist/{chunk-4VK3GJZI.js → chunk-56C5SEZ7.js} +1 -1
- package/dist/{chunk-U5I7IF72.js → chunk-5B73MLXV.js} +1 -1
- package/dist/{chunk-7M7ESM5V.js → chunk-5BBDUKQP.js} +12 -12
- package/dist/{chunk-MWAYM46R.js → chunk-5EK4DFB5.js} +11 -11
- package/dist/{chunk-JYOI66DT.js → chunk-5LNFW5E4.js} +1 -1
- package/dist/{chunk-AJ42UE53.js → chunk-5OGWWBJY.js} +1 -1
- package/dist/{chunk-4CWKK5HV.js → chunk-6AJM3QNG.js} +4 -4
- package/dist/{chunk-2BS74SYW.js → chunk-6DT7HG3F.js} +1 -1
- package/dist/chunk-6JCIQ7XL.js +8 -0
- package/dist/{chunk-7S2I6ACG.js → chunk-6PWLY2LQ.js} +1 -1
- package/dist/{chunk-4XOTP5CB.js → chunk-6UBBY54N.js} +2 -2
- package/dist/{chunk-MFEJ6TYE.js → chunk-74HUZZPT.js} +1 -1
- package/dist/{chunk-735HKUTV.js → chunk-74QAQXSB.js} +1 -1
- package/dist/{chunk-DO6XTJ77.js → chunk-7AINUMUA.js} +1 -1
- package/dist/{chunk-UY47AKZU.js → chunk-ALYBCDHU.js} +5 -5
- package/dist/{chunk-M5BFTFBK.js → chunk-AXQBQH55.js} +15 -15
- package/dist/{chunk-ZDK2JYH5.js → chunk-B73YLHD2.js} +54 -54
- package/dist/{chunk-VY7EPQEG.js → chunk-BBYHBN3R.js} +1 -1
- package/dist/{chunk-DLCIGDKC.js → chunk-BJEBOXTR.js} +3 -3
- package/dist/{chunk-HVVPBAP5.js → chunk-BJKZYQFA.js} +3 -3
- package/dist/{chunk-HYFHCPNJ.js → chunk-BUWOFJGM.js} +8 -8
- package/dist/{chunk-AXZEINMF.js → chunk-C3ZZDCBU.js} +18 -18
- package/dist/chunk-CGUMJZUB.js +2 -0
- package/dist/{chunk-OTU633XJ.js → chunk-CJKDYVNE.js} +6 -6
- package/dist/chunk-CPM3BQGV.js +14 -0
- package/dist/{chunk-HJIBTA6V.js → chunk-CQZEO4UV.js} +9 -9
- package/dist/{chunk-EL3O7ZFQ.js → chunk-CREVU3AF.js} +1 -1
- package/dist/{chunk-P7WUDHIP.js → chunk-D3BDPSVV.js} +6 -6
- package/dist/{chunk-B4XPFCCQ.js → chunk-D7AA5WE2.js} +2 -2
- package/dist/{chunk-OCCHDMEV.js → chunk-DIW6WT5L.js} +1 -1
- package/dist/chunk-DIZW2GZP.js +3 -0
- package/dist/{chunk-L6FLPBU2.js → chunk-DQB3ORB7.js} +5 -5
- package/dist/chunk-DSYIKLOK.js +11 -0
- package/dist/chunk-EUOFKZI3.js +19 -0
- package/dist/{chunk-L65EQCZN.js → chunk-F3AROMIU.js} +6 -6
- package/dist/{chunk-WRJDHFLD.js → chunk-F6YIUCIJ.js} +4 -4
- package/dist/{chunk-TT3S2XVQ.js → chunk-F6YMKW5G.js} +1 -1
- package/dist/{chunk-3PQHPFXP.js → chunk-FDENTKSM.js} +5 -5
- package/dist/{chunk-KZEQJVBO.js → chunk-FLQIF7HC.js} +3 -3
- package/dist/{chunk-BIS5PHHV.js → chunk-FW2EEIDB.js} +2 -2
- package/dist/{chunk-XWH6KVVB.js → chunk-GKTCCPME.js} +1 -1
- package/dist/{chunk-Y5ZWPU4L.js → chunk-GTKNEJ3X.js} +7 -7
- package/dist/{chunk-IKNNHEVY.js → chunk-GVNDUNQL.js} +1 -1
- package/dist/{chunk-IY3CRZRH.js → chunk-HLZZ5Q5E.js} +20 -20
- package/dist/{chunk-VOHZQVFK.js → chunk-I2FHDMIN.js} +6 -6
- package/dist/{chunk-NKJDOQVW.js → chunk-IJICE6KT.js} +1 -1
- package/dist/{chunk-6GVJ6IKD.js → chunk-IMDLBXO3.js} +1 -1
- package/dist/{chunk-IMF537IJ.js → chunk-IOESXYEI.js} +9 -9
- package/dist/{chunk-55WFJELE.js → chunk-IUBWN3OA.js} +1 -1
- package/dist/{chunk-PG6AVBSR.js → chunk-JACPHDTK.js} +1 -1
- package/dist/chunk-JGZLLQAN.js +8 -0
- package/dist/{chunk-DIKOEJ2Y.js → chunk-JLPTSC66.js} +1 -1
- package/dist/{chunk-LMLM4KHQ.js → chunk-JXGYIV44.js} +8 -8
- package/dist/{chunk-ECZT7SIE.js → chunk-KBLMTCTD.js} +1 -1
- package/dist/{chunk-IPOSLLLU.js → chunk-KFSNSDTW.js} +9 -9
- package/dist/{chunk-PTDLNTSK.js → chunk-L2JOLPJR.js} +1 -1
- package/dist/{chunk-ACZZXO5S.js → chunk-LQHWFL5Y.js} +2 -2
- package/dist/{chunk-F2Z6IXMM.js → chunk-LVAGFIWK.js} +2 -2
- package/dist/{chunk-VX4BNYH3.js → chunk-MIZO6SQ3.js} +2 -2
- package/dist/{chunk-OZF4QAJT.js → chunk-MRLQH2GZ.js} +3 -3
- package/dist/{chunk-MKITHLDU.js → chunk-MWNZY33B.js} +9 -9
- package/dist/{chunk-MOOBUMON.js → chunk-NE42BDQX.js} +5 -5
- package/dist/chunk-NHFLTKPK.js +11 -0
- package/dist/{chunk-LDFRVV5R.js → chunk-NYLXA2EG.js} +7 -7
- package/dist/{chunk-H7ZXUGXX.js → chunk-O3NLPJH2.js} +16 -16
- package/dist/chunk-O5KDTFK5.js +8 -0
- package/dist/{chunk-PJCVNFWM.js → chunk-O6JX6RDX.js} +7 -7
- package/dist/{chunk-L2YW3END.js → chunk-ONEF47LG.js} +3 -3
- package/dist/{chunk-CU2B7G5A.js → chunk-OPFCLDVM.js} +1 -1
- package/dist/chunk-PFB2NSSS.js +14 -0
- package/dist/{chunk-NDTMQRR2.js → chunk-PHYI7M45.js} +1 -1
- package/dist/chunk-PMOGQHYX.js +20 -0
- package/dist/{chunk-THDSOVEH.js → chunk-POMS7YQN.js} +2 -2
- package/dist/{chunk-MTSZ66O4.js → chunk-PZFETJAG.js} +1 -1
- package/dist/{chunk-NBVF2CXM.js → chunk-Q6A6W3DI.js} +1 -1
- package/dist/chunk-QLAQ6ASB.js +5 -0
- package/dist/{chunk-EDQBTPDF.js → chunk-QSN7X27F.js} +5 -5
- package/dist/{chunk-OSVN2UF7.js → chunk-QUS3C264.js} +1 -1
- package/dist/{chunk-IGCXJHAK.js → chunk-QZRH7L2E.js} +1 -1
- package/dist/{chunk-DMLJOBQS.js → chunk-R4JU7MU2.js} +6 -6
- package/dist/{chunk-MEOICYR5.js → chunk-R5FFVK2W.js} +1 -1
- package/dist/{chunk-YVBFFE4Z.js → chunk-RIGW3E5M.js} +4 -4
- package/dist/chunk-RPK3U2K2.js +9 -0
- package/dist/chunk-RPTQCFLR.js +29 -0
- package/dist/{chunk-K4DZWCUP.js → chunk-SDORX5C2.js} +5 -5
- package/dist/{chunk-NRDO5IHL.js → chunk-SFWIYB4T.js} +1 -1
- package/dist/{chunk-IURSUMDO.js → chunk-SH6ZLK4K.js} +3 -3
- package/dist/{chunk-ERFM5U3M.js → chunk-SLORZA7W.js} +10 -10
- package/dist/{chunk-YSHS6QIY.js → chunk-SO4WAMVA.js} +5 -5
- package/dist/{chunk-EAEUSMYL.js → chunk-SRMRRJ5K.js} +1 -1
- package/dist/{chunk-RAQESAQZ.js → chunk-SSOLRTVS.js} +1 -1
- package/dist/{chunk-A4U4BTN3.js → chunk-TCN7XUCY.js} +4 -4
- package/dist/{chunk-24L7NLA3.js → chunk-TJPPV7KZ.js} +1 -1
- package/dist/{chunk-OSSFYFXO.js → chunk-TSOBVLV5.js} +1 -1
- package/dist/{chunk-XVJCVYDI.js → chunk-TYZ4IY7F.js} +2 -2
- package/dist/{chunk-QEVIQZIE.js → chunk-U4QZIU7X.js} +2 -2
- package/dist/chunk-URFWJZTV.js +7 -0
- package/dist/{chunk-PWOFYFMO.js → chunk-V23TPYHO.js} +5 -5
- package/dist/{chunk-BXM72C73.js → chunk-V4WNEJ63.js} +1 -1
- package/dist/chunk-VKMEQKYT.js +1 -0
- package/dist/{chunk-NNKMEF3D.js → chunk-VNYFGNHO.js} +1 -1
- package/dist/{chunk-36MUTG34.js → chunk-VWMTQLVS.js} +1 -1
- package/dist/{chunk-ZKOIGLRF.js → chunk-W7NZKU27.js} +6 -6
- package/dist/{chunk-EXMFUK3A.js → chunk-W7ZAFS7C.js} +8 -8
- package/dist/{chunk-YTGWIMXB.js → chunk-WBU7NZBP.js} +1 -1
- package/dist/{chunk-RZBHO74V.js → chunk-WQKGBPOQ.js} +1 -1
- package/dist/{chunk-AX7KPMDV.js → chunk-WSODT2L5.js} +2 -2
- package/dist/{chunk-LVSPLCGG.js → chunk-WXIEWJF7.js} +1 -1
- package/dist/{chunk-RCRI6QZV.js → chunk-X2U5XB7J.js} +1 -1
- package/dist/{chunk-PVSGQN5M.js → chunk-X7JK22X2.js} +6 -6
- package/dist/{chunk-LQQMELJM.js → chunk-XCHY6QVH.js} +7 -7
- package/dist/{chunk-CUT7PAXL.js → chunk-XFBXKKOB.js} +1 -1
- package/dist/{chunk-CMYLTCPA.js → chunk-XFIMTNUH.js} +1 -1
- package/dist/{chunk-WJEDIAG4.js → chunk-XUQQCKKD.js} +1 -1
- package/dist/{chunk-3HNK7IRJ.js → chunk-YF7A3BWA.js} +3 -3
- package/dist/chunk-YPXVOPL4.js +1 -0
- package/dist/{chunk-VHAM5TD2.js → chunk-Z4UKLPGE.js} +1 -1
- package/dist/{chunk-TW6WEYGO.js → chunk-Z5TCGLCM.js} +6 -6
- package/dist/{chunk-NSCLFAKK.js → chunk-ZI7P5YGF.js} +1 -1
- package/dist/{chunk-UFVQ7ZBP.js → chunk-ZLGU4VYO.js} +5 -5
- package/dist/{chunk-RAI3GTS6.js → chunk-ZMLRNHMS.js} +1 -1
- package/dist/{chunk-RDPUVCXR.js → chunk-ZVTOB4RE.js} +1 -1
- package/dist/{chunk-OZPYTSPD.js → chunk-ZY62UQI2.js} +15 -15
- 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/format/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/MediaLibrary.d.ts +11 -0
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.js +1 -1
- 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/mediaLibraryMenu.d.ts +5 -1
- package/dist/forms/mediaLibraryMenu.js +1 -1
- package/dist/forms/mediaMoveItems.js +1 -1
- package/dist/forms/useFileIntake.js +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +393 -393
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +5 -5
- 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.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.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.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.js +1 -1
- 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.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/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 +9 -1
- package/dist/shell/ZoomableImage.js +1 -1
- package/dist/shell/language.js +1 -1
- package/dist/shell/strings.d.ts +4 -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 +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +5 -1
- package/dist/Calculator-FHN36ZE3.js +0 -29
- package/dist/Sidebar-OFRMBB5V.js +0 -43
- package/dist/chunk-2H6PDKTC.js +0 -8
- package/dist/chunk-4PZN25MV.js +0 -20
- package/dist/chunk-73DAZUJP.js +0 -14
- package/dist/chunk-DLS2VCBK.js +0 -3
- package/dist/chunk-DNKACLRF.js +0 -11
- package/dist/chunk-DZT2O3JD.js +0 -11
- package/dist/chunk-EKWSGPJ4.js +0 -8
- package/dist/chunk-ETSKG62F.js +0 -1
- package/dist/chunk-FPDKMCQH.js +0 -8
- package/dist/chunk-JGE7S7RQ.js +0 -29
- package/dist/chunk-KPFOXLN4.js +0 -5
- package/dist/chunk-L2HZ7YXS.js +0 -14
- package/dist/chunk-OF6TUQAL.js +0 -7
- package/dist/chunk-U5KIRPLV.js +0 -2
- package/dist/chunk-VT62T6B3.js +0 -19
- package/dist/chunk-WBEMN4JG.js +0 -9
- package/dist/chunk-WDXJWC3Y.js +0 -7
- package/dist/chunk-X4EBWJWO.js +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{warnOnce as a,resolveSeverity as e,styleForTone as l,severityOf as t,boundOf as n}from"./chunk-TZFNWAED.js";import{TICK_INK as r}from"./chunk-URBCGEXG.js";import{useShellStrings as i,useShellLocale as s}from"./chunk-
|
|
2
|
-
return o("div",{title:e,className:`absolute -top-[3px] h-3 w-0.5 rounded-[1px] ${l}`,style:{left:`${a}%`}})}var x=a=>Math.min(100,Math.max(0,a));function h({label:h,value:p,max:g=100,warn:b,crit:f,severity:v,detail:N,formatValue:y,emptyLabel:w,size:$="sm",ariaLabel:k,className:M=""}){const j=i().meter,B=s(),
|
|
3
|
-
/* @__PURE__ */o("div",{className:`absolute inset-y-0 left-0 rounded-full ${
|
|
1
|
+
import{warnOnce as a,resolveSeverity as e,styleForTone as l,severityOf as t,boundOf as n}from"./chunk-TZFNWAED.js";import{TICK_INK as r}from"./chunk-URBCGEXG.js";import{useShellStrings as i,useShellLocale as s}from"./chunk-VKMEQKYT.js";import{formatPercent as u,formatPlain as m}from"./chunk-C3QOHMR6.js";import{jsxs as c,jsx as o}from"react/jsx-runtime";function d({at:a,title:e,className:l}){/* @__PURE__ */
|
|
2
|
+
return o("div",{title:e,className:`absolute -top-[3px] h-3 w-0.5 rounded-[1px] ${l}`,style:{left:`${a}%`}})}var x=a=>Math.min(100,Math.max(0,a));function h({label:h,value:p,max:g=100,warn:b,crit:f,severity:v,detail:N,formatValue:y,emptyLabel:w,size:$="sm",ariaLabel:k,className:M=""}){const j=i().meter,B=s(),A=w??j.noData,E=null!=p&&Number.isFinite(p)?p:null,F=Number.isFinite(g)&&g>0?g:null;null==F&&a(`MetricBar:max:${String(g)}`,`[efficient-shell] MetricBar: max=${String(g)} is not a positive finite number, so there is no scale to draw a proportional bar against. Printing the value without a bar. Pass the real capacity, or leave the reading out entirely (value={null}) when it is unknown — do not pass 0.`);const C=e(v,"MetricBar"),D=null!=E?C??l(t(E,b,f)):null,G=n(b),K=n(f),L=null!=E&&null!=F?x(E/F*100):0,P=null!=E?(y??(a=>100===F?u(a,1,B):m(a,B)))(E):"—",Q=null!=E&&null!=F&&(null!=G||null!=K),R="md"===$||"lg"===$,S=R?"h-2":"h-1.5",T=null!=E&&null!=F,V=/* @__PURE__ */c("div",{...T?{role:"meter","aria-label":k??("string"==typeof h?h:void 0),"aria-valuemin":0,"aria-valuemax":F,"aria-valuenow":Math.min(F,Math.max(0,E)),"aria-valuetext":P}:{"aria-hidden":!0},className:T&&D?`relative mt-2 ${S} rounded-full bg-gray-200`:`relative mt-2 ${S} rounded-full border border-dashed border-gray-300 bg-transparent`,children:[T&&
|
|
3
|
+
/* @__PURE__ */o("div",{className:`absolute inset-y-0 left-0 rounded-full ${D?D.fill:"bg-gray-400"}`,style:{width:`${L}%`}}),Q&&null!=F&&null!=G&&/* @__PURE__ */o(d,{at:x(G/F*100),title:j.warningAt(G),className:r.warning}),Q&&null!=F&&null!=K&&/* @__PURE__ */o(d,{at:x(K/F*100),title:j.criticalAt(K),className:r.critical})]}),z=D?D.ink:null!=E?"text-gray-900":"text-gray-400";if(R){const a="lg"===$;/* @__PURE__ */
|
|
4
4
|
return c("div",{className:M,children:[null!=h&&/* @__PURE__ */o("div",{className:(a?"text-xs":"text-3xs")+" font-medium uppercase tracking-wide text-gray-500",children:h}),
|
|
5
5
|
/* @__PURE__ */c("div",{className:"mt-1 flex items-baseline gap-2",children:[
|
|
6
|
-
/* @__PURE__ */o("span",{className:`text-2xl font-semibold leading-[30px] tabular-nums ${
|
|
7
|
-
/* @__PURE__ */o("span",{className:"min-w-0 truncate tabular-nums "+(a?"text-xs text-gray-500":"text-2xs text-gray-400"),children:null!=
|
|
6
|
+
/* @__PURE__ */o("span",{className:`text-2xl font-semibold leading-[30px] tabular-nums ${z}`,children:P}),
|
|
7
|
+
/* @__PURE__ */o("span",{className:"min-w-0 truncate tabular-nums "+(a?"text-xs text-gray-500":"text-2xs text-gray-400"),children:null!=E?N:A})]}),V]})}/* @__PURE__ */
|
|
8
8
|
return c("div",{className:M,children:[
|
|
9
9
|
/* @__PURE__ */c("div",{className:"flex items-baseline gap-2",children:[null!=h&&/* @__PURE__ */o("span",{className:"w-14 shrink-0 truncate text-3xs font-medium uppercase tracking-wide text-gray-500",children:h}),
|
|
10
|
-
/* @__PURE__ */o("span",{className:`text-sm font-semibold tabular-nums ${
|
|
11
|
-
/* @__PURE__ */o("span",{className:"ml-auto min-w-0 truncate text-2xs tabular-nums text-gray-400",children:null!=
|
|
10
|
+
/* @__PURE__ */o("span",{className:`text-sm font-semibold tabular-nums ${z}`,children:P}),
|
|
11
|
+
/* @__PURE__ */o("span",{className:"ml-auto min-w-0 truncate text-2xs tabular-nums text-gray-400",children:null!=E?N:A})]}),V]})}export{h as MetricBar};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Card as e}from"./chunk-
|
|
1
|
+
import{Card as e}from"./chunk-V23TPYHO.js";import{Select_default as a}from"./chunk-PMOGQHYX.js";import{Input_default as r}from"./chunk-UNEJ2ABD.js";import{Pagination as t}from"./chunk-WBU7NZBP.js";import{StatusBadgeProvider as i,StatusBadge as s}from"./chunk-D323R2FT.js";import{TH_ONE_LINE as l}from"./chunk-6KO5VTL7.js";import{Button_default as c}from"./chunk-4IU5BSVE.js";import{Icon as m}from"./chunk-KIBL6M3T.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,4 +1,4 @@
|
|
|
1
|
-
import{isSafeLinkHref as e}from"./chunk-PJPK2ADX.js";import{Icon as r}from"./chunk-KIBL6M3T.js";import{useShellStrings as t}from"./chunk-
|
|
1
|
+
import{isSafeLinkHref as e}from"./chunk-PJPK2ADX.js";import{Icon as r}from"./chunk-KIBL6M3T.js";import{useShellStrings as t}from"./chunk-VKMEQKYT.js";import{jsx as n,jsxs as s}from"react/jsx-runtime";var a=/!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]+)\]\(([^)]+)\)|\*\*([^*]+)\*\*|`([^`]+)`|\*([^*]+)\*/g,l=r=>e(r.trim());function c(e){const r=[];let t,c=0,o=0;for(a.lastIndex=0;null!==(t=a.exec(e));)t.index>c&&r.push(e.slice(c,t.index)),void 0!==t[1]?r.push(
|
|
2
2
|
/* @__PURE__ */s("span",{className:"text-gray-400",children:["[",t[1],"]"]},o++)):void 0!==t[3]?r.push(
|
|
3
3
|
/* @__PURE__ */n("a",{href:l(t[4])?t[4]:void 0,target:"_blank",rel:"noreferrer",className:"text-blue-600 hover:underline",children:t[3]},o++)):void 0!==t[5]?r.push(
|
|
4
4
|
/* @__PURE__ */n("strong",{className:"font-semibold text-gray-900",children:t[5]},o++)):void 0!==t[6]?r.push(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useShellLocale as e}from"./chunk-
|
|
1
|
+
import{useShellLocale as e}from"./chunk-VKMEQKYT.js";import{formatPlain as t}from"./chunk-C3QOHMR6.js";import{jsx as r,jsxs as n}from"react/jsx-runtime";var i={danger:"bg-red-600 text-white",neutral:"bg-gray-600 text-white",accent:"bg-blue-600 text-white"};function a({count:a=0,max:l=99,dot:s=!1,tone:o="danger",showZero:c=!1,children:m,className:u=""}){const h=s||a>0||0===a&&c,d=e(),x=a>l?`${t(l,d)}+`:t(a,d),f=m?"":u,g=h?/* @__PURE__ */r("span",s?{className:`block h-2.5 w-2.5 rounded-full ring-2 ring-white ${i[o]} ${f}`.trim(),"aria-hidden":m?"true":void 0}:{className:`flex h-5 min-w-[1.25rem] items-center justify-center whitespace-nowrap rounded-full px-1 text-xs font-semibold tabular-nums ring-2 ring-white ${i[o]} ${f}`.trim(),children:x}):null;return m?/* @__PURE__ */n("span",{className:`relative inline-flex ${u}`.trim(),children:[m,g&&/* @__PURE__ */r("span",{className:"absolute -right-1.5 -top-1.5 flex",children:g})]}):g}export{a as CountBadge};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{PopupMenuDivider as e,PopupMenuLabel as l,menuTextRowStyle as t,PopupSubmenu as i,itemLook as a,MenuCheckMark as r}from"./chunk-
|
|
1
|
+
import{PopupMenuDivider as e,PopupMenuLabel as l,menuTextRowStyle as t,PopupSubmenu as i,itemLook as a,MenuCheckMark as r}from"./chunk-O6JX6RDX.js";import{jsx as n,jsxs as s}from"react/jsx-runtime";var d=e=>!!e&&"label"!==e.type&&"status"!==e.type&&"divider"!==e.type&&!e.disabled,c=(e,l)=>`${e}-status-${l}`;function o(e,l){return e.flatMap((e,t)=>"status"===e.type?[c(l,t)]:[]).join(" ")||void 0}function u(d,o){const{menuId:y,choose:b,toggle:h,followLink:p,rowProps:m=()=>({}),linkAs:k}=o,f=k??"a",v=(d,k)=>{if("divider"===d.type)/* @__PURE__ */
|
|
2
2
|
return n("div",{role:"separator",children:/* @__PURE__ */n(e,{})},d.key);if("label"===d.type)/* @__PURE__ */
|
|
3
3
|
return n("div",{id:`${y}-label-${k}`,children:/* @__PURE__ */n(l,{children:d.label})},d.key);if("status"===d.type)/* @__PURE__ */
|
|
4
4
|
return n("div",{id:c(y,k),className:"text-xs",style:t(),children:d.label},d.key);if("submenu"===d.type)/* @__PURE__ */
|
|
@@ -7,4 +7,4 @@ return s("button",{type:"button",role:"menuitemcheckbox","aria-checked":d.checke
|
|
|
7
7
|
/* @__PURE__ */n(r,{kind:"checkbox",checked:d.checked}),d.icon,d.label]},d.key)}if("radio"===d.type){const e=a(!1,d.disabled,"");/* @__PURE__ */
|
|
8
8
|
return s("button",{type:"button",role:"menuitemradio","aria-checked":d.checked,disabled:d.disabled,className:e.className,style:e.style,onClick:()=>b(d),...m(k,d),children:[
|
|
9
9
|
/* @__PURE__ */n(r,{kind:"radio",checked:d.checked}),d.icon,d.label]},d.key)}if((e=>"link"===e.type||void 0===e.type&&"string"==typeof e.href)(d)){const e=a(!1,d.disabled,"no-underline "+(d.current?"font-medium":""));return d.disabled?/* @__PURE__ */s("a",{role:"menuitem","aria-disabled":"true",className:e.className,style:e.style,...m(k,d),children:[d.icon,d.label]},d.key):/* @__PURE__ */s(f,{href:d.href,role:"menuitem","aria-current":d.current?"page":void 0,className:e.className,style:e.style,onClick:p,...m(k,d),children:[d.icon,d.label]},d.key)}const v=a(d.danger,d.disabled,"");/* @__PURE__ */
|
|
10
|
-
return s("button",{type:"button",role:"menuitem",disabled:d.disabled,className:v.className,style:v.style,onClick:()=>b(d),...m(k,d),children:[d.icon,d.label]},d.key)},
|
|
10
|
+
return s("button",{type:"button",role:"menuitem",disabled:d.disabled,className:v.className,style:v.style,onClick:()=>b(d),...m(k,d),children:[d.icon,d.label]},d.key)},g=[];for(let e=0;e<d.length;){const l=d[e];if("radio"!==l.type&&"checkbox"!==l.type){g.push(v(l,e)),e+=1;continue}const t=l.type,i=e,a=[];for(;e<d.length&&d[e].type===t;)a.push(v(d[e],e)),e+=1;const r="label"===d[i-1]?.type?`${y}-label-${i-1}`:void 0;g.push(/* @__PURE__ */n("div",{role:"group","aria-labelledby":r,children:a},`group:${l.key}`))}return g}export{d as isFocusableEntry,o as menuStatusIds,u as renderMenuEntries};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{SidebarLayout as e}from"./chunk-
|
|
1
|
+
import{SidebarLayout as e}from"./chunk-CJKDYVNE.js";import{Avatar as r}from"./chunk-7AINUMUA.js";import{Button_default as t}from"./chunk-4IU5BSVE.js";import{useState as a}from"react";import{jsx as i,jsxs as l}from"react/jsx-runtime";var s=[{id:"inbox",label:"Inbox",count:12},{id:"starred",label:"Starred",count:3},{id:"sent",label:"Sent"},{id:"drafts",label:"Drafts",count:1},{id:"archive",label:"Archive"},{id:"trash",label:"Trash"}],n=[{id:1,from:"Marco Reyes",subject:"Q3 roadmap review",preview:"Sharing the deck ahead of Thursday — let me know what you think before the review.",time:"9:14",unread:!0},{id:2,from:"Priya Patel",subject:"Design handoff",preview:"The Figma file is ready for engineering. I exported every icon at 1x and 2x.",time:"8:02",unread:!0},{id:3,from:"GitHub",subject:"[acme/web] PR #482 merged",preview:"Your pull request was merged into main by the release bot after all checks passed.",time:"Yest"},{id:4,from:"Sara Lind",subject:"Lunch Friday?",preview:"A few of us are heading to the new place on 5th at noon if you want to join.",time:"Yest"}];function d(){const[d,c]=a(1),o=n.find(e=>e.id===d)??n[0];/* @__PURE__ */
|
|
2
2
|
return i("div",{className:"h-full",children:/* @__PURE__ */i(e,{side:"left",defaultWidth:200,sidebar:/* @__PURE__ */l("div",{className:"flex h-full flex-col p-2",children:[
|
|
3
3
|
/* @__PURE__ */i(t,{block:!0,className:"mb-2",children:"Compose"}),s.map((e,r)=>/* @__PURE__ */l("button",{className:"flex items-center justify-between rounded-md px-3 py-2 text-left text-sm "+(0===r?"bg-blue-50 font-medium text-blue-700":"text-gray-700 hover:bg-gray-100"),children:[
|
|
4
4
|
/* @__PURE__ */i("span",{children:e.label}),null!=e.count&&/* @__PURE__ */i("span",{className:"text-xs text-gray-400",children:e.count})]},e.id))]}),children:/* @__PURE__ */l("div",{className:"flex h-full",children:[
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{appendKey as r,backspace as a}from"./chunk-VEPVOHCV.js";import{Button_default as e}from"./chunk-4IU5BSVE.js";import{useShellStrings as n}from"./chunk-
|
|
1
|
+
import{appendKey as r,backspace as a}from"./chunk-VEPVOHCV.js";import{Button_default as e}from"./chunk-4IU5BSVE.js";import{useShellStrings as n}from"./chunk-VKMEQKYT.js";import{jsxs as i,jsx as c}from"react/jsx-runtime";var o=["1","2","3","4","5","6","7","8","9",".","0"];function l({value:l,onChange:s,onEnter:t,enterLabel:m,enterDisabled:d,className:h=""}){const p=n().keypad,u=r=>{r!==l&&s(r)};/* @__PURE__ */
|
|
2
2
|
return i("div",{className:`grid grid-cols-3 gap-3 ${h}`.trim(),children:[o.map(a=>/* @__PURE__ */c(e,{size:"touch-xl",variant:"secondary",onClick:()=>u(r(l,a)),children:a},a)),
|
|
3
3
|
/* @__PURE__ */c(e,{size:"touch-xl",variant:"secondary","aria-label":p.backspace,onClick:()=>u(a(l)),children:"⌫"}),t&&/* @__PURE__ */c(e,{size:"touch-xl",variant:"primary",className:"col-span-3",disabled:d,onClick:t,children:m??p.enter})]})}export{l as NumericKeypad};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import{TimelineCard as e}from"./chunk-SURSVJA2.js";import{TimelineGlyph as t,TimelineProgressIcon as r,TimelineTrack as n}from"./chunk-
|
|
2
|
-
return b("div",{className:"select-none",children:/* @__PURE__ */b(n,{axis:_?"spread":"linear",labels:_?"none":"active",endMark:_?v:null,items:
|
|
3
|
-
/* @__PURE__ */h("button",{type:"button",onClick:
|
|
4
|
-
/* @__PURE__ */b("span",{children:
|
|
1
|
+
import{TimelineCard as e}from"./chunk-SURSVJA2.js";import{TimelineGlyph as t,TimelineProgressIcon as r,TimelineTrack as n}from"./chunk-ZY62UQI2.js";import{toDayMs as a,fmtSliderDate as o,DAY_MS as i}from"./chunk-YDEIXM2A.js";import{Icon as s}from"./chunk-KIBL6M3T.js";import{useBrowserValueOnce as l}from"./chunk-D65T4H6J.js";import{useShellStrings as c,useShellLocale as d,splitAround as p}from"./chunk-VKMEQKYT.js";import{useState as u,useEffect as m,useRef as g}from"react";import{jsxs as h,jsx as b,Fragment as y}from"react/jsx-runtime";var k=/* @__PURE__ */new Set(["finished","partial_shipped","shipped","completed","cancelled"]),f=[{key:"casting",label:"Casting",weight:.2},{key:"cnc",label:"CNC",weight:.2},{key:"painting",label:"Painting",weight:.5},{key:"packing",label:"Packing",weight:.1},{key:"finished_goods",label:"FG",weight:0},{key:"stock_qty",label:"Stock",weight:0}];function _(e){if(e.order_qty<=0)return 0;let t=0;for(const r of f)if(r.weight>0){t+=Math.min((e[r.key]||0)/e.order_qty,1)*r.weight}return 100*t}function v(e){const t=e?.items??[];return 0===t.length?0:t.reduce((e,t)=>e+_(t),0)/t.length}function M(e){const{reports:t,poProductionStartDate:r,poEstCompletionDate:n,poStatus:o,poNumber:s="",currentReportId:d,currentReportDate:p,msPerDayOfPlayback:h=500,markers:b=[]}=e,[y,f]=u(null),_=c().production;m(()=>{p?f(new Date(p).getTime()):t.length>0&&f(new Date(t[0].date).getTime())},[d]);const[v,M]=u(!1),w=g(null),N=()=>{null!=w.current&&(cancelAnimationFrame(w.current),w.current=null),M(!1)};m(()=>()=>N(),[]),m(()=>{N()},[d]);const x=t.map(e=>a(e.date)).filter(e=>null!=e),S=l(Date.now,null)??Math.max(0,...x,...b.map(e=>a(e.date)??0),a(r??null)??0,a(n??null)??0),D=x.length?Math.min(...x):S,P=x.length?Math.max(...x):S,C=a(r??null)??D,R=a(n??null)??0,O=k.has((o||"").toLowerCase()),q=b.reduce((e,t)=>{const r=a(t.date);return null!=r&&r>e?r:e},0),T=(()=>{const e=[R,P,q,C+i];return O||e.push(S),Math.max(...e)})(),I=Math.max(1,Math.round((T-C)/i)),A=a(p??null)??P??C,L=Math.min(Math.max(y??A,C),T),j=t.find(e=>{const t=a(e.date);return null!=t&&t<=L})??null;let $=null;for(let e=t.length-1;e>=0;e--){const r=a(t[e].date);if(null!=r&&r>L){$=t[e];break}}const F=(()=>{if(j||!$||0===t.length)return null;const e=(t[t.length-1].items??[]).map((e,t)=>({id:`zero-${e.part_number}-${t}`,part_number:e.part_number,description:e.description??"",order_qty:Number(e.order_qty||0),casting:0,cnc:0,painting:0,packing:0,finished_goods:0,stock_qty:0}));return{id:`zero-${s}`,progress_number:_.start,date:r||new Date(C).toISOString().slice(0,10),items:e,est_completion_date:n??null,created_by_name:"",notes:""}})(),K=j??F,E=j?a(j.date):F?C:null,Y=$?a($.date):null,z=!!(K&&$&&null!=E&&null!=Y&&L>E&&L<Y);let B,J;if(z&&null!=E&&null!=Y){const e=(L-E)/Math.max(Y-E,1),t=(t,r)=>Math.round(t+(r-t)*e),r={};for(const e of K?.items??[])r[e.part_number]=e;const n={};for(const e of $?.items??[])n[e.part_number]=e;const o=Array.from(/* @__PURE__ */new Set([...Object.keys(r),...Object.keys(n)])).map((e,a)=>{const o=r[e]??{},i=n[e]??{},s=e=>Number(e)||0;return{id:`interp-${e}-${a}`,part_number:e,description:o.description??i.description??"",order_qty:s(o.order_qty??i.order_qty??0),casting:t(s(o.casting),s(i.casting)),cnc:t(s(o.cnc),s(i.cnc)),painting:t(s(o.painting),s(i.painting)),packing:t(s(o.packing),s(i.packing)),finished_goods:t(s(o.finished_goods),s(i.finished_goods)),stock_qty:t(s(o.stock_qty),s(i.stock_qty))}}),i=a(K?.est_completion_date),s=a($?.est_completion_date);let l;l=null!=i&&null!=s?new Date(Math.round(i+(s-i)*e)).toISOString().slice(0,10):K?.est_completion_date||$?.est_completion_date||null,B={id:`interp-${L}`,progress_number:_.estimated,date:new Date(L).toISOString().slice(0,10),created_by_name:"",est_completion_date:l,items:o,notes:""},J=K}else if(B=K??t[t.length-1]??null,B){const e=t.findIndex(e=>e.id===B.id);J=e>=0&&e<t.length-1?t[e+1]:null}else J=null;const Q={};for(const e of J?.items??[])Q[e.part_number]=e;const U=!(!d||B?.id===d),V=d?Math.min(a(p??null)??T,T):T,G=d?t.find(e=>e.id===d)?.progress_number:void 0;return{startMs:C,endMs:T,totalLeadDays:I,scrubMs:L,setScrubMs:e=>{N(),f(e)},resetToCurrent:()=>{N(),p&&f(new Date(p).getTime())},scrubbedAway:U,beforeAnchor:K,nextAfter:$,displayed:B,prevReport:J,prevByPN:Q,isInterpolated:z,playing:v,startPlay:()=>{if(v)return void N();if(V<=C)return void f(V);M(!0),f(C);let e=performance.now(),t=C;const r=n=>{const a=n-e;if(e=n,t+=a/h*i,t>=V)return f(V),w.current=null,void M(!1);f(t),w.current=requestAnimationFrame(r)};w.current=requestAnimationFrame(r)},stopPlay:N,reports:t,markers:b,poNumber:s,currentReportId:d,currentReportProgressNumber:G,estCompletionMs:a(n??null)}}function w({startMs:e,endMs:t,reports:r,markers:a,valueMs:i,activeId:s,onChange:l,onPickReport:p,onOpenReport:u,onOpenMarker:m,onDragStart:g,renderReportPreview:h,reportLabel:y,playback:k,edgeCaptions:f,bare:_=!1,endMark:v=null}){const M=c().production,w=d(),N=r.map(e=>({report:e,ms:new Date(e.date).getTime()})).filter(({ms:e})=>Number.isFinite(e)).sort((e,t)=>e.ms-t.ms),x=N.map(({report:e,ms:t})=>({key:e.id,ms:t,kind:"report",label:y(e),preview:e.preview??h?.(e),onOpen:u?()=>u(e.id):void 0})),S=new Map(N.map(({report:e,ms:t})=>[e.id,t])),D=N.map(({ms:e})=>e),P=m?a.map(e=>({...e,onOpen:m})):a;/* @__PURE__ */
|
|
2
|
+
return b("div",{className:"select-none",children:/* @__PURE__ */b(n,{axis:_?"spread":"linear",labels:_?"none":"active",endMark:_?v:null,items:x,markers:P,startMs:e,endMs:t,activeKey:s,onActivate:e=>{const t=S.get(e);null!=t&&l(t),p(e)},playback:k,edgeCaptions:f,thumb:{valueMs:i,onChange:l,onDragStart:g,stops:D,ariaLabel:M.scrub,valueText:e=>{const t=(e=>N.find(t=>t.ms===e)?.report)(e);return t?`${y(t)} · ${o(e,w)}`:o(e,w)}},ariaLabel:M.label(o(e,w),o(t,w))})})}function N({snapshot:n,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,onScrubProgress:f,heading:_,edgeCaptions:M,reportLabel:N=e=>e.progress_number,resetLabel:x,variant:S="card",onPlayStart:D}){const{reports:P,markers:C,poNumber:R,startMs:O,endMs:q,totalLeadDays:T,scrubMs:I,setScrubMs:A,displayed:L,scrubbedAway:j,resetToCurrent:$,currentReportId:F,currentReportProgressNumber:K,estCompletionMs:E}=n,Y=function(e,t,r){const[n,a]=u(!1),o=g(!1);return{playing:n,toggle:()=>{n?a(!1):0!==e.length&&(r?.(),o.current||(o.current=!0,t(e[0])),a(!0))},stop:()=>{o.current=!1,a(!1)}}}(P.map(e=>a(e.date)).filter(e=>null!=e).sort((e,t)=>e-t),A,D),z=c().production,B=d(),J=_??z.heading,Q=e=>o(e,B);if(0===P.length&&0===C.length)return null;const U=C.filter(e=>"shipment"===e.kind),V=C.filter(e=>"inspection"===e.kind),G=C.filter(e=>"invoice"===e.kind),H=(L?.items??[]).reduce((e,t)=>e+(Number(t.stock_qty)||0),0),X=L?v(L):0,Z=P.find(e=>e.id===F),W=Z?N(Z):K,ee=
|
|
3
|
+
/* @__PURE__ */h("button",{type:"button",onClick:Y.toggle,"aria-pressed":Y.playing,title:Y.playing?z.pause:z.playTitle,className:"rosh-tl-play text-gray-700 border-gray-300 hover:text-blue-600 hover:border-blue-600",children:[Y.playing?/* @__PURE__ */b(s,{name:"pause","aria-hidden":"true"}):/* @__PURE__ */b(s,{name:"play","aria-hidden":"true"}),
|
|
4
|
+
/* @__PURE__ */b("span",{children:Y.playing?z.pause:z.play})]}),te=j&&(x??W)?/* @__PURE__ */b("button",{type:"button",onClick:()=>{Y.stop(),$()},className:"text-xs text-blue-600 underline-offset-4 hover:underline font-medium",children:x??z.backTo(String(W))}):null,[re,ne]=p(z.showing),ae=e=>/* @__PURE__ */b("p",{className:"rosh-tl-status text-gray-800",children:L?/* @__PURE__ */h(y,{children:[e&&re,
|
|
5
5
|
/* @__PURE__ */b("b",{className:"font-medium",children:N(L)}),e&&ne,
|
|
6
|
-
/* @__PURE__ */h("span",{className:"text-gray-500",children:[" · ",
|
|
6
|
+
/* @__PURE__ */h("span",{className:"text-gray-500",children:[" · ",Q(new Date(L.date).getTime())," · ",z.overall(Math.round(X))," · ",z.inStock(H)]})]}):/* @__PURE__ */b("span",{className:"text-gray-500",children:z.noReport})});if("rail"===S){const e=null!=E&&E>=q&&q>O,t=e?{key:"__estimate__",label:z.estimatedCompletion,dateText:Q(E)}:null;/* @__PURE__ */
|
|
7
7
|
return h("div",{className:"shrink-0","data-timeline-variant":"rail",children:[
|
|
8
|
-
/* @__PURE__ */b(w,{bare:!0,endMark:t,startMs:O,endMs:
|
|
8
|
+
/* @__PURE__ */b(w,{bare:!0,endMark:t,startMs:O,endMs:q,reports:P,markers:C,valueMs:I,activeId:L?.id??"",onChange:A,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,reportLabel:N,edgeCaptions:{start:M?.start??z.start,end:M?.end??(e?z.estDone:void 0)},onDragStart:Y.stop,playback:{playing:Y.playing,onArrive:(e,t)=>A(t),onProgress:f,onStop:Y.stop}}),
|
|
9
9
|
/* @__PURE__ */h("div",{className:"rosh-tl-railrow","data-timeline-part":"rail-row",children:[ee,te,ae(!1)]})]})}/* @__PURE__ */
|
|
10
|
-
return b("div",{className:"shrink-0",children:/* @__PURE__ */b(e,{icon:/* @__PURE__ */b(r,{}),heading:J,subject:R,meta:[`${
|
|
11
|
-
/* @__PURE__ */h("div",{className:"rosh-tl-legend",children:[
|
|
12
|
-
/* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-ring border-blue-600"}),
|
|
13
|
-
/* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-diamond",style:{background:"var(--tl-shipment)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"truck"})}),
|
|
14
|
-
/* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-disc",style:{background:"var(--tl-inspection)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"flask"})}),
|
|
15
|
-
/* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-disc",style:{background:"var(--tl-invoice)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"receipt"})}),
|
|
10
|
+
return b("div",{className:"shrink-0",children:/* @__PURE__ */b(e,{icon:/* @__PURE__ */b(r,{}),heading:J,subject:R,meta:[`${Q(O)} → ${Q(q)}`,z.leadTime(T)],actions:/* @__PURE__ */h(y,{children:[te,ee]}),footer:/* @__PURE__ */h(y,{children:[ae(!0),
|
|
11
|
+
/* @__PURE__ */h("div",{className:"rosh-tl-legend",children:[P.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
|
|
12
|
+
/* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-ring border-blue-600"}),z.report]}),U.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
|
|
13
|
+
/* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-diamond",style:{background:"var(--tl-shipment)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"truck"})}),z.shipment]}),V.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
|
|
14
|
+
/* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-disc",style:{background:"var(--tl-inspection)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"flask"})}),z.inspection]}),G.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
|
|
15
|
+
/* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-disc",style:{background:"var(--tl-invoice)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"receipt"})}),z.invoice]})]})]}),children:/* @__PURE__ */b(w,{startMs:O,endMs:q,reports:P,markers:C,valueMs:I,activeId:L?.id??"",onChange:A,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,reportLabel:N,edgeCaptions:M,onDragStart:Y.stop,playback:{playing:Y.playing,onArrive:(e,t)=>A(t),onProgress:f,onStop:Y.stop}})})})}export{k as POST_PRODUCTION_STATUSES,N as ProductionTimeline,f as STAGES,_ as calcOverall,v as calcReportOverall,M as useProductionTimeline};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import{parseHexColor as e,hexToHsv as r,hsvToHex as a,hexReadout as n,HUE_GRADIENT as o,HEX_MAX_LENGTH as t,svFromPoint as l,hueFromPoint as i}from"./chunk-H245LLX4.js";import{Popover as s}from"./chunk-RNBM5JZI.js";import{InputNumber_default as c}from"./chunk-
|
|
2
|
-
return w("button",{ref:l,type:o,"aria-pressed":a,className:$({size:r,selected:a,className:n}),...t,children:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"absolute inset-0",style:
|
|
1
|
+
import{parseHexColor as e,hexToHsv as r,hsvToHex as a,hexReadout as n,HUE_GRADIENT as o,HEX_MAX_LENGTH as t,svFromPoint as l,hueFromPoint as i}from"./chunk-H245LLX4.js";import{Popover as s}from"./chunk-RNBM5JZI.js";import{InputNumber_default as c}from"./chunk-MIZO6SQ3.js";import{InSettingRowContext as u}from"./chunk-E4Z5OXBI.js";import{inputClasses as d}from"./chunk-JFSYWEHD.js";import{Tooltip as h}from"./chunk-22S6LG6D.js";import{useShellStrings as g}from"./chunk-VKMEQKYT.js";import{forwardRef as p,useState as b,useRef as m,useEffect as f,useId as v}from"react";import{jsx as w,jsxs as x}from"react/jsx-runtime";var y={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},k={backgroundImage:"conic-gradient(var(--line-strong) 25%, var(--surface) 0 50%, var(--line-strong) 0 75%, var(--surface) 0)",backgroundSize:"8px 8px"};function C(e){return null==e||Number.isNaN(e)?100:Math.round(Math.min(100,Math.max(0,e)))}function N(e,r){if(!e)return k;const a=C(r);if(a>=100)return{background:e};const n=`color-mix(in srgb, ${e} ${a}%, transparent)`;return{backgroundImage:`linear-gradient(${n}, ${n}), ${k.backgroundImage}`,backgroundSize:`auto, ${k.backgroundSize}`}}function $({size:e="md",selected:r=!1,className:a=""}={}){return["relative inline-flex shrink-0 overflow-hidden rounded-md p-0 transition-shadow","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]","disabled:cursor-not-allowed disabled:opacity-60",r?"border-2 border-blue-500":"border border-gray-300 hover:shadow-sm",y[e],a].filter(Boolean).join(" ")}var z=p(function({color:e,size:r="md",selected:a,className:n,type:o="button",...t},l){/* @__PURE__ */
|
|
2
|
+
return w("button",{ref:l,type:o,"aria-pressed":a,className:$({size:r,selected:a,className:n}),...t,children:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"absolute inset-0",style:N(e)})})}),D=(e,r,a)=>Math.min(a,Math.max(r,e)),I=e=>"string"==typeof e?{value:e}:e;function M(e,r,a){const n=a?.1:.01,o={ArrowLeft:[-n,0],ArrowRight:[n,0],ArrowDown:[0,-n],ArrowUp:[0,n]}[r];return o?{...e,s:D(e.s+o[0],0,1),v:D(e.v+o[1],0,1)}:null}function P(e,r,a){const n=a?10:1;switch(r){case"ArrowLeft":case"ArrowDown":return D(e-n,0,359);case"ArrowRight":case"ArrowUp":return D(e+n,0,359);case"PageDown":return D(e-10,0,359);case"PageUp":return D(e+10,0,359);case"Home":return 0;case"End":return 359;default:return null}}var A={boxShadow:"0 0 0 2px white, 0 0 0 3px color-mix(in srgb, black 35%, transparent)"};function j(e,r,a){const n=a?10:1;switch(r){case"ArrowLeft":case"ArrowDown":return D(e-n,0,100);case"ArrowRight":case"ArrowUp":return D(e+n,0,100);case"PageDown":return D(e-10,0,100);case"PageUp":return D(e+10,0,100);case"Home":return 0;case"End":return 100;default:return null}}function S({value:t,onChange:s,label:c,presets:d,clearable:p=!1,fallback:v,dragWrites:y="live",disabled:$=!1,opacity:D,onOpacityChange:S,onClose:K,id:T,className:L=""}){const O=g().color,R=C(D),U=e=>{const r=C(e);$||r===R||S?.(r)},H=e=>{const r=e.currentTarget.getBoundingClientRect();return r.width>0?(e.clientX-r.left)/r.width*100:R},X=e(v??""),[W,q]=b(()=>r(t||X||"")),Y=m(t);f(()=>{t!==Y.current&&(Y.current=t,t?q(r(t)):X&&q(r(X)))},[t]);const Z=e=>{$||e===t||(Y.current=e,s(e))},F=a=>{const n=e(a);n&&(q(r(n)),Z(n))},J=e=>{q(e),Z(a(e))},[Q,V]=b(!1),G=m(W);G.current=W;const _=e=>({onPointerDown:r=>{if($||0!==r.button)return;r.currentTarget.setPointerCapture?.(r.pointerId),r.currentTarget.focus({preventScroll:!0});const a=e(r,G.current);"end"===y?(V(!0),q(a)):J(a)},onPointerMove:r=>{if($||!(1&r.buttons))return;const a=e(r,G.current);"end"===y?q(a):J(a)},onPointerUp:r=>{"end"===y&&Q&&(V(!1),J(e(r,G.current)))}}),ee=_((e,r)=>({...r,...l(e.clientX,e.clientY,e.currentTarget.getBoundingClientRect())})),re=_((e,r)=>({...r,h:i(e.clientX,e.currentTarget.getBoundingClientRect())})),ae=Q?a(W):t,ne=e=>`${Math.round(100*e)}%`,oe=(d??[]).map(I),te=e(t),le=ae||X||"";
|
|
3
3
|
/* @__PURE__ */
|
|
4
|
-
return w(u.Provider,{value:!1,children:/* @__PURE__ */x("div",{id:T,className:`flex w-56 flex-col gap-3 ${$?"opacity-60":""} ${
|
|
5
|
-
return w(h,{content:o,children:/* @__PURE__ */w(z,{color:a??r.value,size:"sm","aria-label":o,selected:null!==a&&a===te,disabled:$,onClick:()=>
|
|
6
|
-
/* @__PURE__ */w("div",{role:"slider",tabIndex:$?-1:0,"aria-label":
|
|
7
|
-
/* @__PURE__ */w("div",{role:"slider",tabIndex:$?-1:0,"aria-label":
|
|
4
|
+
return w(u.Provider,{value:!1,children:/* @__PURE__ */x("div",{id:T,className:`flex w-56 flex-col gap-3 ${$?"opacity-60":""} ${L}`.trim(),onKeyDown:e=>{"Escape"===e.key&&K&&(e.preventDefault(),e.stopPropagation(),K())},children:[(oe.length>0||p)&&/* @__PURE__ */x("div",{role:"group","aria-label":O.presets,className:"flex flex-wrap gap-2",children:[p&&/* @__PURE__ */w(h,{content:O.clear,children:/* @__PURE__ */w(z,{color:"",size:"sm","aria-label":O.clear,selected:""===t,disabled:$,onClick:()=>{$||""===t||(Y.current="",s(""))}})}),oe.map(r=>{const a=e(r.value),o=r.label?`${r.label} · ${n(a??r.value)}`:n(a??r.value);/* @__PURE__ */
|
|
5
|
+
return w(h,{content:o,children:/* @__PURE__ */w(z,{color:a??r.value,size:"sm","aria-label":o,selected:null!==a&&a===te,disabled:$,onClick:()=>F(r.value)})},`${r.label??""}:${r.value}`)})]}),
|
|
6
|
+
/* @__PURE__ */w("div",{role:"slider",tabIndex:$?-1:0,"aria-label":O.square,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(100*W.v),"aria-valuetext":O.squareValue(Math.round(100*W.s),Math.round(100*W.v)),"aria-disabled":$||void 0,"data-color-square":"",onKeyDown:e=>{if($)return;const r=M(W,e.key,e.shiftKey);r&&(e.preventDefault(),J(r))},...ee,className:"relative h-36 w-full cursor-crosshair touch-none rounded-md rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundColor:a({h:W.h,s:1,v:1}),backgroundImage:"linear-gradient(to top, black, transparent), linear-gradient(to right, white, transparent)"},children:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"pointer-events-none absolute h-3 w-3 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:ne(W.s),top:ne(1-W.v),...A}})}),
|
|
7
|
+
/* @__PURE__ */w("div",{role:"slider",tabIndex:$?-1:0,"aria-label":O.hue,"aria-valuemin":0,"aria-valuemax":359,"aria-valuenow":Math.round(W.h),"aria-orientation":"horizontal","aria-disabled":$||void 0,"data-color-hue":"",onKeyDown:e=>{if($)return;const r=P(W.h,e.key,e.shiftKey);null!==r&&(e.preventDefault(),J({...W,h:r}))},...re,className:"relative h-3 w-full cursor-pointer touch-none rounded-full rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundImage:o},children:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 h-3.5 w-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:W.h/360*100+"%",background:a({h:W.h,s:1,v:1}),...A}})}),S&&/* @__PURE__ */w("div",{role:"slider",tabIndex:$?-1:0,"aria-label":O.opacity(c),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":R,"aria-valuetext":`${R}%`,"aria-orientation":"horizontal","aria-disabled":$||void 0,"data-color-opacity":"",onKeyDown:e=>{if($)return;const r=j(R,e.key,e.shiftKey);null!==r&&(e.preventDefault(),U(r))},onPointerDown:e=>{$||0!==e.button||(e.currentTarget.setPointerCapture?.(e.pointerId),e.currentTarget.focus({preventScroll:!0}),U(H(e)))},onPointerMove:e=>{!$&&1&e.buttons&&U(H(e))},className:"relative h-3 w-full cursor-pointer touch-none rounded-full rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundImage:`linear-gradient(to right, transparent, ${le||"black"}), ${k.backgroundImage}`,backgroundSize:`auto, ${k.backgroundSize}`},children:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 h-3.5 w-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:`${R}%`,...N(le||"black",R),...A}})}),
|
|
8
8
|
/* @__PURE__ */x("div",{className:"flex items-center gap-2",children:[
|
|
9
|
-
/* @__PURE__ */w("span",{"aria-hidden":"true",className:"relative h-8 w-8 shrink-0 overflow-hidden rounded-md border border-gray-300",style:
|
|
10
|
-
/* @__PURE__ */w(
|
|
9
|
+
/* @__PURE__ */w("span",{"aria-hidden":"true",className:"relative h-8 w-8 shrink-0 overflow-hidden rounded-md border border-gray-300",style:N(le,S?R:null)}),
|
|
10
|
+
/* @__PURE__ */w(B,{value:ae,placeholder:!t&&X?n(X):void 0,onChange:F,label:O.hex(c),disabled:$}),S&&/* @__PURE__ */w(E,{value:R,onChange:U,label:O.opacity(c),disabled:$})]})]})})}var K={sm:"w-[calc(7ch+1rem+4px)] min-w-[calc(7ch+1rem+4px)]",md:"w-[calc(7ch+1.5rem+4px)] min-w-[calc(7ch+1.5rem+4px)]",lg:"w-[calc(7ch+2rem+4px)] min-w-[calc(7ch+2rem+4px)]"},T={sm:"h-6",md:"h-8",lg:"h-10"},L=["block w-[calc(7ch+0.5rem+4px)] min-w-[calc(7ch+0.5rem+4px)] flex-none rounded-(--radius-control)","border border-transparent bg-transparent px-1 text-2xs font-mono uppercase","text-gray-800 placeholder:text-gray-400 hover:border-gray-300","focus:border-blue-400 focus:bg-(--surface) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)]","disabled:cursor-not-allowed disabled:opacity-60"].join(" ");function B({value:r,onChange:a,label:o,placeholder:l,disabled:i,id:s,size:c="md",look:u="box",className:h=""}){const[g,p]=b(null),m="text"===u?`${L} ${T[c]} ${h}`.trim():d({size:c,className:`${K[c]} flex-1 font-mono uppercase ${h}`.trim()}).replace(/(^| )w-full( |$)/," ");/* @__PURE__ */
|
|
11
11
|
return w("input",{id:s,type:"text",value:g??(r?n(r):""),"aria-label":o,placeholder:l,maxLength:t,spellCheck:!1,autoComplete:"off",disabled:i,onChange:n=>{p(n.target.value);const o=e(n.target.value);null!==o&&o!==r&&a(o)},onFocus:e=>e.currentTarget.select(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),p(null))},onBlur:()=>p(null),"data-hex-look":u,className:m})}function E({value:e,onChange:r,label:a,disabled:n,size:o="md"}){/* @__PURE__ */
|
|
12
|
-
return w("div",{"data-color-opacity-box":"",className:"w-20 shrink-0",children:/* @__PURE__ */w(c,{value:e,onChange:e=>{null!==e&&r(e)},min:0,max:100,precision:0,suffix:"%",size:o,"aria-label":a,disabled:n})})}function
|
|
12
|
+
return w("div",{"data-color-opacity-box":"",className:"w-20 shrink-0",children:/* @__PURE__ */w(c,{value:e,onChange:e=>{null!==e&&r(e)},min:0,max:100,precision:0,suffix:"%",size:o,"aria-label":a,disabled:n})})}function O({value:r,onChange:a,label:o,presets:t,clearable:l,fallback:i,dragWrites:c,disabled:u,id:d,showHexInput:h=!1,opacity:p,onOpacityChange:b,size:m="md",align:f="start",open:y,onOpenChange:k,className:z=""}){const D=g().color,I=C(p),M=v(),P=e(i??""),A=r||P||"",j=r?n(r):P?n(P):D.none;
|
|
13
13
|
/* @__PURE__ */
|
|
14
14
|
return x("div",{className:`inline-flex items-center ${b?"flex-wrap justify-end gap-1":h?"gap-1":"gap-2"} ${z}`.trim(),children:[
|
|
15
|
-
/* @__PURE__ */w(s,{id:d,trigger:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"absolute inset-0",style:
|
|
16
|
-
/* @__PURE__ */w(
|
|
15
|
+
/* @__PURE__ */w(s,{id:d,trigger:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"absolute inset-0",style:N(A,b?I:null)}),triggerLabel:D.swatch(o,j),triggerClassName:$({size:m}),"aria-label":D.panel(o),align:f,open:y,onOpenChange:k,disabled:u,children:/* @__PURE__ */w(S,{id:M,value:r,onChange:a,label:o,presets:t,clearable:l,fallback:i,dragWrites:c,disabled:u,opacity:p,onOpacityChange:b})}),h&&
|
|
16
|
+
/* @__PURE__ */w(B,{value:r,placeholder:!r&&P?n(P):void 0,onChange:e=>{u||e===r||a(e)},label:D.hex(o),disabled:u,size:m,look:"text"}),b&&/* @__PURE__ */w(E,{value:I,onChange:e=>{u||e===I||b(e)},label:D.opacity(o),disabled:u,size:m})]})}export{O as ColorPicker,S as ColorPickerPanel,z as ColorSwatch,B as HexInput,k as NO_COLOR_FILL,C as clampOpacity,N as colorFill,$ as colorSwatchClasses,P as stepHue,j as stepOpacity,M as stepSquare};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{TICK_INK as e}from"./chunk-URBCGEXG.js";import{useShellStrings as n}from"./chunk-
|
|
1
|
+
import{TICK_INK as e}from"./chunk-URBCGEXG.js";import{useShellStrings as n}from"./chunk-VKMEQKYT.js";import{jsxs as r,jsx as i}from"react/jsx-runtime";function a({ink:e}){/* @__PURE__ */
|
|
2
2
|
return i("span",{"aria-hidden":"true",className:`h-3 w-0.5 shrink-0 rounded-[1px] ${e}`})}function t({link:t,className:l=""}){const c=n().meter;/* @__PURE__ */
|
|
3
3
|
return r("div",{className:`flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-gray-500 ${l}`.trim(),children:[
|
|
4
4
|
/* @__PURE__ */r("span",{className:"inline-flex items-center gap-1",children:[
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-KIBL6M3T.js";import{useShellStrings as t}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-KIBL6M3T.js";import{useShellStrings as t}from"./chunk-VKMEQKYT.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};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{OneLineLabel as e}from"./chunk-6KO5VTL7.js";import{
|
|
2
|
-
return t("div",{role:"group","aria-label":p?void 0:m,"aria-labelledby":p,"aria-describedby":f,className:`flex flex-wrap gap-2 ${u}`.trim(),children:b.map((l,n)=>{const b=`${g}-${n}-state`,m=`${g}-${n}-reason`,u=Boolean(l.disabled)&&null!=l.disabledReason&&""!==l.disabledReason,p=/* @__PURE__ */c("button",{type:"button","aria-pressed":l.shown,disabled:!(!l.disabled||u)||void 0,"aria-disabled":!!u||void 0,"aria-describedby":
|
|
3
|
-
/* @__PURE__ */t(
|
|
1
|
+
import{OneLineLabel as e}from"./chunk-6KO5VTL7.js";import{swallowPress as r,describedByWith as i,OffWithReason as a}from"./chunk-VH6GB73Q.js";import{Icon as o}from"./chunk-KIBL6M3T.js";import{Tooltip as s}from"./chunk-22S6LG6D.js";import{useShellStrings as l}from"./chunk-VKMEQKYT.js";import{useId as n,Fragment as d}from"react";import{jsx as t,jsxs as c}from"react/jsx-runtime";function b({items:b,onChange:h,label:m,className:u="","aria-labelledby":p,"aria-describedby":f}){const w=l().displayChips,g=n();/* @__PURE__ */
|
|
2
|
+
return t("div",{role:"group","aria-label":p?void 0:m,"aria-labelledby":p,"aria-describedby":f,className:`flex flex-wrap gap-2 ${u}`.trim(),children:b.map((l,n)=>{const b=`${g}-${n}-state`,m=`${g}-${n}-reason`,u=Boolean(l.disabled)&&null!=l.disabledReason&&""!==l.disabledReason,p=/* @__PURE__ */c("button",{type:"button","aria-pressed":l.shown,disabled:!(!l.disabled||u)||void 0,"aria-disabled":!!u||void 0,"aria-describedby":i(b,u?m:void 0),onClick:u?r:()=>h(l.id,!l.shown),className:"inline-flex h-6 max-w-full shrink-0 items-center gap-1 whitespace-nowrap rounded-full border pl-2 pr-3 text-xs font-medium transition-colors rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)] disabled:cursor-not-allowed disabled:opacity-60 aria-disabled:cursor-not-allowed aria-disabled:opacity-60 "+(l.shown?"border-blue-200 bg-blue-50 text-blue-700 hover:bg-blue-100":"border-gray-200 bg-white text-gray-500 hover:bg-gray-50 hover:text-gray-900"),children:[
|
|
3
|
+
/* @__PURE__ */t(o,{name:l.shown?"eye":"eye-off",className:"h-4 w-4 shrink-0",strokeWidth:"1.75"}),
|
|
4
4
|
/* @__PURE__ */t(e,{children:l.label})]}),f=/* @__PURE__ */t("span",{id:b,className:"sr-only",children:l.shown?w.shown:w.hidden});/* @__PURE__ */
|
|
5
|
-
return c(d,{children:[u?/* @__PURE__ */t(
|
|
5
|
+
return c(d,{children:[u?/* @__PURE__ */t(a,{reason:l.disabledReason,id:m,children:p}):/* @__PURE__ */t(s,{content:l.shown?w.shownHint:w.hiddenHint,describe:!1,className:"relative inline-flex max-w-full",children:p}),f]},l.id)})})}export{b as DisplayChips};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Card as e}from"./chunk-
|
|
1
|
+
import{Card as e}from"./chunk-V23TPYHO.js";import{Select_default as l}from"./chunk-PMOGQHYX.js";import{Input_default as a}from"./chunk-UNEJ2ABD.js";import{FormField as r}from"./chunk-MVQBVPWP.js";import{Checkbox_default as i}from"./chunk-CGZBDI6C.js";import{Banner as c}from"./chunk-TJPPV7KZ.js";import{Button_default as d}from"./chunk-4IU5BSVE.js";import{useState as s}from"react";import{jsx as n,jsxs as t}from"react/jsx-runtime";var h=[{name:"Mechanical keyboard",qty:1,price:129},{name:"USB-C cable (2m)",qty:2,price:12},{name:"Laptop stand",qty:1,price:48}];function m(){const[m,o]=s(!0),[p,u]=s("us"),y=h.reduce((e,l)=>e+l.qty*l.price,0),g=y+9;/* @__PURE__ */
|
|
2
2
|
return n("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */t("div",{className:"mx-auto max-w-5xl space-y-5",children:[
|
|
3
3
|
/* @__PURE__ */n("h1",{className:"text-xl font-semibold text-gray-900",children:"Checkout"}),
|
|
4
4
|
/* @__PURE__ */t("div",{className:"grid grid-cols-1 gap-5 lg:grid-cols-3",children:[
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{ChartTooltip as e}from"./chunk-P5BOTIJU.js";import{axisGutter as t,radiusScale as i,niceMax as l,logScale as r,linearScale as o}from"./chunk-2JWPNR2U.js";import{usePlotWidth as n}from"./chunk-MAFUXCPZ.js";import{registerModalEscapeInterceptor as a}from"./chunk-TWVUQUUD.js";import{CHART_INK as s,resolveSeriesColorWithin as c}from"./chunk-TZFACUMR.js";import{useShellStrings as m,useShellLocale as h}from"./chunk-VKMEQKYT.js";import{formatPlain as f}from"./chunk-C3QOHMR6.js";import{useRef as u,useId as p,useState as d,useEffect as x}from"react";import{jsx as y,jsxs as g}from"react/jsx-runtime";var b=3;function k({series:b,height:k=260,width:v,xLabel:M,yLabel:A,formatX:z,formatY:$,xDomain:j,yDomain:w,xScale:N="linear",yScale:R="linear",radiusRange:U=[4,22],className:S,emptyLabel:D}){const L=m().charts,P=h(),E=z??(e=>f(e,P)),O=$??(e=>f(e,P)),T=D??L.noObservations,V=u(null),W=n(V),B=v??W,C=p(),[I,K]=d(null);x(()=>{if(null!==I)return a(e=>"Escape"===e.key&&(K(null),!0))},[I]);const Q=(e,t)=>!t||e>=Math.min(t[0],t[1])&&e<=Math.max(t[0],t[1]),F=b.map((e,t)=>({...e,slot:t})).filter(e=>e.points.length>0),J=j||w?F.map(e=>({...e,points:e.points.filter(e=>Q(e.x,j)&&Q(e.y,w))})).filter(e=>e.points.length>0):F,X=F.reduce((e,t)=>e+t.points.length,0)-J.reduce((e,t)=>e+t.points.length,0);if(0===J.length)/* @__PURE__ */
|
|
2
|
+
return y("div",{className:S,ref:V,children:/* @__PURE__ */y("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:k},children:T})});const Y=J.flatMap(e=>e.points),Z=Y.some(e=>null!=e.size),H=14,q=20,G=34,_=52,ee=(e,t,i,n)=>{const a=e.filter(e=>e>0),s="log"===i?a.length>0?Math.min(...a):0:Math.min(0,...e),c=t??[s,l(Math.max(...e))];return"log"===i?r(c,n):o(c,n)},te=ee(Y.map(e=>e.y),w,R,{from:k-G,to:H}),ie=t(te.ticks(5).map(O),_),le=Math.max(ie+1,B-q),re=ee(Y.map(e=>e.x),j,N,{from:ie,to:le}),oe=i([0,Math.max(...Y.map(e=>e.size??1))],{from:U[0],to:U[1]}),ne=I?J[I.s]:void 0,ae=I&&ne?ne.points[I.i]:void 0,se=J.flatMap((e,t)=>e.points.map((e,i)=>({s:t,i:i})));/* @__PURE__ */
|
|
3
|
+
return g("div",{className:`relative ${S??""}`,ref:V,children:[
|
|
4
|
+
/* @__PURE__ */g("svg",{width:"100%",height:k,viewBox:`0 0 ${B} ${k}`,role:"img","aria-label":L.scatter(J.map(e=>e.label),A??L.yAxis,M??L.xAxis)+(X>0?`. ${L.outsideRange(X)}`:""),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>K(null),onBlur:()=>K(null),onKeyDown:e=>{if("ArrowRight"!==e.key&&"ArrowLeft"!==e.key)return;e.preventDefault();const t="ArrowRight"===e.key?1:-1,i=I?se.findIndex(e=>e.s===I.s&&e.i===I.i):0;K(se[Math.min(se.length-1,Math.max(0,i+t))])},children:[
|
|
5
|
+
/* @__PURE__ */y("defs",{children:/* @__PURE__ */y("clipPath",{id:C,children:/* @__PURE__ */y("rect",{x:ie-U[1],y:H-U[1],width:le-ie+2*U[1],height:k-G-H+2*U[1]})})}),te.ticks(5).map(e=>/* @__PURE__ */g("g",{children:[
|
|
6
|
+
/* @__PURE__ */y("line",{x1:ie,y1:te(e),x2:le,y2:te(e),stroke:s.grid,strokeWidth:1,shapeRendering:"crispEdges"}),
|
|
7
|
+
/* @__PURE__ */y("text",{x:ie-8,y:te(e)+4,textAnchor:"end",fontSize:11,fill:s.label,style:{fontVariantNumeric:"tabular-nums"},children:O(e)})]},`y${e}`)),re.ticks(5).map(e=>/* @__PURE__ */y("text",{x:re(e),y:k-12,textAnchor:"middle",fontSize:11,fill:s.label,style:{fontVariantNumeric:"tabular-nums"},children:E(e)},`x${e}`)),M&&/* @__PURE__ */y("text",{x:(ie+le)/2,y:k-.5,textAnchor:"middle",fontSize:11,fill:s.label,children:M}),A&&/* @__PURE__ */y("text",{x:12,y:k/2,transform:`rotate(-90 12 ${k/2})`,textAnchor:"middle",fontSize:11,fill:s.label,children:A}),
|
|
8
|
+
/* @__PURE__ */y("g",{clipPath:`url(#${C})`,children:J.map((e,t)=>{const i=c(e.slot,3,e.color,e.tone);return e.points.map((l,r)=>/* @__PURE__ */y("circle",{cx:re(l.x),cy:te(l.y),r:Z?oe(l.size??0):U[0]+1,fill:i,fillOpacity:I&&I.s!==t?.25:.62,stroke:s.surface,strokeWidth:2,onMouseEnter:()=>K({s:t,i:r})},`${e.key}-${r}`))})})]}),I&&ne&&ae&&/* @__PURE__ */y("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */y(e,{title:ae.label??ne.label,rows:[{key:"x",label:M??L.xAxis,color:c(ne.slot,3,ne.color,ne.tone),value:E(ae.x)},{key:"y",label:A??L.yAxis,color:c(ne.slot,3,ne.color,ne.tone),value:O(ae.y)},...null!=ae.size?[{key:"size",label:L.size,color:s.muted,value:f(ae.size,P)}]:[]],footnote:ae.label?ne.label:void 0})})]})}export{b as SCATTER_SERIES_CAP,k as ScatterChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Banner as e}from"./chunk-
|
|
1
|
+
import{Banner as e}from"./chunk-TJPPV7KZ.js";import{Button_default as t}from"./chunk-4IU5BSVE.js";import{useShellStrings as n}from"./chunk-VKMEQKYT.js";import{useState as r,useEffect as i}from"react";import{jsx as o,jsxs as a}from"react/jsx-runtime";var s=6e4;function c({currentVersion:e,versionUrl:t="/version.json",pollMs:n=6e4}){const[o,a]=r(null);return i(()=>{if(!e||null!==o)return;let r=!1;const i=async()=>{if("undefined"==typeof document||"hidden"!==document.visibilityState)try{const n=t.includes("?")?"&":"?",i=await fetch(`${t}${n}t=${Date.now()}`,{cache:"no-store"});if(!i.ok)return;const o=await i.json(),s=o&&"object"==typeof o&&"string"==typeof o.version?o.version:null;!r&&s&&s!==e&&a(s)}catch{}};i();const s=setInterval(()=>{i()},n),c=()=>{"visible"===document.visibilityState&&i()};return document.addEventListener("visibilitychange",c),()=>{r=!0,clearInterval(s),document.removeEventListener("visibilitychange",c)}},[e,t,n,o]),o}function l({currentVersion:r,versionUrl:i,pollMs:s,message:l,onRefresh:m,className:u=""}){const d=c({currentVersion:r,versionUrl:i,pollMs:s}),p=n();if(null===d)return null;const f=m??(()=>window.location.reload());/* @__PURE__ */
|
|
2
2
|
return o("div",{"data-app-update-banner":"",className:`fixed left-1/2 top-3 z-(--z-toast) w-max max-w-[calc(100vw-1.5rem)] -translate-x-1/2 ${u}`.trim(),children:/* @__PURE__ */a(e,{tone:"warning",className:"shadow-lg",action:/* @__PURE__ */o(t,{type:"button",variant:"primary",size:"md",onClick:f,children:p.update.refreshNow}),children:[
|
|
3
3
|
/* @__PURE__ */o("span",{className:"font-medium",children:l??p.update.available}),
|
|
4
4
|
/* @__PURE__ */a("span",{className:"ml-2 whitespace-nowrap font-mono text-xs text-gray-500",children:[r," → ",d]})]})})}export{s as APP_UPDATE_POLL_MS,l as AppUpdateBanner,c as useAppUpdate};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ChartTooltip as t}from"./chunk-P5BOTIJU.js";import{CartesianPlot as o}from"./chunk-
|
|
2
|
-
return l(o,{labels:
|
|
1
|
+
import{ChartTooltip as t}from"./chunk-P5BOTIJU.js";import{CartesianPlot as o}from"./chunk-O5KDTFK5.js";import{binValues as r}from"./chunk-2JWPNR2U.js";import{resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as e,useShellLocale as i}from"./chunk-VKMEQKYT.js";import{formatPlain as m,formatFixed as n}from"./chunk-C3QOHMR6.js";import{jsx as l}from"react/jsx-runtime";function c({values:c,bins:s=10,precomputed:h,height:u=220,width:p,color:b,tone:f,formatBound:d,formatCount:x,yAxisLabel:g,label:k,className:y,emptyLabel:j}){const v=e().charts,w=i(),A=d??(t=>Number.isInteger(t)?m(t,w):n(t,1,w)),L=x??(t=>m(t,w)),M=g??v.countAxis,T=k??v.distribution,K=h??r(c??[],s),N=a(0,b,f),O=K.map(t=>A(t.from)),C=K.map(t=>t.count);/* @__PURE__ */
|
|
2
|
+
return l(o,{labels:O,values:C,height:u,width:p,bandPadding:0,xTickAnchor:"start",formatValue:L,yAxisLabel:M,className:y,emptyLabel:j,ariaLabel:v.histogram(T,K.length,(c??[]).length),tooltip:o=>/* @__PURE__ */l(t,{title:`${A(K[o].from)} – ${A(K[o].to)}`,rows:[{key:"count",label:v.observations,color:N,value:L(K[o].count)}]}),children:({x:t,y:o,bottom:r,active:a})=>/* @__PURE__ */l("g",{children:K.map((e,i)=>/* @__PURE__ */l("rect",{x:t(i)+.5,y:o(e.count),width:Math.max(1,t.bandwidth-1),height:Math.max(0,r-o(e.count)),fill:N,fillOpacity:null===a||a===i?.85:.42},i))})})}export{c as HistogramChart};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{GROUP_COLORS as e,BADGE_PILL as o}from"./chunk-D323R2FT.js";import{OneLineLabel as i}from"./chunk-6KO5VTL7.js";import{Icon as r}from"./chunk-KIBL6M3T.js";import{useShellStrings as s}from"./chunk-
|
|
1
|
+
import{GROUP_COLORS as e,BADGE_PILL as o}from"./chunk-D323R2FT.js";import{OneLineLabel as i}from"./chunk-6KO5VTL7.js";import{Icon as r}from"./chunk-KIBL6M3T.js";import{useShellStrings as s}from"./chunk-VKMEQKYT.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";function l({colorClass:l,tone:c,children:a,size:m="sm",capitalize:p=!1,closable:u=!1,onClose:f,closeLabel:h,className:x=""}){const d=l??e[c??"neutral"],y="xs"===m?"px-2 py-0.5 text-3xs":"md"===m?"px-3 py-0.5 text-xs":"px-2 py-0.5 text-xs",b=p?"capitalize":"",g=s().badge,j=h??("string"==typeof a?g.removeItem(a):g.remove),k="xs"===m?"h-2.5 w-2.5":"h-3 w-3";/* @__PURE__ */
|
|
2
2
|
return t("span",{className:[o,"font-medium",y,b,d,x].filter(Boolean).join(" "),children:[
|
|
3
3
|
/* @__PURE__ */n(i,{children:a}),u&&/* @__PURE__ */n("button",{type:"button",onClick:f,"aria-label":j,className:"-mr-0.5 ml-1 inline-flex shrink-0 items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-strong)]",children:/* @__PURE__ */n(r,{name:"close",look:"mini",className:k,"aria-hidden":"true"})})]})}export{l as ColoredBadge};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ChartTooltip as t}from"./chunk-P5BOTIJU.js";import{CartesianPlot as a}from"./chunk-
|
|
1
|
+
import{ChartTooltip as t}from"./chunk-P5BOTIJU.js";import{CartesianPlot as a}from"./chunk-O5KDTFK5.js";import{CHART_INK as e,STATUS_VARS as l}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as r}from"./chunk-VKMEQKYT.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
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
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
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__ */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useShellLocale as e}from"./chunk-
|
|
1
|
+
import{useShellLocale as e}from"./chunk-VKMEQKYT.js";import{formatPlain as t}from"./chunk-C3QOHMR6.js";import{useState as r,useEffect as n,Children as i}from"react";import{jsxs as l,jsx as a}from"react/jsx-runtime";var s={xs:24,sm:32,md:40,lg:56},o={online:"bg-green-500",offline:"bg-gray-400",busy:"bg-red-500",away:"bg-amber-500"};function m(e){if(!e)return"?";const t=e.trim().split(/\s+/).filter(Boolean);if(0===t.length)return"?";return((t[0][0]??"")+(t.length>1?t[t.length-1][0]:"")).toUpperCase()||"?"}function c({src:e,name:t,size:i="md",status:c,className:u=""}){const h=s[i],f=Math.max(8,Math.round(.28*h)),[d,g]=r(!1);n(()=>{g(!1)},[e]);const y=Boolean(e)&&!d;
|
|
2
2
|
/* @__PURE__ */
|
|
3
3
|
return l("span",{className:`relative inline-flex shrink-0 ${u}`.trim(),style:{width:h,height:h},...t?{role:"img","aria-label":t}:{"aria-hidden":!0},children:[y?/* @__PURE__ */a("img",{src:e,alt:"",onError:()=>g(!0),className:"h-full w-full rounded-full object-cover"}):/* @__PURE__ */a("span",{className:"flex h-full w-full items-center justify-center rounded-full bg-gray-100 font-medium text-gray-600",style:{fontSize:Math.round(.4*h)},children:m(t)}),c&&/* @__PURE__ */a("span",{className:`absolute bottom-0 right-0 rounded-full ring-2 ring-white ${o[c]}`,style:{width:f,height:f}})]})}function u({children:r,max:n,size:o="md",className:m=""}){const c=i.toArray(r),u=n?c.slice(0,n):c,h=n?c.length-u.length:0,f=s[o],d=Math.round(.3*f),g=e();/* @__PURE__ */
|
|
4
4
|
return l("div",{className:`flex items-center ${m}`.trim(),children:[u.map((e,t)=>/* @__PURE__ */a("span",{className:"rounded-full ring-2 ring-white",style:{marginLeft:0===t?0:-d},children:e},t)),h>0&&/* @__PURE__ */l("span",{className:"flex items-center justify-center rounded-full bg-gray-200 font-medium text-gray-600 ring-2 ring-white",style:{width:f,height:f,marginLeft:-d,fontSize:Math.round(.36*f)},children:["+",t(h,g)]})]})}export{c as Avatar,u as AvatarGroup};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{IconButton_default as e}from"./chunk-4CANQ3B3.js";import{Icon as l}from"./chunk-KIBL6M3T.js";import{Tooltip as a}from"./chunk-22S6LG6D.js";import{useShellStrings as r}from"./chunk-
|
|
2
|
-
return n(a,{content:e,children:l},l.key??void 0)}function m({offered:a,pressed:d,onMark:m,color:g,linkOpen:w=!1,last:f,alignment:k,list:v,letterCase:N,disabled:C=!1,"aria-label":y,windows:
|
|
1
|
+
import{IconButton_default as e}from"./chunk-4CANQ3B3.js";import{Icon as l}from"./chunk-KIBL6M3T.js";import{Tooltip as a}from"./chunk-22S6LG6D.js";import{useShellStrings as r}from"./chunk-VKMEQKYT.js";import{jsx as n,jsxs as o,Fragment as s}from"react/jsx-runtime";var i=e=>e.preventDefault(),t=e=>null!=e&&!1!==e,d=["bold","italic","underline","strike","link","sup","sub","code"],c=["left","center","right","justify"];function u(e,l,a){const r={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1,Home:"first",End:"last"}[e.key];if(void 0===r||0===l.length)return;const n=[...e.currentTarget.querySelectorAll('[role="radio"]')],o=n.findIndex(l=>l===e.target||l.contains(e.target));if(o<0)return;e.preventDefault();const s=n.length,i="first"===r?0:"last"===r?s-1:(o+r+s)%s;n[i].disabled||(a(l[i]),n[i].focus())}function h(e,l){const a=["bold","italic","underline","strike"].filter(l=>e.has(l)).length;return{color:a,link:a+(l?1:0)}}function p({offered:e,color:l,last:a,alignment:r,list:n,letterCase:o}){const s=d.filter(l=>e.has(l)).length+(l?1:0)+(t(a)?1:0),i=(r?c.filter(e=>r.allow.includes(e)).length:0)+(n&&e.has("bullet")?1:0)+(n&&e.has("number")?1:0)+(e.has("quote")?1:0)+(o?3:0);return{words:s>0,paragraph:i>0,oneRow:s>0&&i>0&&s+1+i<=9,flow:s>0&&i>0&&s+1+i>9&&s<=7,cells:{words:s,paragraph:i}}}function b(e,l){/* @__PURE__ */
|
|
2
|
+
return n(a,{content:e,children:l},l.key??void 0)}function m({offered:a,pressed:d,onMark:m,color:g,linkOpen:w=!1,last:f,alignment:k,list:v,letterCase:N,disabled:C=!1,"aria-label":y,windows:M,className:D="",layout:x="grid"}){const j=r().textToolbar,L=p({offered:a,color:g,last:f,alignment:k,list:v,letterCase:N});if(!L.words&&!L.paragraph)return null;const A=(e,l="")=>`rosh-tb-btn${e?" is-on":""}${l?` ${l}`:""}`,B=(l,r,o,s)=>a.has(l)?b(r,/* @__PURE__ */n(e,"link"===l?{pressed:w,className:A(w),"aria-label":r,"aria-haspopup":"dialog","aria-expanded":w,"aria-keyshortcuts":s,disabled:C,onMouseDown:i,onClick:()=>m(l),children:o}:{className:A(Boolean(d[l])),"aria-label":r,"aria-pressed":Boolean(d[l]),"aria-keyshortcuts":s,disabled:C,onMouseDown:i,onClick:()=>m(l),children:o},l)):null,K=[["left",j.alignLeft,/* @__PURE__ */n(l,{name:"align-left"})],["center",j.alignCenter,/* @__PURE__ */n(l,{name:"align-center"})],["right",j.alignRight,/* @__PURE__ */n(l,{name:"align-right"})],["justify",j.alignJustify,/* @__PURE__ */n(l,{name:"align-justify"})]],q=k?c.filter(e=>k.allow.includes(e)):[],I=k&&q.includes(k.value)?k.value:q[0],R=[["none",j.caseNone,/* @__PURE__ */n(l,{name:"case-normal"})],["upper",j.caseUpper,/* @__PURE__ */n(l,{name:"case-upper"})],["lower",j.caseLower,/* @__PURE__ */n(l,{name:"case-lower"})]],S=/* @__PURE__ */o(s,{children:[B("bold",j.bold,/* @__PURE__ */n(l,{name:"bold"}),"Meta+B"),B("italic",j.italic,/* @__PURE__ */n(l,{name:"italic"}),"Meta+I"),B("underline",j.underline,/* @__PURE__ */n(l,{name:"underline"}),"Meta+U"),B("strike",j.strike,/* @__PURE__ */n(l,{name:"strike"})),g?b(j.color,/* @__PURE__ */n(e,{pressed:g.open,className:A(g.open,"rosh-tb-color"),"aria-label":j.color,"aria-haspopup":"dialog","aria-expanded":g.open,disabled:C,style:g.run?{"--rosh-tb-run":g.run}:void 0,onMouseDown:i,onClick:g.onToggle,children:/* @__PURE__ */n(l,{name:"text-color"})},"color")):null,B("link",j.link,/* @__PURE__ */n(l,{name:"link"}),"Meta+K"),B("sup",j.sup,/* @__PURE__ */n(l,{name:"superscript"})),B("sub",j.sub,/* @__PURE__ */n(l,{name:"subscript"})),B("code",j.code,/* @__PURE__ */n(l,{name:"code"})),t(f)?f:null]}),T=/* @__PURE__ */o(s,{children:[k&&q.length>0?/* @__PURE__ */n("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":j.alignment,onKeyDown:e=>u(e,q,e=>k.onChange(e)),children:K.map(([l,a,r])=>k.allow.includes(l)?b(a,/* @__PURE__ */n(e,{role:"radio",pressed:k.value===l,className:A(k.value===l),"aria-checked":k.value===l,"aria-label":a,tabIndex:l===I?0:-1,disabled:C||k.disabled,onMouseDown:i,onClick:()=>k.onChange(l),children:r},l)):null)}):null,v&&a.has("bullet")?b(j.bullet,/* @__PURE__ */n(e,{className:A("bullet"===v.pressed),"aria-label":j.bullet,"aria-pressed":"bullet"===v.pressed,disabled:C,onMouseDown:i,onClick:()=>v.onList("bullet"),children:/* @__PURE__ */n(l,{name:"list"})},"bullet")):null,v&&a.has("number")?b(j.number,/* @__PURE__ */n(e,{className:A("number"===v.pressed),"aria-label":j.number,"aria-pressed":"number"===v.pressed,disabled:C,onMouseDown:i,onClick:()=>v.onList("number"),children:/* @__PURE__ */n(l,{name:"numbered-list"})},"number")):null,B("quote",j.quote,/* @__PURE__ */n(l,{name:"quote"})),N?/* @__PURE__ */n("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":j.letterCase,onKeyDown:e=>u(e,R.map(([e])=>e),e=>N.onChange(e)),children:R.map(([l,a,r])=>b(a,/* @__PURE__ */n(e,{role:"radio",pressed:N.value===l,className:A(N.value===l),"aria-checked":N.value===l,"aria-label":a,tabIndex:l===(N.value||"none")?0:-1,disabled:C||N.disabled,onMouseDown:i,onClick:()=>N.onChange(N.value===l?"":l),children:r},l)))}):null]}),$="row"===x,U=$?" is-row":L.flow?" is-flow":L.oneRow?" is-one-row":L.words&&void 0===f?" is-eight":"",E=h(a,Boolean(g)),Q={"--rosh-tb-color-col":String(E.color),"--rosh-tb-link-col":String(E.link),...$?{"--rosh-tb-cells":String(L.cells.words+L.cells.paragraph),"--rosh-tb-groupgap":L.words&&L.paragraph?"var(--space-8, 0.5rem)":"0px"}:{}};let G;return G=$?/* @__PURE__ */o("div",{className:"rosh-tb-row is-row",children:[L.words?/* @__PURE__ */n("div",{className:"rosh-tb-words",children:S}):null,L.paragraph?/* @__PURE__ */n("div",{className:"rosh-tb-para",children:T}):null]}):L.flow?/* @__PURE__ */o("div",{className:"rosh-tb-row is-flow",children:[S,
|
|
3
3
|
/* @__PURE__ */n("span",{className:"rosh-tb-flowgap","aria-hidden":"true"}),T]}):L.oneRow?/* @__PURE__ */o("div",{className:"rosh-tb-row is-one-row",children:[
|
|
4
|
-
/* @__PURE__ */n("div",{className:"rosh-tb-words",children:
|
|
5
|
-
/* @__PURE__ */n("div",{className:"rosh-tb-para",children:T})]}):/* @__PURE__ */o(s,{children:[L.words?/* @__PURE__ */n("div",{className:"rosh-tb-row"+(void 0===f?" is-eight":""),children:
|
|
6
|
-
/* @__PURE__ */n("div",{className:"rosh-tb",role:"toolbar","aria-label":y??j.formatting,children:
|
|
4
|
+
/* @__PURE__ */n("div",{className:"rosh-tb-words",children:S}),
|
|
5
|
+
/* @__PURE__ */n("div",{className:"rosh-tb-para",children:T})]}):/* @__PURE__ */o(s,{children:[L.words?/* @__PURE__ */n("div",{className:"rosh-tb-row"+(void 0===f?" is-eight":""),children:S}):null,L.paragraph?/* @__PURE__ */n("div",{className:"rosh-tb-row",children:T}):null]}),/* @__PURE__ */o("div",{className:`rosh-tb-wrap${U} ${D}`.trim(),style:Q,children:[
|
|
6
|
+
/* @__PURE__ */n("div",{className:"rosh-tb",role:"toolbar","aria-label":y??j.formatting,children:G}),M]})}export{m as TextToolbar,p as textToolbarRows,h as textToolbarWindowColumns};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import{Checkbox_default as e}from"./chunk-CGZBDI6C.js";import{Pagination as t}from"./chunk-
|
|
1
|
+
import{Checkbox_default as e}from"./chunk-CGZBDI6C.js";import{Pagination as t}from"./chunk-WBU7NZBP.js";import{TH_ONE_LINE as r,OneLineLabel as o}from"./chunk-6KO5VTL7.js";import{SpinnerRing as n}from"./chunk-Q5MD3VY6.js";import{useBrowserLayoutEffect as l}from"./chunk-D65T4H6J.js";import{useShellStrings as s}from"./chunk-VKMEQKYT.js";import{useState as a,useRef as i}from"react";import{jsxs as c,Fragment as d,jsx as h}from"react/jsx-runtime";function u(e){const t={};if(!e)return t;for(const[r,o]of Object.entries(e))!r.startsWith("data-")||"string"!=typeof o&&"number"!=typeof o&&"boolean"!=typeof o||(t[r]=o);return t}var m=e=>Array.isArray(e.columns),g=e=>"wide"===e.only?"rosh-dt-only-wide":"stacked"===e.only?"rosh-dt-only-stacked":"",f="rosh-dt-row-link rosh-focus-ring underline-offset-4 hover:underline",p={sm:"px-2 py-2",md:"px-3 py-2"},y={left:"text-left",right:"text-right",center:"text-center"};function b({direction:e}){/* @__PURE__ */
|
|
2
2
|
return c("span",{className:"ml-1 inline-flex flex-col leading-none","aria-hidden":"true",children:[
|
|
3
3
|
/* @__PURE__ */h("svg",{className:"h-2 w-2 "+("asc"===e?"text-gray-700":"text-gray-300"),viewBox:"0 0 8 5",fill:"currentColor",children:/* @__PURE__ */h("path",{d:"M4 0L8 5H0z"})}),
|
|
4
|
-
/* @__PURE__ */h("svg",{className:"h-2 w-2 "+("desc"===e?"text-gray-700":"text-gray-300"),viewBox:"0 0 8 5",fill:"currentColor",children:/* @__PURE__ */h("path",{d:"M4 5L0 0h8z"})})]})}function w(e,t=!1){const r=t?"":" whitespace-nowrap";return e.code?`font-mono${r}`:e.numeric?`tabular-nums${r}`:""}function x({columns:x,data:v,rowKey:k,sort:N=null,onSortChange:C,pagination:j,caption:M,loading:B=!1,bordered
|
|
5
|
-
return h("th",{scope:"col",...
|
|
4
|
+
/* @__PURE__ */h("svg",{className:"h-2 w-2 "+("desc"===e?"text-gray-700":"text-gray-300"),viewBox:"0 0 8 5",fill:"currentColor",children:/* @__PURE__ */h("path",{d:"M4 5L0 0h8z"})})]})}function w(e,t=!1){const r=t?"":" whitespace-nowrap";return e.code?`font-mono${r}`:e.numeric?`tabular-nums${r}`:""}function x({columns:x,data:v,rowKey:k,sort:N=null,onSortChange:C,pagination:j,caption:M,loading:B=!1,bordered:$=!1,size:S="md",minWidth:z,rowClassName:H,onRow:T,rowHref:I,onRowPress:D,linkAs:K,emptyText:L,selection:O,footer:P,virtualized:A,stackOnNarrow:E=!1,stackBelow:F,className:W=""}){const R=s(),V=L??R.table.empty,Q=(e,t)=>"function"==typeof k?k(e,t):String(e[k]),Y=E&&!A,Z=Y?x:x.flatMap(e=>{if(!m(e))return"stacked"===e.only?[]:[e];const t=e.columns.filter(e=>"stacked"!==e.only);return t.length?[{...e,columns:t}]:[]}),G=e=>Y?{role:e}:{},J=(e,t)=>(t??("string"==typeof e||"number"==typeof e?String(e):"")).trim()||void 0,[U,q]=a(0),X=A?.overscan??6,_=A?e=>{const t=Math.max(0,Math.floor(e.currentTarget.scrollTop/A.rowHeight)-X);q(e=>e===t?e:t)}:void 0,ee=A?Math.ceil(A.height/A.rowHeight)+2*X:v.length,te=A?Math.min(U,Math.max(0,v.length-ee)):0,re=Math.min(v.length,te+ee),oe=A?te*A.rowHeight:0,ne=A?(v.length-re)*A.rowHeight:0,le=i(null),[se,ae]=a(0);l(()=>{if(!A)return;const e=le.current?.offsetHeight??0;ae(t=>t===e?t:e)});const ie=e=>e.sortField??e.key,ce=e=>N&&N.field===ie(e)?N.direction:null,de=Z.flatMap(e=>m(e)?e.columns:[e]),he=Z.some(m),ue=/* @__PURE__ */new Map;if(Y)for(const e of Z)if(m(e))for(const t of e.columns)ue.set(t,J(e.title,e.label));const me=e=>{const t=J(e.title,e.label),r=ue.get(e);return t&&r?`${r} · ${t}`:t},ge=new Set(O?.selected??[]),fe=O?v.map((e,t)=>Q(e,t)):[],pe=fe.length>0&&fe.every(e=>ge.has(e)),ye=fe.some(e=>ge.has(e)),be=O?36:0,we=de.length+(O?1:0),xe=de.some(e=>"left"===e.fixed),ve=Y&&!O&&de.some(e=>e.cardCorner),ke=K??"a",Ne=`${p[S]} ${"sm"===S?"text-xs":"text-sm"}`,Ce=(e,t)=>e.ellipsis?/* @__PURE__ */h("span",{className:"block w-0 min-w-full",children:t}):t,je=(e,t,n,l=0)=>{const s=ce(e),a=y[e.align??(e.numeric?"right":"left")],i="left"===e.fixed,d=!(!e.sortable||!C);/* @__PURE__ */
|
|
5
|
+
return h("th",{scope:"col",...G("columnheader"),rowSpan:n>1?n:void 0,"aria-sort":"asc"===s?"ascending":"desc"===s?"descending":d?"none":void 0,style:{width:e.width,...i?{left:(Be[t]??0)+be}:{},...A?{top:l}:{}},className:[Ne,a,r,"font-semibold uppercase tracking-wide text-gray-500","sm"===S?"text-2xs":"text-xs",i?A?"sticky z-20 bg-gray-50":"sticky z-10 bg-gray-50":A?"sticky z-10 bg-gray-50":"",Y&&d?"rosh-dt-sort":"",Y?g(e):"",e.headerClassName??""].filter(Boolean).join(" "),children:Ce(e,d?/* @__PURE__ */c("button",{type:"button",onClick:()=>(e=>{if(!C)return;const t=ie(e),r=ce(e),o=e.sortFirst??"asc";C(null===r?{field:t,direction:o}:r===o?{field:t,direction:"asc"===o?"desc":"asc"}:null)})(e),"data-group":Y?ue.get(e):void 0,className:`inline-flex max-w-full items-center font-semibold uppercase tracking-wide hover:text-gray-700 ${a}`,children:[
|
|
6
6
|
/* @__PURE__ */h(o,{children:e.title}),
|
|
7
|
-
/* @__PURE__ */h(b,{direction:s})]}):/* @__PURE__ */h(o,{children:e.title}))},e.key)};let Me=0;const Be=de.map(e=>{if("left"!==e.fixed)return null;const t=Me;return Me+=e.width??0,t})
|
|
8
|
-
/* @__PURE__ */c("div",{onScroll:_,style:
|
|
7
|
+
/* @__PURE__ */h(b,{direction:s})]}):/* @__PURE__ */h(o,{children:e.title}))},e.key)};let Me=0;const Be=de.map(e=>{if("left"!==e.fixed)return null;const t=Me;return Me+=e.width??0,t}),$e=/* @__PURE__ */c(d,{children:[
|
|
8
|
+
/* @__PURE__ */c("div",{onScroll:_,style:A?{maxHeight:A.height}:void 0,className:`relative overflow-x-auto ${A?"overflow-y-auto":""} ${$?"rounded-lg border border-gray-200":""}${Y?" rosh-dt-scroll":""}`.trim(),children:[B&&
|
|
9
9
|
/* @__PURE__ */c("div",{className:"absolute inset-0 z-20 flex items-start justify-center bg-white/60 pt-8",role:"status","aria-live":"polite",children:[
|
|
10
10
|
/* @__PURE__ */h(n,{className:"h-6 w-6"}),
|
|
11
|
-
/* @__PURE__ */h("span",{className:"sr-only",children:
|
|
12
|
-
/* @__PURE__ */c("table",{...
|
|
13
|
-
/* @__PURE__ */c("thead",{...
|
|
14
|
-
/* @__PURE__ */c("tr",{ref:le,...
|
|
15
|
-
/* @__PURE__ */h("tbody",{...
|
|
16
|
-
return c("tr",{...u(n),...
|
|
17
|
-
return h("td",{...
|
|
18
|
-
return h("td",{...
|
|
19
|
-
/* @__PURE__ */h("span",{className:["rosh-dt-value",w(e,!0)].filter(Boolean).join(" "),children:o}):o},e.key)})]},
|
|
20
|
-
return h("div",Y?void 0!==
|
|
11
|
+
/* @__PURE__ */h("span",{className:"sr-only",children:R.table.loading})]}),
|
|
12
|
+
/* @__PURE__ */c("table",{...G("table"),className:(Y?"rosh-dt-table ":"")+"w-full border-collapse tabular-nums",style:z?{minWidth:z}:void 0,children:[M&&/* @__PURE__ */h("caption",{className:"sr-only",children:M}),
|
|
13
|
+
/* @__PURE__ */c("thead",{...G("rowgroup"),className:Y?"rosh-dt-head":void 0,children:[
|
|
14
|
+
/* @__PURE__ */c("tr",{ref:le,...G("row"),className:"border-b border-gray-200 bg-gray-50",children:[O&&/* @__PURE__ */h("th",{scope:"col",...G("columnheader"),rowSpan:he?2:void 0,style:{width:36,...A?{top:0}:{}},className:[Ne,r,xe||A?"sticky z-20 bg-gray-50":"",xe?"left-0":"",Y?"rosh-dt-select":""].filter(Boolean).join(" "),children:/* @__PURE__ */h(e,{"aria-label":R.table.selectAll,checked:pe,indeterminate:ye&&!pe,onChange:()=>{if(!O)return;const e=new Set(fe);O.onChange(pe?O.selected.filter(t=>!e.has(t)):[...O.selected,...fe.filter(e=>!ge.has(e))])}})}),Z.map((e,t)=>m(e)?/* @__PURE__ */h("th",{scope:"colgroup",...G("columnheader"),colSpan:e.columns.length,style:A?{top:0}:void 0,className:[Ne,"text-center",r,"font-semibold uppercase tracking-wide text-gray-500","sm"===S?"text-2xs":"text-xs","border-b border-gray-200",A?"sticky z-10 bg-gray-50":"",e.headerClassName??""].filter(Boolean).join(" "),children:/* @__PURE__ */h(o,{children:e.title})},e.key??`group-${t}`):je(e,de.indexOf(e),he?2:1))]}),he&&/* @__PURE__ */h("tr",{...G("row"),className:"border-b border-gray-200 bg-gray-50",children:Z.flatMap(e=>m(e)?e.columns:[]).map(e=>je(e,de.indexOf(e),1,se))})]}),
|
|
15
|
+
/* @__PURE__ */h("tbody",{...G("rowgroup"),className:Y?"rosh-dt-body":void 0,children:0!==v.length||B?/* @__PURE__ */c(d,{children:[oe>0&&/* @__PURE__ */h("tr",{"aria-hidden":"true",children:/* @__PURE__ */h("td",{colSpan:we,style:{height:oe,padding:0,border:0}})}),v.slice(te,re).map((t,r)=>{const o=te+r,n=T?.(t,o),l=!!n?.current,s=I?.(t,o),a=void 0===s&&D?()=>D(t,o):void 0,i=void 0!==s||void 0!==a;let d=!1;const m=(e,t)=>{if(d=!0,!i)return e;const r=[f,a?"cursor-pointer text-left":"",t?.className??""].filter(Boolean).join(" "),o=l?"true":void 0;return void 0!==s?/* @__PURE__ */h(ke,{href:s,className:r,"aria-current":o,children:e}):/* @__PURE__ */h("button",{type:"button",onClick:a,className:r,"aria-current":o,children:e})},p=de.map(e=>e.render?e.render(t,o,m):e.dataIndex?t[e.dataIndex]:null);if(i&&!d){const e=de.findIndex(e=>"stacked"!==e.only&&!e.cardCorner),t=de.findIndex(e=>"wide"!==e.only&&!e.cardCorner);for(const r of/* @__PURE__ */new Set([e,t]))r>=0&&(p[r]=m(p[r]))}const b=e=>e?t=>{t.currentTarget.contains(t.relatedTarget)||e()}:void 0;/* @__PURE__ */
|
|
16
|
+
return c("tr",{...u(n),...G("row"),style:A?{height:A.rowHeight}:void 0,onClick:n?.onClick,onMouseEnter:n?.onMouseEnter,onMouseLeave:n?.onMouseLeave,onFocus:b(n?.onFocus),onBlur:b(n?.onBlur),"aria-current":l&&!i?"true":void 0,...n?.onClick?{tabIndex:0,onKeyDown:e=>{e.target===e.currentTarget&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),n.onClick?.()))}}:{},className:[Y?O?"rosh-dt-row rosh-dt-row-select":"rosh-dt-row":"",Y&&ve?"rosh-dt-row-corner":"","border-b border-gray-100 last:border-b-0",n?.onClick?"cursor-pointer hover:bg-gray-50 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"",i?"rosh-dt-linked hover:bg-gray-50":"",l?"rosh-dt-current":"",H?.(t,o)??"",n?.className??""].filter(Boolean).join(" "),children:[O&&(()=>{const r=Q(t,o);/* @__PURE__ */
|
|
17
|
+
return h("td",{...G("cell"),style:{width:36},onClick:e=>e.stopPropagation(),className:[Ne,xe?"sticky left-0 z-10 bg-white":"",Y?"rosh-dt-select":""].filter(Boolean).join(" "),children:/* @__PURE__ */h(e,{"aria-label":R.table.selectRow,checked:ge.has(r),onChange:()=>(e=>{O&&O.onChange(ge.has(e)?O.selected.filter(t=>t!==e):[...O.selected,e])})(r)})})})(),de.map((e,t)=>{const r="left"===e.fixed,o=p[t],n=ve&&!!e.cardCorner,l=Y&&!n&&"wide"!==e.only;/* @__PURE__ */
|
|
18
|
+
return h("td",{...G("cell"),"data-label":l?me(e):void 0,style:r?{left:(Be[t]??0)+be}:void 0,className:[l?e.ellipsis?"rosh-dt-cell rosh-dt-clip":"rosh-dt-cell":"",n?"rosh-dt-corner":"",Y?g(e):"",Ne,y[e.align??(e.numeric?"right":"left")],Y?"":w(e),"text-gray-900",e.ellipsis?"max-w-0 truncate":"",r?"sticky z-10 bg-white":"",e.className??""].filter(Boolean).join(" "),children:Y?
|
|
19
|
+
/* @__PURE__ */h("span",{className:["rosh-dt-value",w(e,!0)].filter(Boolean).join(" "),children:o}):o},e.key)})]},Q(t,o))}),ne>0&&/* @__PURE__ */h("tr",{"aria-hidden":"true",children:/* @__PURE__ */h("td",{colSpan:we,style:{height:ne,padding:0,border:0}})})]}):/* @__PURE__ */h("tr",{...G("row"),className:Y?"rosh-dt-empty":void 0,children:/* @__PURE__ */h("td",{...G("cell"),colSpan:we,className:`${Ne} py-10 text-center text-gray-500`,children:V})})})]}),P]}),j&&j.pageCount>1&&/* @__PURE__ */h("div",{className:Y?"rosh-dt-pager mt-3 flex justify-end":"mt-3 flex justify-end",children:/* @__PURE__ */h(t,{page:j.page,pageCount:j.pageCount,onPageChange:j.onPageChange})})]});/* @__PURE__ */
|
|
20
|
+
return h("div",Y?void 0!==F&&F>0&&40!==F?{className:`rosh-dt-at ${W}`.trim(),children:/* @__PURE__ */h("div",{className:"rosh-dt-stack",style:{width:40/F*100+"%"},children:/* @__PURE__ */h("div",{className:"rosh-dt-fit",style:{width:F/40*100+"%"},children:$e})})}:{className:`rosh-dt-stack ${W}`.trim(),children:$e}:{className:W,children:$e})}export{x as DataTable};
|