efficient-shell 9.9.0 → 9.10.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/dist/{Browser-ZPOVP4Z7.js → Browser-VUQISZ2Z.js} +14 -14
- package/dist/Calculator-IZXBE6R7.js +29 -0
- package/dist/{CurrencyConverter-SSR2XDIC.js → CurrencyConverter-AW7BB3DD.js} +8 -8
- package/dist/{Documents-T7JYO223.js → Documents-WPTBUSKV.js} +7 -7
- package/dist/{Files-HBGW3JWI.js → Files-IZ6N6SG6.js} +31 -31
- package/dist/{Notepad-GO2QT55C.js → Notepad-VRQH524R.js} +10 -10
- package/dist/{PdfViewer-XSISAJZP.js → PdfViewer-FFQOKKFW.js} +1 -1
- package/dist/{PomodoroTimer-EV6D4OFU.js → PomodoroTimer-5VCWY4QT.js} +25 -25
- package/dist/{Preview-Z2CRCDHA.js → Preview-SP3WIE54.js} +11 -11
- package/dist/Sidebar-PUXP2DFI.js +43 -0
- package/dist/{Spreadsheet-GEE77GD3.js → Spreadsheet-4U4ABNE2.js} +11 -11
- package/dist/{Stock-6ZIQHGPH.js → Stock-2VWS2IQJ.js} +4 -4
- package/dist/{Weather-II7NFRMK.js → Weather-4MEYBP4D.js} +18 -18
- package/dist/{WorldClock-NBLNO63Q.js → WorldClock-Y4YRJ43F.js} +6 -6
- package/dist/ai/index.js +56 -53
- package/dist/ai.css +1 -1
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/CartesianPlot.d.ts +24 -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.d.ts +4 -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/SpecChart.js +1 -1
- package/dist/charts/StatTile.js +1 -1
- package/dist/charts/SunburstChart.js +1 -1
- package/dist/charts/TimeSeriesChart.d.ts +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/charts/types.d.ts +35 -1
- package/dist/{chunk-7WGOLPGM.js → chunk-2AHLONPR.js} +1 -1
- package/dist/{chunk-2MLRK7IO.js → chunk-2GPHHW7C.js} +4 -4
- package/dist/{chunk-P3OBE43Q.js → chunk-2LDOLQ7F.js} +6 -6
- package/dist/{chunk-EFFF3FCS.js → chunk-2SJDTKQA.js} +19 -19
- package/dist/{chunk-DZTAGMNY.js → chunk-2XBJNB7D.js} +34 -34
- package/dist/{chunk-HQMN5THW.js → chunk-3FBYM6O5.js} +14 -14
- package/dist/{chunk-EXNAAHN4.js → chunk-3MHBALGV.js} +2 -2
- package/dist/{chunk-CJB73MHF.js → chunk-3XRBVYTO.js} +2 -2
- package/dist/{chunk-BVTNGW5S.js → chunk-46YVA2BF.js} +1 -1
- package/dist/chunk-4CPE5NBC.js +8 -0
- package/dist/{chunk-CO5RKOVX.js → chunk-4DBPKTVX.js} +16 -16
- package/dist/{chunk-DNWV6N4P.js → chunk-4SZ3NNVF.js} +1 -1
- package/dist/{chunk-XD34TCRG.js → chunk-4XZXY2AF.js} +1 -1
- package/dist/{chunk-5JRL5LXD.js → chunk-5AWV5R6E.js} +6 -6
- package/dist/{chunk-PYLNMN6E.js → chunk-5CVQN2BR.js} +8 -8
- package/dist/{chunk-RWJCKZEY.js → chunk-5Q3PFKB5.js} +1 -1
- package/dist/{chunk-LUWRPPJA.js → chunk-5R6RNUDB.js} +5 -5
- package/dist/{chunk-WUKN5WUM.js → chunk-5RAOFJYT.js} +6 -6
- package/dist/{chunk-WFHYU66E.js → chunk-5VYBPDZ2.js} +1 -1
- package/dist/{chunk-ZAU2HIRH.js → chunk-5XNN2SSR.js} +4 -4
- package/dist/{chunk-O5LQBBW2.js → chunk-5Y6LGPZI.js} +7 -7
- package/dist/{chunk-ZYDZY6ED.js → chunk-5Y7JITHW.js} +1 -1
- package/dist/{chunk-3APSMJPN.js → chunk-64R3IYAM.js} +1 -1
- package/dist/{chunk-Z3JW77LH.js → chunk-65DYHG73.js} +1 -1
- package/dist/{chunk-5VOVNIOU.js → chunk-6O2W4X2V.js} +1 -1
- package/dist/{chunk-VVGL5O4F.js → chunk-6TRE326A.js} +6 -6
- package/dist/{chunk-ZTL2RPNY.js → chunk-73W7537K.js} +1 -1
- package/dist/{chunk-GS5AISRS.js → chunk-7IC4JMFA.js} +4 -4
- package/dist/{chunk-OV2SWQPT.js → chunk-7JJUI52C.js} +1 -1
- package/dist/{chunk-IMOPDLMA.js → chunk-7WLFHDWA.js} +1 -1
- package/dist/chunk-7YZJLFAK.js +11 -0
- package/dist/{chunk-56RAOI7O.js → chunk-AG63JVX7.js} +6 -6
- package/dist/{chunk-WH3JHMEA.js → chunk-AGETTWMK.js} +1 -1
- package/dist/{chunk-6MVHRNWC.js → chunk-BF7PZFKT.js} +1 -1
- package/dist/{chunk-IJWFKUYA.js → chunk-BJONHLET.js} +4 -4
- package/dist/{chunk-B4KMHEFZ.js → chunk-BNKULSCG.js} +1 -1
- package/dist/{chunk-RULVWW4A.js → chunk-BRHKQMRH.js} +6 -6
- package/dist/{chunk-VG2R6PZV.js → chunk-BYHKYYL6.js} +1 -1
- package/dist/{chunk-DLNYXXNE.js → chunk-CB6ROWOC.js} +2 -2
- package/dist/chunk-CBMXYXBH.js +15 -0
- package/dist/{chunk-BZBMZDLD.js → chunk-CFO54C3H.js} +1 -1
- package/dist/{chunk-P3Y5RFI4.js → chunk-CJI3POCE.js} +2 -2
- package/dist/{chunk-GVC535IA.js → chunk-D4KZOYXQ.js} +1 -1
- package/dist/chunk-D7JY2KHG.js +7 -0
- package/dist/{chunk-PDXPMHG3.js → chunk-DRNB7KDC.js} +1 -1
- package/dist/{chunk-U4OGRIP6.js → chunk-DWSCYYDM.js} +1 -1
- package/dist/{chunk-U5N6PSXO.js → chunk-E6EUGQGA.js} +5 -5
- package/dist/{chunk-N3JXHNID.js → chunk-E72USUUR.js} +10 -10
- package/dist/{chunk-C4UL2UNR.js → chunk-EOWOVR55.js} +1 -1
- package/dist/{chunk-CE5BARZI.js → chunk-EWJELWIT.js} +3 -3
- package/dist/{chunk-OQ2EDMB2.js → chunk-FEPBXJUR.js} +1 -1
- package/dist/{chunk-BWUU565Y.js → chunk-FKA6ZVQO.js} +9 -9
- package/dist/{chunk-QZKWIVZW.js → chunk-FNSVXN7B.js} +1 -1
- package/dist/{chunk-CRXFSN5K.js → chunk-G6LOKIFC.js} +11 -11
- package/dist/chunk-GCB5S2OI.js +8 -0
- package/dist/{chunk-LNQVTH5S.js → chunk-GP5UNEKY.js} +1 -1
- package/dist/{chunk-EW3L4W2I.js → chunk-GVAWCTJN.js} +8 -8
- package/dist/{chunk-X7PM7JOD.js → chunk-H2XCQJRG.js} +1 -1
- package/dist/{chunk-FBUUXK5G.js → chunk-H4YFANH5.js} +1 -1
- package/dist/chunk-HHOXLECO.js +29 -0
- package/dist/{chunk-442FFHQJ.js → chunk-HRAK46H7.js} +12 -12
- package/dist/chunk-HSTIEPLI.js +1 -0
- package/dist/chunk-I5XVZLDH.js +14 -0
- package/dist/{chunk-NWCW22U6.js → chunk-IBIUI2D3.js} +2 -2
- package/dist/{chunk-CXMTDYVI.js → chunk-IENPHB5B.js} +1 -1
- package/dist/{chunk-FLQZ7GQ3.js → chunk-IEPSBXMU.js} +12 -12
- package/dist/{chunk-LAEXWXJA.js → chunk-IUWAMMDN.js} +3 -3
- package/dist/{chunk-B6YOP2IX.js → chunk-IVY7CCTS.js} +3 -3
- package/dist/{chunk-JKDEE35P.js → chunk-IZQ3XTD2.js} +1 -1
- package/dist/chunk-J7OKOVSL.js +11 -0
- package/dist/{chunk-IB4333CI.js → chunk-JECMVR4S.js} +7 -7
- package/dist/{chunk-6ZHX56NM.js → chunk-JQDRM6UK.js} +1 -1
- package/dist/{chunk-QC6OK3ED.js → chunk-JVYSRH6U.js} +1 -1
- package/dist/{chunk-5VRMQTKV.js → chunk-KAHYUBXM.js} +7 -7
- package/dist/{chunk-YWGC7J6B.js → chunk-KECOZKJU.js} +7 -7
- package/dist/{chunk-JIW5CJXC.js → chunk-KOSV4UPK.js} +2 -2
- package/dist/{chunk-NHVXVHUR.js → chunk-KQSUSVMF.js} +17 -17
- package/dist/{chunk-BBEOFKLY.js → chunk-KTRNAMHY.js} +1 -1
- package/dist/chunk-LFPJ263N.js +6 -0
- package/dist/{chunk-F4DIVARP.js → chunk-LYX55RI3.js} +1 -1
- package/dist/{chunk-XZYAFTW4.js → chunk-M5MAIJQQ.js} +4 -4
- package/dist/{chunk-XNWQ72WA.js → chunk-MCMUJDEP.js} +1 -1
- package/dist/{chunk-ZOHQVSB3.js → chunk-MUHWI4GK.js} +12 -12
- package/dist/chunk-N3CTLEJS.js +9 -0
- package/dist/{chunk-HJWTWS5E.js → chunk-N52D37FS.js} +5 -5
- package/dist/chunk-NBKQADMY.js +9 -0
- package/dist/{chunk-P4XTWAKJ.js → chunk-NCRLKFXD.js} +1 -1
- package/dist/{chunk-43ONX6UZ.js → chunk-NGQHXTUK.js} +1 -1
- package/dist/{chunk-SOP447EP.js → chunk-NRGBXEBU.js} +1 -1
- package/dist/{chunk-JS6ZSEZJ.js → chunk-O426Q7KC.js} +1 -1
- package/dist/{chunk-CAG3TSV2.js → chunk-O4NPQ23Q.js} +1 -1
- package/dist/{chunk-ZHHEMSOD.js → chunk-ODOEH5QZ.js} +2 -2
- package/dist/{chunk-ENL5L6NR.js → chunk-P65C5TUU.js} +1 -1
- package/dist/chunk-PEM7UXQ3.js +1 -0
- package/dist/chunk-PTA7A7GF.js +22 -0
- package/dist/{chunk-FLEG5KP5.js → chunk-PWBLGKQ3.js} +5 -5
- package/dist/chunk-QCFN3ET4.js +9 -0
- package/dist/{chunk-F7F6Z64G.js → chunk-QLOKT22X.js} +1 -1
- package/dist/{chunk-IK2WXW2E.js → chunk-QLYOGT3U.js} +13 -13
- package/dist/{chunk-N7T63BVD.js → chunk-QMYQ4B5A.js} +3 -3
- package/dist/{chunk-EWVOGTEX.js → chunk-QSUQC4AN.js} +1 -1
- package/dist/{chunk-BGRT775Y.js → chunk-QYJQAY6C.js} +2 -2
- package/dist/{chunk-M5GMIQ47.js → chunk-R7JTTKG2.js} +3 -3
- package/dist/{chunk-Y44ABEW3.js → chunk-REGXKU74.js} +1 -1
- package/dist/{chunk-AGUA3O5O.js → chunk-RLLONZJJ.js} +1 -1
- package/dist/chunk-RSHNWBW2.js +4 -0
- package/dist/chunk-SC6HJBQA.js +8 -0
- package/dist/{chunk-OUSKOWNP.js → chunk-SGR4V5YI.js} +3 -3
- package/dist/{chunk-CVNJSD2J.js → chunk-T2ITXX7R.js} +6 -6
- package/dist/chunk-T76X2SHR.js +4 -0
- package/dist/{chunk-ARWMJSQJ.js → chunk-T7O2TNNX.js} +1 -1
- package/dist/chunk-TBLN4MDQ.js +6 -0
- package/dist/{chunk-ANFLQSGX.js → chunk-TQH6E5V2.js} +1 -1
- package/dist/{chunk-KEK47CP3.js → chunk-TRUPMMDJ.js} +9 -9
- package/dist/{chunk-L67VXJMF.js → chunk-UL4G6JY2.js} +1 -1
- package/dist/chunk-UYDP4DK3.js +9 -0
- package/dist/{chunk-E4E7MACR.js → chunk-UZGVIHFI.js} +14 -14
- package/dist/{chunk-DWBZ3Z34.js → chunk-V5QEPNPK.js} +2 -2
- package/dist/{chunk-MV6WDGB6.js → chunk-VANJPZ3H.js} +1 -1
- package/dist/{chunk-VVAJ23SD.js → chunk-VBNA237H.js} +1 -1
- package/dist/{chunk-24K6GVNM.js → chunk-VR4GSAFM.js} +17 -17
- package/dist/{chunk-2R3BVU75.js → chunk-VZV7Q5V2.js} +1 -1
- package/dist/{chunk-IJIESSTX.js → chunk-WIOG2NOJ.js} +5 -5
- package/dist/{chunk-BCUQXILM.js → chunk-WZQCRTXF.js} +1 -1
- package/dist/chunk-X4BKHXU5.js +9 -0
- package/dist/{chunk-UKDJUYIV.js → chunk-XI45TSEK.js} +1 -1
- package/dist/{chunk-MWIT4UN2.js → chunk-XREN3AKD.js} +9 -9
- package/dist/{chunk-IGNZULKG.js → chunk-YBU7NOD7.js} +1 -1
- package/dist/{chunk-QSJR7EI7.js → chunk-YQB5OYDC.js} +1 -1
- package/dist/{chunk-TVL3JPMY.js → chunk-YWR2WRDR.js} +1 -1
- package/dist/{chunk-2HEJDLPP.js → chunk-ZA6S5XVM.js} +2 -2
- package/dist/{chunk-K4D63NP3.js → chunk-ZC3CCRPG.js} +7 -7
- package/dist/{chunk-IPTCV6CQ.js → chunk-ZPW3KQ27.js} +30 -30
- package/dist/data/DataTable.js +1 -1
- package/dist/data/Kanban.js +1 -1
- package/dist/data/ListFooter.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/Pagination.js +1 -1
- package/dist/file-intake/index.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Calendar.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DatePicker.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DateTimePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/FormErrorSummary.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/ImageFocusPoint.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/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/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.js +1 -1
- package/dist/forms/mediaMoveItems.js +1 -1
- package/dist/forms/textAlign.js +1 -1
- package/dist/forms/useFileIntake.js +1 -1
- package/dist/hooks/useTheme.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +139 -139
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +7 -7
- 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/CountBadge.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.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/ItemCount.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/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/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/language.js +1 -1
- package/dist/shell/strings.d.ts +6 -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.d.ts +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.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-CSYRZAS5.js +0 -29
- package/dist/Sidebar-Y4DTQYW2.js +0 -43
- package/dist/chunk-6453ISTQ.js +0 -4
- package/dist/chunk-6FEL5D56.js +0 -8
- package/dist/chunk-AC373WIU.js +0 -8
- package/dist/chunk-BZG5E7GF.js +0 -6
- package/dist/chunk-D7IXMMZT.js +0 -9
- package/dist/chunk-FKNJSD6B.js +0 -14
- package/dist/chunk-G6CTTBKE.js +0 -9
- package/dist/chunk-HEEY4TVP.js +0 -8
- package/dist/chunk-HUF34LSW.js +0 -15
- package/dist/chunk-IX6QMUJQ.js +0 -9
- package/dist/chunk-KWT6GT4M.js +0 -29
- package/dist/chunk-L4TN4EWK.js +0 -1
- package/dist/chunk-MG7A3R75.js +0 -1
- package/dist/chunk-OX2DOOOI.js +0 -8
- package/dist/chunk-PDB5W7VI.js +0 -6
- package/dist/chunk-Q7KTTDUS.js +0 -11
- package/dist/chunk-QWHQJNKL.js +0 -1
- package/dist/chunk-QXWY3CJ2.js +0 -11
- package/dist/chunk-RC6UHOAV.js +0 -4
- package/dist/chunk-WE7CYRZT.js +0 -7
- package/dist/chunk-XI4HKNFI.js +0 -19
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-FSPFV4MI.js";import{useShellStrings as t}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-FSPFV4MI.js";import{useShellStrings as t}from"./chunk-PEM7UXQ3.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,2 +1,2 @@
|
|
|
1
|
-
import{ChartTooltip as t}from"./chunk-TLRCTNUF.js";import{CartesianPlot as o}from"./chunk-
|
|
2
|
-
return l(o,{labels:
|
|
1
|
+
import{ChartTooltip as t}from"./chunk-TLRCTNUF.js";import{CartesianPlot as o}from"./chunk-4CPE5NBC.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-PEM7UXQ3.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 C=e().charts,L=i(),N=d??(t=>Number.isInteger(t)?m(t,L):n(t,1,L)),v=x??(t=>m(t,L)),w=g??C.countAxis,A=k??C.distribution,M=h??r(c??[],s),P=a(0,b,f),R=M.map(t=>N(t.from)),T=M.map(t=>t.count);/* @__PURE__ */
|
|
2
|
+
return l(o,{labels:R,values:T,height:u,width:p,bandPadding:0,xTickAnchor:"start",formatValue:v,yAxisLabel:w,className:y,emptyLabel:j,ariaLabel:C.histogram(A,M.length,(c??[]).length),tooltip:o=>/* @__PURE__ */l(t,{title:`${N(M[o].from)} – ${N(M[o].to)}`,rows:[{key:"count",label:C.observations,color:P,value:v(M[o].count)}]}),children:({x:t,y:o,bottom:r,active:a})=>/* @__PURE__ */l("g",{children:M.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:P,fillOpacity:null===a||a===i?.85:.42},i))})})}export{c as HistogramChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Popover as e}from"./chunk-7JGR7WPD.js";import{IconButton_default as r}from"./chunk-RUTUVS4H.js";import{Icon as n}from"./chunk-FSPFV4MI.js";import{Tooltip as a}from"./chunk-BCDG4N6L.js";import{useShellStrings as l}from"./chunk-
|
|
2
|
-
return i(e,{className:v,disabled:f,triggerLabel:j?b.button(d,
|
|
1
|
+
import{Popover as e}from"./chunk-7JGR7WPD.js";import{IconButton_default as r}from"./chunk-RUTUVS4H.js";import{Icon as n}from"./chunk-FSPFV4MI.js";import{Tooltip as a}from"./chunk-BCDG4N6L.js";import{useShellStrings as l}from"./chunk-PEM7UXQ3.js";import{useRef as t}from"react";import{jsx as i,jsxs as o}from"react/jsx-runtime";var s={ArrowLeft:[0,-1],ArrowRight:[0,1],ArrowUp:[-1,0],ArrowDown:[1,0]};function c({value:c,onChange:m,options:u,label:d,emptyValue:h,columns:p=5,disabled:f=!1,className:v=""}){const g=l(),b=g.iconPicker,x=g.iconNames,N=e=>e.label??x[e.value]??e.value,w=t([]),k=Math.max(0,u.findIndex(e=>e.value===c)),j=u[k],A=j?.value===h,C=t(null);/* @__PURE__ */
|
|
2
|
+
return i(e,{className:v,disabled:f,triggerLabel:j?b.button(d,N(j)):d,"aria-label":d,initialFocus:C,panelClassName:"!p-2",trigger:/* @__PURE__ */o("span",{className:"inline-flex items-center gap-2",children:[/* @__PURE__ */i("span",A||!j?{className:"text-sm",children:j?N(j):""}:{"aria-hidden":"true",className:"inline-flex [&_svg]:h-4 [&_svg]:w-4",children:j.icon}),
|
|
3
3
|
/* @__PURE__ */i(n,{name:"chevron-down",className:"h-4 w-4"})]}),children:({close:e})=>/* @__PURE__ */i("div",{role:"listbox","aria-label":d,className:"grid gap-1",style:{gridTemplateColumns:`repeat(${p}, 2rem)`},children:u.map((n,l)=>{const t=n.value===c;/* @__PURE__ */
|
|
4
|
-
return i(a,{content:
|
|
4
|
+
return i(a,{content:N(n),children:/* @__PURE__ */i(r,{ref:e=>{w.current[l]=e,l===k&&(C.current=e)},role:"option","aria-selected":t,"aria-label":N(n),pressed:t,tabIndex:l===k?0:-1,onKeyDown:e=>((e,r)=>{const n=s[r.key];if(!n)return;r.preventDefault();const a=Math.floor(e/p)+n[0],l=e%p+n[1];if(a<0||l<0||l>=p)return;const t=a*p+l;if(!(t>=u.length)){for(const[e,r]of w.current.entries())r?.setAttribute("tabindex",e===t?"0":"-1");w.current[t]?.focus()}})(l,e),onClick:()=>{m(n.value),e()},children:/* @__PURE__ */i("span",{"aria-hidden":"true",className:"inline-flex [&_svg]:h-4 [&_svg]:w-4",children:n.icon})})},n.value)})})})}export{c as IconPicker};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{InputNumber_default as e}from"./chunk-
|
|
1
|
+
import{InputNumber_default as e}from"./chunk-ODOEH5QZ.js";import{IconButton_default as a}from"./chunk-RUTUVS4H.js";import{Icon as r}from"./chunk-FSPFV4MI.js";import{Tooltip as i}from"./chunk-BCDG4N6L.js";import{jsx as t,jsxs as n,Fragment as o}from"react/jsx-runtime";var d="h-3.5 w-3.5",s={padding:{top:/* @__PURE__ */t(r,{name:"padding-top","aria-hidden":"true",className:d}),right:/* @__PURE__ */t(r,{name:"padding-right","aria-hidden":"true",className:d}),bottom:/* @__PURE__ */t(r,{name:"padding-bottom","aria-hidden":"true",className:d}),left:/* @__PURE__ */t(r,{name:"padding-left","aria-hidden":"true",className:d}),vertical:/* @__PURE__ */t(r,{name:"padding-y","aria-hidden":"true",className:d}),horizontal:/* @__PURE__ */t(r,{name:"padding-left-right","aria-hidden":"true",className:d})},crop:{top:/* @__PURE__ */t(r,{name:"crop-top","aria-hidden":"true",className:d}),right:/* @__PURE__ */t(r,{name:"crop-right","aria-hidden":"true",className:d}),bottom:/* @__PURE__ */t(r,{name:"crop-bottom","aria-hidden":"true",className:d}),left:/* @__PURE__ */t(r,{name:"crop-left","aria-hidden":"true",className:d}),vertical:/* @__PURE__ */t(r,{name:"crop-y","aria-hidden":"true",className:d}),horizontal:/* @__PURE__ */t(r,{name:"crop-left-right","aria-hidden":"true",className:d})}},l=/* @__PURE__ */t(r,{name:"sides-each","aria-hidden":"true",className:"h-4 w-4"});var m=(e,a,r)=>null===e[r]?a[r]:String(e[r]);function c(e,a){const r=r=>m(e,a,r);return r("left")!==r("right")||r("top")!==r("bottom")}function h({label:a,value:r,onChange:i,each:d,placeholder:l,words:c,min:h=0,max:p=200,step:u=4,readOnly:g,glyphs:f="padding"}){const b=s[f],N=(a,n,o)=>{const d=function(e,a){const r=a.map(a=>e[a]);return r.every(e=>e===r[0])?r[0]:"mixed"}(r,a),s=a.map(e=>m(r,l,e)),f="mixed"!==d&&s.every(e=>e===s[0])?s[0]:"–";/* @__PURE__ */
|
|
2
2
|
return t("div",{"data-side":a.join("-"),className:"min-w-0",children:/* @__PURE__ */t(e,{value:"mixed"===d?null:d,onChange:e=>((e,a)=>{const t={...r};for(const r of e)t[r]=a;i(t)})(a,e),min:h,max:p,step:u,snap:!0,precision:0,steppers:"compact",readOnly:g,placeholder:f,prefix:o,suffix:c.unit,"aria-label":n})})};/* @__PURE__ */
|
|
3
3
|
return t("div",{role:"group","aria-label":a,"data-sides":d?"each":"pairs",className:"grid min-w-0 grid-cols-2 gap-2",children:/* @__PURE__ */n(o,d?{children:[N(["left"],c.sides.left,b.left),N(["top"],c.sides.top,b.top),N(["right"],c.sides.right,b.right),N(["bottom"],c.sides.bottom,b.bottom)]}:{children:[N(["left","right"],c.horizontal,b.horizontal),N(["top","bottom"],c.vertical,b.vertical)]})})}function p({each:e,onChange:r,label:n,disabled:o}){/* @__PURE__ */
|
|
4
4
|
return t(i,{content:n,children:/* @__PURE__ */t(a,{size:"md","aria-label":n,"aria-pressed":e,disabled:o,onClick:()=>r(!e),children:l})})}export{p as SidesEachToggle,h as SidesInput,c as sidesStartEach};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-FSPFV4MI.js";import{useShellStrings as r}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-FSPFV4MI.js";import{useShellStrings as r}from"./chunk-PEM7UXQ3.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";var s={success:"success",error:"error",warning:"warning",info:"info",404:"info",403:"warning",500:"error"},c={success:"text-green-600 bg-green-100",error:"text-red-600 bg-red-100",warning:"text-amber-600 bg-amber-100",info:"text-blue-600 bg-blue-100"},a={404:e=>e.notFound,403:e=>e.noAccess,500:e=>e.serverError};function i({tone:r}){const t={className:"h-6 w-6",strokeWidth:1.5,"aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
|
|
2
2
|
return n(e,{name:"check",...t});case"error":/* @__PURE__ */
|
|
3
3
|
return n(e,{name:"close",...t});case"warning":/* @__PURE__ */
|
|
4
4
|
return n(e,{name:"error",...t});default:/* @__PURE__ */
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{AccessibleTable as e}from"./chunk-TBPHW42V.js";import{arcPath as t}from"./chunk-VFC6QUEN.js";import{useHighlight as r}from"./chunk-CNYAHYE6.js";import{ChartTooltip as l}from"./chunk-TLRCTNUF.js";import{CHART_INK as a,resolveSeriesColor as n}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as o}from"./chunk-PEM7UXQ3.js";import{formatPlain as h,formatPercent as c}from"./chunk-C3QOHMR6.js";import{useState as u}from"react";import{jsx as s,jsxs as d}from"react/jsx-runtime";function m(e,t,r,l,a,n,i,o){if(l>=8)return;const h=e.reduce((e,t)=>e+p(t,8-l),0);if(h<=0)return;let c=t;e.forEach((e,t)=>{const u=p(e,8-l),s=u/h*r,d=`${i}/${e.key}`,f=0===l?t:a,b=0===l?e.key:n;o.push({id:d,label:e.label,value:u,depth:l,start:c,end:c+s,branch:f,branchKey:b}),e.children?.length&&m(e.children,c,s,l+1,f,b,d,o),c+=s})}function p(e,t){return t>0&&e.children?.length?e.children.reduce((e,r)=>e+p(r,t-1),0):Math.max(0,e.value??0)}function f({nodes:p,size:f=320,innerRadius:b=44,ringGap:v=2,formatValue:k,centerLabel:x,className:g,emptyLabel:y}){const M=i().charts,$=o(),j=k??(e=>h(e,$)),N=y??M.nothingToBreakDown,[w,C]=u(null),{highlighted:E}=r(),L=[];if(m(p,-Math.PI/2,2*Math.PI,0,0,"","",L),0===L.length)/* @__PURE__ */return s("p",{className:`text-sm text-gray-500 ${g??""}`,children:N});const T=Math.max(...L.map(e=>e.depth))+1,F=f/2,P=f/2,R=(f/2-8-b)/T,U=L.filter(e=>0===e.depth).reduce((e,t)=>e+t.value,0),z=e=>`color-mix(in oklab, ${n(e.branch)} ${Math.max(16,100-24*e.depth).toFixed(0)}%, ${a.surface})`,A=e=>null!==w?e.id===w:null===E||e.branchKey===E,B=w?L.find(e=>e.id===w):void 0,H=e=>c(e.value/U*100,1,$);/* @__PURE__ */
|
|
2
|
+
return d("div",{className:`relative ${g??""}`,children:[
|
|
3
|
+
/* @__PURE__ */d("svg",{width:"100%",height:f,viewBox:`0 0 ${f} ${f}`,role:"img","aria-label":M.sunburst(j(U),T),onMouseLeave:()=>C(null),children:[L.map(e=>/* @__PURE__ */s("path",{d:t(F,P,b+e.depth*R+v/2,b+(e.depth+1)*R-v/2,e.start,e.end),fill:z(e),fillOpacity:A(e)?1:.45,stroke:a.surface,strokeWidth:1,onMouseEnter:()=>C(e.id)},e.id)),x&&/* @__PURE__ */s("text",{x:F,y:P+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:a.label,children:x})]}),B&&/* @__PURE__ */s("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */s(l,{title:B.label,rows:[{key:"value",label:M.value,color:z(B),value:j(B.value)},{key:"share",label:M.share,color:a.muted,value:H(B)}]})}),
|
|
4
|
+
/* @__PURE__ */s(e,{caption:M.sunburst(j(U),T),head:[M.tableLevel,M.tableItem,M.value,M.share],rows:L.map(e=>[e.depth+1,e.label,j(e.value),H(e)])})]})}export{f as SunburstChart};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{AccessibleTable as t}from"./chunk-TBPHW42V.js";import{arcPath as e}from"./chunk-VFC6QUEN.js";import{useHighlight as o}from"./chunk-CNYAHYE6.js";import{ChartTooltip as n}from"./chunk-TLRCTNUF.js";import{CHART_INK as r,resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as l,useShellLocale as i}from"./chunk-PEM7UXQ3.js";import{formatPlain as s}from"./chunk-C3QOHMR6.js";import{useState as c}from"react";import{jsx as d,jsxs as m}from"react/jsx-runtime";function h(t,e,o,n){const r=(t,o)=>{const n=e[t]?.[o];return"number"==typeof n&&Number.isFinite(n)?n:0},a=t.map((e,o)=>t.reduce((t,e,n)=>t+r(o,n)+r(n,o),0)),l=Math.max(2,o),i=t.length>l,s=i?t.map((t,e)=>e).sort((t,e)=>a[e]-a[t]).slice(0,l-1).sort((t,e)=>t-e):t.map((t,e)=>e),c=new Map(s.map((t,e)=>[t,e])),d=i?s.length:-1,m=i?[...s.map(e=>t[e]),n]:[...t],h=m.map(()=>m.map(()=>0));let u=0;t.forEach((e,o)=>t.forEach((t,e)=>{const n=c.get(o)??d,a=c.get(e)??d;n!==d||a!==d?h[n][a]+=r(o,e):u+=r(o,e)}));const f=m.map((t,e)=>m.reduce((t,o,n)=>t+h[e][n]+h[n][e],0));return d>=0&&(f[d]+=u),{labels:m,matrix:h,totals:f,otherIndex:d,foldedCount:i?t.length-s.length:0}}function u({labels:u,matrix:f,size:p=340,maxNodes:x=8,padAngle:g=.04,arcWidth:b=12,formatValue:k,className:v,emptyLabel:M}){const $=l().charts,w=i(),N=k??(t=>s(t,w)),j=M??$.noFlows,[y,E]=c(null),{highlighted:F}=o(),C=h(u,f,x,$.other),{labels:T,matrix:z,otherIndex:A,foldedCount:I}=C,L=(t,e)=>z[t]?.[e]??0,P=t=>t===A?r.muted:a(t),Q=C.totals,U=T.map((t,e)=>e).sort((t,e)=>Q[e]-Q[t]),H=U.reduce((t,e)=>t+Q[e],0);if(H<=0)/* @__PURE__ */return d("p",{className:`text-sm text-gray-500 ${v??""}`,children:j});const O=p/2,R=p/2,V=p/2-44,W=V-b,B=g*U.length,Y=/* @__PURE__ */new Map;let S=-Math.PI/2;U.forEach((t,e)=>{const o=Q[t]/H*(2*Math.PI-B);Y.set(t,{start:S,end:S+o,slot:e}),S+=o+g});const X=/* @__PURE__ */new Map,Z=[];for(const t of U)for(const e of U){const o=L(t,e);if(o<=0)continue;const n=Y.get(t),r=o/Math.max(1,Q[t])*(n.end-n.start),a=X.get(t)??0;X.set(t,a+r),Z.push({from:t,to:e,value:o,a:n.start+a+r/2,b:Y.get(e).start+(Y.get(e).end-Y.get(e).start)/2})}const q=(t,e)=>[O+e*Math.cos(t),R+e*Math.sin(t)],D="arc"===y?.kind?y.index:void 0,G="ribbon"===y?.kind?Z[y.index]:void 0;/* @__PURE__ */
|
|
2
|
+
return m("div",{className:`relative ${v??""}`,children:[
|
|
3
|
+
/* @__PURE__ */m("svg",{width:"100%",height:p,viewBox:`0 0 ${p} ${p}`,role:"img","aria-label":$.chord(U.length),onMouseLeave:()=>E(null),children:[Z.map((t,e)=>{const[o,n]=q(t.a,W),[r,a]=q(t.b,W),l=P(t.from),i=((t,e)=>y?"ribbon"===y.kind?y.index===e:y.index===t.from||y.index===t.to:null!==F?T[t.from]===F||T[t.to]===F:null)(t,e);/* @__PURE__ */
|
|
4
|
+
return d("path",{d:`M${o},${n} Q${O},${R} ${r},${a}`,fill:"none",stroke:l,strokeWidth:Math.max(1,t.value/H*p*.9),strokeOpacity:null===i||i?.34:.07,strokeLinecap:"round",onMouseEnter:()=>E({kind:"ribbon",index:e})},`${T[t.from]}→${T[t.to]}`)}),U.map(t=>{const o=Y.get(t),n=(o.start+o.end)/2,[a,l]=q(n,V+16),i=(t=>y?"arc"===y.kind?y.index===t:Z[y.index].from===t||Z[y.index].to===t:null!==F?T[t]===F:null)(t);/* @__PURE__ */
|
|
5
|
+
return m("g",{onMouseEnter:()=>E({kind:"arc",index:t}),children:[
|
|
6
|
+
/* @__PURE__ */d("path",{d:e(O,R,W,V,o.start,o.end),fill:P(t),fillOpacity:null===i||i?1:.45}),
|
|
7
|
+
/* @__PURE__ */d("text",{x:a,y:l+4,fontSize:11,fill:r.label,textAnchor:Math.cos(n)>.15?"start":Math.cos(n)<-.15?"end":"middle",children:T[t]})]},t)})]}),I>0&&/* @__PURE__ */d("p",{className:"mt-1 text-xs text-ink-faint",children:$.chordFolded(I)}),void 0!==D&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:T[D],rows:[{key:"total",label:$.totalFlow,color:P(D),value:N(Q[D])}]})}),G&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:`${T[G.from]} → ${T[G.to]}`,rows:[{key:"value",label:$.flow,color:P(G.from),value:N(G.value)}]})}),
|
|
8
|
+
/* @__PURE__ */d(t,{caption:$.chord(U.length),head:[$.tableFrom,$.tableTo,$.value],rows:Z.map(t=>[T[t.from],T[t.to],N(t.value)])})]})}export{u as ChordChart,h as foldChord};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{CountBadge as e}from"./chunk-
|
|
2
|
-
return s("div",{"data-accordion":$,className:`@container/acc flex flex-col ${"band"===$?"gap-0.5":""} ${g}`.trim(),children:d.map(i=>{const t=
|
|
1
|
+
import{CountBadge as e}from"./chunk-5Q3PFKB5.js";import{Icon as n}from"./chunk-FSPFV4MI.js";import{useShellStrings as i,useShellLocale as t}from"./chunk-PEM7UXQ3.js";import{formatPlain as r}from"./chunk-C3QOHMR6.js";import{useState as a,useId as o}from"react";import{jsx as s,jsxs as c,Fragment as l}from"react/jsx-runtime";var d="px-4 @max-[260px]/acc:px-3",h={band:{head:`${d} py-3 bg-(--rosh-fold-band)`,press:"hover:bg-(--rosh-fold-band-hover)",title:"text-base font-semibold text-(--ink-strongest)",chev:"text-(--ink-strongest)",body:`${d} pb-2`},row:{head:`${d} py-2`,press:"hover:bg-row-hover",title:"text-sm font-medium text-(--ink-strong)",chev:"text-(--ink-strong)",body:`${d} pb-2`}},m=e=>[...e].map(e=>/[A-Za-z0-9_-]/.test(e)?e:`-u${e.codePointAt(0).toString(16)}-`).join(""),u="m-0 p-0 border-0 [font:inherit] [letter-spacing:inherit] [text-transform:inherit]";function f({items:d,defaultOpenIds:f=[],openIds:p,onOpenChange:b,allowMultiple:v=!1,level:x=3,tier:$="band",className:g=""}){const N=h[$],y=i(),k=t(),[w,j]=a(f),M=o(),P=`h${x}`,C=p??w;/* @__PURE__ */
|
|
2
|
+
return s("div",{"data-accordion":$,className:`@container/acc flex flex-col ${"band"===$?"gap-0.5":""} ${g}`.trim(),children:d.map(i=>{const t=C.includes(i.id),a=`${M}-${m(i.id)}-head`,o=`${M}-${m(i.id)}-panel`;/* @__PURE__ */
|
|
3
3
|
return c("div",{children:[
|
|
4
|
-
/* @__PURE__ */s(
|
|
4
|
+
/* @__PURE__ */s(P,{className:u,children:/* @__PURE__ */c("button",{type:"button",id:a,disabled:i.disabled,"aria-expanded":t,"aria-controls":t?o:void 0,onClick:()=>(e=>{const n=C.includes(e)?C.filter(n=>n!==e):v?[...C,e]:[e];void 0===p&&j(n),b?.(n)})(i.id),className:`flex w-full items-center gap-2 text-left transition-colors duration-(--motion-fast) disabled:cursor-not-allowed disabled:opacity-50 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${N.head} ${N.press}`,children:[null!=i.icon&&/* @__PURE__ */s("span",{"aria-hidden":"true",className:`inline-flex h-4 w-4 shrink-0 items-center justify-center ${N.chev}`,children:i.icon}),
|
|
5
5
|
/* @__PURE__ */s("span",{className:`min-w-0 flex-1 ${N.title}`,children:i.title}),"number"==typeof i.count&&i.count>0&&
|
|
6
6
|
/* @__PURE__ */c(l,{children:[
|
|
7
7
|
/* @__PURE__ */s("span",{"aria-hidden":"true",className:"inline-flex",children:/* @__PURE__ */s(e,{count:i.count,tone:"accent"})}),
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import{useShellStrings as e}from"./chunk-
|
|
1
|
+
import{useShellStrings as e}from"./chunk-PEM7UXQ3.js";import{jsxs as t,jsx as a,Fragment as l}from"react/jsx-runtime";var n=e=>"number"==typeof e?e:parseInt(String(e??""))||0;function s({items:s,getVolume:i,getInstructionVolume:r,getActualVolume:c,qtyField:m="instruction",showNewIndicator:d=!1,getInstructionQty:u=e=>e.quantity,getActualQty:h=e=>e.actual_qty,isFilled:o,isNew:g=e=>Boolean(e._isNew),className:x,style:f}){const p=e().containers,y=o?s.filter(o):s,N=e=>n(u(e)),b=e=>n(h(e)),w=y.some(e=>null!=h(e)&&b(e)>0),v=e=>w?N(e):"actual"===m?h(e)??u(e)??0:u(e)??0,M=y.reduce((e,t)=>e+n(v(t)),0),$=y.filter(e=>g(e)).length,k=y.filter(e=>g(e)).reduce((e,t)=>e+n(v(t)),0),j=y.reduce((e,t)=>e+N(t),0),I=y.reduce((e,t)=>e+b(t),0),V=e=>i?.(e)??0,q=r??(e=>V(e)*N(e)),A=c??(e=>V(e)*b(e)),Q=y.reduce((e,t)=>e+q(t),0),F=y.reduce((e,t)=>e+A(t),0),_=w?Math.max(Q,F):"actual"===m&&F||Q,B=_<=34.65?"20ft":"40ft",E="20ft"===B?33:67,P=_>0?Math.max(1,Math.ceil(_/E)):0,S=P*E,U=_>0&&_>=.95*S&&_<=1.1*S;if(0===y.length)return null;const X=(e,t)=>E>0?Math.max(0,Math.min((e-t*E)/E*100,100)):0;/* @__PURE__ */
|
|
2
2
|
return t("div",{className:`mt-2 px-1 space-y-2 ${x??""}`.trim(),style:f,children:[
|
|
3
3
|
/* @__PURE__ */t("div",{className:"flex items-center justify-between text-xs text-gray-500",children:[
|
|
4
|
-
/* @__PURE__ */t("span",{children:[`${p.items(
|
|
5
|
-
/* @__PURE__ */a("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500"}),p.added($,k)]})]}),_>0?/* @__PURE__ */t("div",{className:"space-y-2",children:[Array.from({length:
|
|
4
|
+
/* @__PURE__ */t("span",{children:[`${p.items(y.length)} · ${p.pieces(M)}`,w&&j!==I&&/* @__PURE__ */a("span",{className:"ml-1 text-gray-400",children:p.split(j,I)})]}),d&&$>0&&/* @__PURE__ */t("span",{className:"flex items-center gap-1 text-green-600",children:[
|
|
5
|
+
/* @__PURE__ */a("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500"}),p.added($,k)]})]}),_>0?/* @__PURE__ */t("div",{className:"space-y-2",children:[Array.from({length:P}).map((e,l)=>{const n=X(Q,l),s=X(F,l),i=w,r=Math.max(n,s),c=Math.min(n,s),m=n>=s,d=i?m?"bg-blue-500":"bg-green-500":"bg-blue-500",u=i?m?"bg-green-500":"bg-blue-500":"";/* @__PURE__ */
|
|
6
6
|
return t("div",{className:"flex items-center gap-2",children:[
|
|
7
7
|
/* @__PURE__ */a("span",{className:"text-2xs text-ink-faintest w-8 shrink-0",children:B}),
|
|
8
8
|
/* @__PURE__ */t("div",{className:"relative flex-1 h-4 bg-gray-100 rounded-full overflow-hidden border border-gray-200",children:[
|
|
9
9
|
/* @__PURE__ */a("div",{className:`absolute inset-y-0 left-0 ${d} transition-all`,style:{width:`${r}%`}}),i&&c>0&&/* @__PURE__ */a("div",{className:`absolute inset-y-0 left-0 ${u} transition-all`,style:{width:`${c}%`}})]}),
|
|
10
|
-
/* @__PURE__ */a("span",{className:"text-2xs text-ink-faint w-16 text-right",children:i?p.fill(Math.min(F-l*
|
|
10
|
+
/* @__PURE__ */a("span",{className:"text-2xs text-ink-faint w-16 text-right",children:i?p.fill(Math.min(F-l*E,E),E):p.fill(Math.min(Q-l*E,E),E)})]},`bar-${l}`)}),
|
|
11
11
|
/* @__PURE__ */t("div",{className:"flex items-center justify-between text-xs pt-0.5",children:[
|
|
12
12
|
/* @__PURE__ */t("span",{className:"text-gray-500 inline-flex items-center gap-1",children:[p.total,w?/* @__PURE__ */t(l,{children:[
|
|
13
13
|
/* @__PURE__ */t("span",{className:"inline-flex items-center gap-1 text-blue-700",children:[
|
|
14
|
-
/* @__PURE__ */a("span",{className:"inline-block w-2 h-2 rounded-full bg-blue-500"}),p.instructed(
|
|
14
|
+
/* @__PURE__ */a("span",{className:"inline-block w-2 h-2 rounded-full bg-blue-500"}),p.instructed(Q)]}),
|
|
15
15
|
/* @__PURE__ */a("span",{className:"text-gray-400",children:"/"}),
|
|
16
16
|
/* @__PURE__ */t("span",{className:"inline-flex items-center gap-1 text-green-700",children:[
|
|
17
17
|
/* @__PURE__ */a("span",{className:"inline-block w-2 h-2 rounded-full bg-green-500"}),p.loaded(F)]})]}):/* @__PURE__ */a("b",{className:"text-gray-700",children:p.volume(_)})]}),
|
|
18
|
-
/* @__PURE__ */t("span",{className:"font-medium "+(
|
|
18
|
+
/* @__PURE__ */t("span",{className:"font-medium "+(U?"text-green-600":"text-gray-500"),children:[U&&"✓ ",P," × ",B]})]})]}):/* @__PURE__ */a("div",{className:"text-xs text-gray-400",children:p.noVolume})]})}export{s as ContainerFillChart};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{useOverlayTarget as e,OverlayLayerProvider as r}from"./chunk-4AJRHTTB.js";import{dialogA11y as i}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as t}from"./chunk-PKXQDCNR.js";import{useFocusTrap as a,useScrollLock as o}from"./chunk-CDAJKLGL.js";import{Icon as l}from"./chunk-FSPFV4MI.js";import{Z_LAYERS as s}from"./chunk-62LW225J.js";import{useHydrated as n}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as d}from"./chunk-TWVUQUUD.js";import{useShellStrings as c}from"./chunk-PEM7UXQ3.js";import{useRef as m,useId as u,useState as f,useEffect as h}from"react";import{createPortal as p}from"react-dom";import{jsx as x,jsxs as b}from"react/jsx-runtime";var g={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-4xl","2xl":"max-w-6xl"};function v({open:v,onClose:y,title:k,description:j,role:N="dialog",children:w,footer:C,blocking:T=!1,size:W="md",aside:D=!1,initialFocus:J,"aria-label":L,"aria-labelledby":U,"aria-describedby":A,className:F=""}){const I=m(null),P=u(),Q=u(),V=!T,z=u(),B=c().dialog,G=e(n()),[H,K]=f(null);return t(v),a(I,v&&null!==G,J),o(v),h(()=>{if(v)return d(()=>(T||y(),!0),()=>I.current)},[v,T,y]),v&&G?p(
|
|
2
|
+
/* @__PURE__ */x(r,{value:H,children:/* @__PURE__ */b("div",{ref:K,className:"fixed inset-0"+(D?" pointer-events-none opacity-0":""),style:{zIndex:s.overlay},role:"presentation","data-aside":D?"":void 0,children:[
|
|
3
|
+
/* @__PURE__ */x("div",{className:"fixed inset-0 bg-black/30","aria-hidden":"true"}),
|
|
4
|
+
/* @__PURE__ */x("div",{className:"fixed inset-0 flex items-center justify-center p-4",onClick:T?void 0:e=>{e.target===e.currentTarget&&y()},children:/* @__PURE__ */b("div",{ref:I,...i({role:N,modal:!0,titleId:k?z:void 0,labelledBy:U,label:L}),"aria-describedby":A??(j?Q:w?P:void 0),className:`relative max-h-full w-full ${g[W]} overflow-y-auto overscroll-contain rounded-(--radius-card) bg-white p-6 shadow-xl ${F}`.trim(),children:[k&&/* @__PURE__ */x("h2",{id:z,className:(V?"pr-8 ":"")+"text-base font-semibold text-gray-900",children:k}),j&&/* @__PURE__ */x("p",{id:Q,className:((k?"mt-1":V?"pr-8":"")+" text-sm text-gray-500").trim(),children:j}),w&&/* @__PURE__ */x("div",{id:P,className:"mt-2 text-sm text-gray-600",children:w}),C&&/* @__PURE__ */x("div",{className:"mt-6 flex flex-wrap justify-end gap-3",children:C}),V&&/* @__PURE__ */x("button",{type:"button",onClick:y,"aria-label":B.close,className:"absolute right-3 top-3 rounded-(--radius-control) p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */x(l,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})]})})]})}),G):null}export{v as Dialog};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{ColoredBadge as e}from"./chunk-
|
|
1
|
+
import{ColoredBadge as e}from"./chunk-H2XCQJRG.js";import{Button_default as n}from"./chunk-NHH2MXFU.js";import{useShellStrings as i}from"./chunk-PEM7UXQ3.js";import{useId as t}from"react";import{jsx as m,jsxs as a}from"react/jsx-runtime";function s({items:s,heading:l,emptyText:r,className:c=""}){const o=i().media,d=t();return s.length?/* @__PURE__ */a("div",{className:c||void 0,children:[
|
|
2
2
|
/* @__PURE__ */m("p",{id:d,className:"text-xs font-medium text-ink-faint",children:l??o.usedIn(s.length)}),
|
|
3
3
|
/* @__PURE__ */m("ul",{"aria-labelledby":d,className:"mt-2 flex flex-col gap-1",children:s.map(i=>/* @__PURE__ */a("li",{className:"flex min-w-0 items-center gap-2 text-sm",children:[null!=i.kind&&/* @__PURE__ */m(e,{size:"xs",className:"flex-none",children:i.kind}),i.onOpen?/* @__PURE__ */m(n,{variant:"link",size:"sm",onClick:i.onOpen,className:"min-w-0 text-left",children:i.name}):/* @__PURE__ */m("span",{className:"min-w-0 break-words text-ink",children:i.name})]},i.key))})]}):/* @__PURE__ */m("p",{className:`text-sm text-ink-faint ${c}`.trim(),children:r??o.notUsed})}export{s as MediaUsedInList};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{areaBetween as e,curvePath as i}from"./chunk-VFC6QUEN.js";import{ChartTooltip as l}from"./chunk-TLRCTNUF.js";import{CartesianPlot as t}from"./chunk-4CPE5NBC.js";import{resolveSeriesColor as r,CHART_INK as a}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as n}from"./chunk-PEM7UXQ3.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{jsx as s,jsxs as m,Fragment as c}from"react/jsx-runtime";function u({rows:u,labels:d,variant:p="area",curve:f="linear",height:k=220,width:g,max:b,min:x,formatValue:w,yAxisLabel:y,color:j,tone:L,label:v,className:C,emptyLabel:M,radius:N=3}){const F=o().charts,O=n(),U=w??(e=>h(e,O)),A=v??F.range,E=u.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),P=r(0,j,L);/* @__PURE__ */
|
|
2
|
+
return s(t,{labels:d,values:E,height:k,width:g,max:b,min:x,formatValue:U,yAxisLabel:y,className:C,emptyLabel:M,bandPadding:"bar"===p?.34:0,ariaLabel:F.rangeLabel(A,d.length),tooltip:e=>/* @__PURE__ */s(l,{title:d[e],rows:[{key:"high",label:F.high,color:P,value:null==u[e]?void 0:U(u[e].high)},{key:"low",label:F.low,color:P,value:null==u[e]?void 0:U(u[e].low)}]}),children:({x:l,y:t,active:r})=>"bar"===p?/* @__PURE__ */s("g",{children:u.map((e,i)=>/* @__PURE__ */s("rect",{x:l(i),y:t(e.high),width:Math.max(1,l.bandwidth),height:Math.max(1,t(e.low)-t(e.high)),rx:N,fill:P,fillOpacity:null===r||r===i?.85:.4},i))}):/* @__PURE__ */m("g",{children:[(()=>{const r=u.map((e,i)=>[l.center(i),t(e.high)]),a=u.map((e,i)=>[l.center(i),t(e.low)]);/* @__PURE__ */
|
|
3
|
+
return m(c,{children:[
|
|
4
|
+
/* @__PURE__ */s("path",{d:e(i(r,f),a),fill:P,fillOpacity:.2,stroke:"none"}),
|
|
5
|
+
/* @__PURE__ */s("path",{d:i(r,f),fill:"none",stroke:P,strokeWidth:2,strokeLinejoin:"round"}),
|
|
6
|
+
/* @__PURE__ */s("path",{d:i(a,f),fill:"none",stroke:P,strokeWidth:2,strokeLinejoin:"round",strokeOpacity:.7})]})})(),null!==r&&/* @__PURE__ */s("line",{x1:l.center(r),y1:t(u[r].high),x2:l.center(r),y2:t(u[r].low),stroke:a.axis,strokeWidth:1})]})})}export{u as RangeChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{railLabelsShown as e}from"./chunk-FQEALPZJ.js";import{CountBadge as t}from"./chunk-
|
|
1
|
+
import{railLabelsShown as e}from"./chunk-FQEALPZJ.js";import{CountBadge as t}from"./chunk-5Q3PFKB5.js";import{Tooltip as n}from"./chunk-BCDG4N6L.js";import{useBrowserLayoutEffect as r}from"./chunk-D65T4H6J.js";import{createContext as o,useRef as a,useState as i,useEffect as l,useContext as s}from"react";import{jsx as c,jsxs as d,Fragment as u}from"react/jsx-runtime";var h=o({labels:"none",shown:"none"}),f="button[data-icon-rail-button]:not([disabled])";function b(e,t,n){const r=getComputedStyle(e),o=(parseFloat(r.paddingLeft)||0)+(parseFloat(r.paddingRight)||0)+(parseFloat(r.borderLeftWidth)||0)+(parseFloat(r.borderRightWidth)||0),a="horizontal"===t?(parseFloat(r.columnGap)||0)*Math.max(0,n-1):0,i=e.parentElement;let l=1/0;if(i){const e=getComputedStyle(i);l=i.clientWidth-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)}return{chrome:o+a,room:l}}function m({"aria-label":t,orientation:n="vertical",children:o,className:s="",labels:d="none",labelsFit:u=!1,onLabelsShown:m}){const p=a(null),g="none"!==d&&u,[v,y]=i(null),w="none"===d?"none":g?v??"none":"all",x=a(()=>{});x.current=()=>{const t=p.current;if(!t||!g)return;const r=function(e,t){return[...e.querySelectorAll("button[data-icon-rail-button]")].map(e=>{const n=getComputedStyle(e),r=(parseFloat(n.paddingLeft)||0)+(parseFloat(n.paddingRight)||0)+(parseFloat(n.borderLeftWidth)||0)+(parseFloat(n.borderRightWidth)||0),o=parseFloat(n.minWidth)||0,a=e.querySelector("[data-icon-rail-glyph]")?.getBoundingClientRect().width??0,i=e.querySelector("[data-icon-rail-word]")?.scrollWidth??0;return{bare:Math.max(o,r+a),worded:"below"===t?Math.max(o,r+Math.max(a,i)):Math.max(o,r+a+8+i),active:"true"===e.getAttribute("aria-pressed")}})}(t,d);y(e({buttons:r,orientation:n,...b(t,n,r.length)}))},r(()=>{x.current()}),l(()=>{const e=p.current?.parentElement;if(!g||!e)return;let t=!0;const n=()=>{t&&x.current()},r="undefined"==typeof ResizeObserver?void 0:ResizeObserver,o=r?new r(n):null;return o?.observe(e),document.fonts?.ready.then(n,()=>{}),()=>{t=!1,o?.disconnect()}},[g]);const F=a(null),k=a(m);k.current=m,l(()=>{g&&null!==v&&F.current!==v&&(F.current=v,k.current?.(v))},[g,v]),r(()=>{const e=p.current;if(!e)return;const t=[...e.querySelectorAll(f)];if(0===t.length)return;const n=t.find(e=>e===document.activeElement)??t.find(e=>"true"===e.getAttribute("aria-pressed"))??t[0];for(const t of e.querySelectorAll("button[data-icon-rail-button]"))t.tabIndex=t===n?0:-1});/* @__PURE__ */
|
|
2
2
|
return c("div",{ref:p,role:"toolbar","aria-label":t,"aria-orientation":n,"data-orientation":n,onKeyDown:e=>{const t=p.current;if(!t)return;const r=[...t.querySelectorAll(f)],o=r.indexOf(e.target);if(o<0)return;const a="vertical"===n?"ArrowUp":"ArrowLeft",i="vertical"===n?"ArrowDown":"ArrowRight",l=e.key===i?(o+1)%r.length:e.key===a?(o-1+r.length)%r.length:"Home"===e.key?0:"End"===e.key?r.length-1:-1;if(!(l<0)){e.preventDefault();for(const e of r)e.tabIndex=e===r[l]?0:-1;r[l].focus()}},"data-labels":"none"===d?void 0:d,"data-labels-shown":"none"===d?void 0:w,className:`flex gap-1 ${"vertical"===n?"flex-col items-center":"flex-row items-center"} ${s}`.trim(),children:/* @__PURE__ */c(h.Provider,{value:{labels:d,shown:w},children:o})})}function p({label:e,icon:r,active:o,disabled:a,onClick:i,badge:l,tooltipSide:f="right",className:b=""}){const m=!0===o,{labels:p,shown:g}=s(h),v=void 0===l||!1===l||0===l?r:/* @__PURE__ */c(t,{count:"number"==typeof l?l:void 0,dot:!0===l,max:99,children:r}),y="none"!==p,w=y&&("all"===g||"chosen"===g&&m),x=/* @__PURE__ */c("button",{type:"button","data-icon-rail-button":"","aria-label":e,"aria-pressed":"boolean"==typeof o?o:void 0,disabled:a,onClick:a?void 0:i,className:[`relative inline-flex ${y?"beside"===p?"h-9 min-w-9 justify-center px-2":"min-h-9 min-w-9 flex-col justify-center px-1 py-1":"h-9 w-9 justify-center"} shrink-0 items-center rounded-lg transition-colors`,"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]","disabled:cursor-not-allowed disabled:opacity-40",m?"bg-accent-tint text-blue-700":"text-gray-600 not-disabled:not-aria-disabled:hover:bg-gray-100 not-disabled:not-aria-disabled:hover:text-ink-strongest",b].filter(Boolean).join(" "),children:y?/* @__PURE__ */d(u,{children:[
|
|
3
3
|
/* @__PURE__ */c("span",{"data-icon-rail-glyph":"",className:"inline-flex shrink-0 items-center justify-center",children:v}),
|
|
4
4
|
/* @__PURE__ */c("span",{"data-icon-rail-word":"","aria-hidden":"true",className:["overflow-hidden whitespace-nowrap text-xs font-medium leading-none",w?"beside"===p?"ml-2":"mt-1":"max-h-0 max-w-0"].join(" "),children:e})]}):v});/* @__PURE__ */
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{nextEnabledIndex as e}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as t,filterOptionItems as n,optionMatches as r,groupedRows as l,OptionCheck as o,OptionSublabel as i}from"./chunk-5F7HMNCX.js";import{INPUT_BASE_ON as a,INPUT_BASE as s}from"./chunk-AYZY3YNC.js";import{Button_default as u}from"./chunk-NHH2MXFU.js";import{LoadingSpinner as c}from"./chunk-R2VKEMZH.js";import{Tooltip as d}from"./chunk-BCDG4N6L.js";import{onOverlayOpen as h}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as p}from"./chunk-62LW225J.js";import{useDropdownPosition as m,MENU_MAX_HEIGHT as f}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as b}from"./chunk-D65T4H6J.js";import{GLASS_DIVIDER as g,glassStyle as v}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{useShellStrings as w}from"./chunk-
|
|
2
|
-
return S("button",{type:"button","aria-label":t,onMouseDown:t=>{t.preventDefault(),t.stopPropagation(),e()},className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity text-base leading-none",children:"×"})}function R(R){const{options:F,placeholder:
|
|
3
|
-
return C("div",{ref:ye,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&(ye.current?.contains(t)||xe.current?.contains(t))
|
|
4
|
-
/* @__PURE__ */S("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */S("span",{ref:He,className:"whitespace-pre"})}),Ee&&/* @__PURE__ */S(
|
|
5
|
-
/* @__PURE__ */C("div",{ref:xe,onMouseDownCapture:()=>{
|
|
1
|
+
import{nextEnabledIndex as e}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as t,filterOptionItems as n,optionMatches as r,groupedRows as l,OptionCheck as o,OptionSublabel as i}from"./chunk-5F7HMNCX.js";import{INPUT_BASE_ON as a,INPUT_BASE as s}from"./chunk-AYZY3YNC.js";import{Button_default as u}from"./chunk-NHH2MXFU.js";import{LoadingSpinner as c}from"./chunk-R2VKEMZH.js";import{Tooltip as d}from"./chunk-BCDG4N6L.js";import{onOverlayOpen as h}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as p}from"./chunk-62LW225J.js";import{useDropdownPosition as m,MENU_MAX_HEIGHT as f}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as b}from"./chunk-D65T4H6J.js";import{GLASS_DIVIDER as g,glassStyle as v}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{useShellStrings as w}from"./chunk-PEM7UXQ3.js";import{useState as x,useId as k,useRef as $,useMemo as N,useEffect as j}from"react";import{createPortal as D}from"react-dom";import{jsxs as C,jsx as S}from"react/jsx-runtime";function W(e,t){const n=e.length;if(0===n||t(e.join(", ")))return{shown:n,cut:!1};if(1===n)return{shown:1,cut:!0};let r=0;for(let l=1;l<n&&t(`${e.slice(0,l).join(", ")} +${n-l}`);l+=1)r=l;return{shown:r,cut:!1}}function M({onClear:e,ariaLabel:t}){/* @__PURE__ */
|
|
2
|
+
return S("button",{type:"button","aria-label":t,onMouseDown:t=>{t.preventDefault(),t.stopPropagation(),e()},className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity text-base leading-none",children:"×"})}function R(R){const{options:F,placeholder:L,emptyOptionLabel:E,className:T="",disabled:z,id:H,filter:U=!1,allowFreeText:A=!1,freeTextOption:O,onSearchChange:B,loading:I=!1,error:J,onRetry:X,rightAdornment:G,renderOption:P,clearable:Y=!0,"aria-label":K,"aria-labelledby":Q,"aria-describedby":V}=R,Z=!0===R.multiple,q=R.multiple?R.value:R.value?[R.value]:[],_=R.multiple?"":R.value,ee=e=>{R.multiple?R.onChange(e):R.onChange(e[0]??"")},te=q.length>0,ne=U&&te&&!z,re=Z||U,le=null!=O,oe=A||le,[ie,ae]=x(!1),[se,ue]=x(-1),ce=k(),de=H??`${ce}-input`,he=`${ce}-listbox`,pe=e=>`${ce}-opt-${e}`,[me,fe]=x(""),be=w(),ge=E??be.select.none,ve=e=>{fe(e),ue(-1),B?.(e)},ye=$(null),we=$(null),xe=$(null),ke=$(null),$e=$(ie);$e.current=ie;const Ne=$(!1),je=e=>{$e.current&&($e.current=!1,e&&A&&!le&&Ye&&(Z?q.includes(Ye)||ee([...q,Ye]):Ye!==_&&ee([Ye])),ae(!1),ve(""))},De=(e,t)=>{if(!e.disabled){if(Z)return ee(q.includes(e.value)?q.filter(t=>t!==e.value):[...q,e.value]),void(e===Ke?ve(""):ue(t));ee([e.value]),je(!1)}},[Ce,Se]=x(null);b(()=>{if(!G||ie)return void Se(null);const e=ke.current?.offsetWidth??0;Se(e?e+(Ee?32:8)+6:null)});const We=m(we,ie,re?{popupRef:xe}:{matchTriggerWidth:!0}),Me=N(()=>t(F),[F]),Re=q.join("\0"),Fe=N(()=>{const e=[],t=/* @__PURE__ */new Set;for(const n of Me)q.includes(n.value)&&!t.has(n.value)&&(t.add(n.value),e.push(n.label));if(oe)for(const n of q)t.has(n)||e.push(n);return e},[Me,Re,oe]),Le=Fe.join(", "),Ee=Y&&te&&!z,[Te,ze]=x(null),He=$(null),Ue=$(""),Ae=$(()=>{});Ae.current=()=>{const e=we.current,t=He.current;if(!Z||!e||!t)return;const n=getComputedStyle(e),r=e.clientWidth-(parseFloat(n.paddingLeft)||0)-(parseFloat(n.paddingRight)||0),l=[n.fontStyle,n.fontWeight,n.fontSize,n.fontFamily,n.letterSpacing].join("|"),o=`${r}|${l}|${Fe.join("\0")}`;if(o===Ue.current)return;Ue.current=o;let i=null;r>0&&Fe.length>0&&(t.style.fontStyle=n.fontStyle,t.style.fontWeight=n.fontWeight,t.style.fontSize=n.fontSize,t.style.fontFamily=n.fontFamily,t.style.letterSpacing=n.letterSpacing,i=W(Fe,e=>(t.textContent=e,t.getBoundingClientRect().width<=r)),t.textContent=""),ze(e=>e?.shown===i?.shown&&e?.cut===i?.cut?e:i)},b(()=>{Ae.current()}),j(()=>{const e=we.current;if(!Z||!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Ae.current());return t.observe(e),()=>t.disconnect()},[Z]);const Oe=Fe.length,Be=!Z||!Te||Te.shown>=Oe?Le:0===Te.shown?be.select.selectedCount(Oe):`${Fe.slice(0,Te.shown).join(", ")} +${Oe-Te.shown}`,Ie=Z&&null!==Te&&(Te.shown<Oe||Te.cut),Je=ie&&te&&re;j(()=>{if(!ie)return;const e=e=>{const t=e.target;ye.current?.contains(t)||xe.current?.contains(t)||je(!0)};document.addEventListener("mousedown",e);const t=h(()=>je(!0));return()=>{document.removeEventListener("mousedown",e),t()}},[ie,A,me,Re,R.onChange]),j(()=>{if(ie)return y(e=>!("Escape"!==e.key||!$e.current)&&(je(!1),we.current?.blur(),!0),()=>xe.current)},[ie]);const Xe=N(()=>{const e=/* @__PURE__ */new Set;return n(F,t=>!e.has(t.value)&&(e.add(t.value),!0))},[F]),Ge=N(()=>{if(B)return Xe;const e=me.trim().toLowerCase();return e?n(Xe,t=>r(t,e)):Xe},[Xe,me,B]),Pe=N(()=>t(Ge),[Ge]),Ye=me.trim(),Ke=N(()=>le&&Ye?Me.some(e=>e.label===Ye)||q.includes(Ye)?null:{value:Ye,label:Ye}:null,[le,Ye,Me,Re]),Qe=N(()=>Ke?[...Pe,Ke]:Pe,[Pe,Ke]);/* @__PURE__ */
|
|
3
|
+
return C("div",{ref:ye,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&(ye.current?.contains(t)||xe.current?.contains(t))||Ne.current||document.activeElement!==we.current&&je(!0)},children:[(Ve=/* @__PURE__ */S("input",{id:de,ref:we,type:"text",autoComplete:"off",role:"combobox","aria-expanded":ie,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-controls":ie?he:void 0,"aria-activedescendant":ie&&se>=0&&se<Qe.length?pe(se):void 0,"aria-label":Q?void 0:K,"aria-labelledby":Q,"aria-describedby":V,value:ie?me:Be,onChange:e=>{ve(e.target.value),ae(!0)},onFocus:()=>{z||(ve(""),ae(!0))},onKeyDown:t=>{if("ArrowDown"===t.key||"ArrowUp"===t.key){if(z)return;if(t.preventDefault(),!ie)return void ae(!0);if(0===Qe.length)return;const n="ArrowDown"===t.key?1:-1;return void ue(t=>e(Qe,t,n))}"Enter"===t.key?(t.preventDefault(),ie&&se>=0&&se<Qe.length?De(Qe[se],se):1!==Pe.length||Pe[0].disabled?A&&!le&&Ye&&(Z?(q.includes(Ye)||ee([...q,Ye]),ve("")):(ee([Ye]),je(!1),we.current?.blur())):De(Pe[0],0)):"Escape"===t.key?(je(!1),we.current?.blur()):"Tab"===t.key&&je(!0)},placeholder:Je?Be:L||ge,className:`${ne?a:s} ${T} ${Ee?"pr-8":""} ${z?"bg-surface-sunken text-ink-faintest cursor-not-allowed":""} truncate${Je?" rosh-field-shows-choice":""}`,style:Ce?{paddingRight:Ce}:void 0,disabled:z}),Z?/* @__PURE__ */S(d,{content:!ie&&Ie?Le:null,className:"block",children:Ve}):Ve),Z&&
|
|
4
|
+
/* @__PURE__ */S("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */S("span",{ref:He,className:"whitespace-pre"})}),Ee&&/* @__PURE__ */S(M,{ariaLabel:be.select.clear,onClear:()=>{ee([]),je(!1)}}),G&&!ie&&/* @__PURE__ */S("div",{ref:ke,className:`absolute top-1/2 -translate-y-1/2 ${Ee?"right-8":"right-2"} flex items-center gap-1 flex-nowrap justify-end pointer-events-none`,children:G}),ie&&D(
|
|
5
|
+
/* @__PURE__ */C("div",{ref:xe,onMouseDownCapture:()=>{Ne.current=!0,setTimeout(()=>{Ne.current=!1},0)},className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:p.popup,left:We?.left,right:We?.right,top:We?.top,bottom:We?.bottom,minWidth:We?.minWidth,width:We?.width,...re&&{maxWidth:We?.maxWidth},visibility:We?void 0:"hidden",...v()},children:[Z&&te&&Y&&!z&&
|
|
6
6
|
/* @__PURE__ */S("button",{type:"button",tabIndex:-1,onMouseDown:e=>{e.preventDefault(),ee([])},className:`block w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm text-gray-600 hover:bg-row-hover border-b ${g}`,children:be.select.clearAll}),I?
|
|
7
7
|
/* @__PURE__ */S(c,{size:"sm",padding:"py-2",label:be.search.searching}):J?/* @__PURE__ */C("div",{role:"alert",className:"flex items-center gap-2 px-3 py-2 text-sm text-red-600",children:[
|
|
8
|
-
/* @__PURE__ */S("span",{className:"min-w-0 flex-1",children:J}),
|
|
9
|
-
/* @__PURE__ */C("div",{id:he,role:
|
|
8
|
+
/* @__PURE__ */S("span",{className:"min-w-0 flex-1",children:J}),X&&/* @__PURE__ */S(u,{variant:"link",size:"sm",onMouseDown:e=>e.preventDefault(),onClick:X,className:"shrink-0",children:be.list.retry})]}):null,
|
|
9
|
+
/* @__PURE__ */C("div",{id:he,role:Qe.length?"listbox":void 0,"aria-labelledby":Qe.length?Q??(K?void 0:de):void 0,"aria-label":Qe.length&&!Q?K:void 0,"aria-multiselectable":!(!Qe.length||!Z)||void 0,className:"overflow-y-auto",style:{maxHeight:We?.maxHeight??f},children:[0===Qe.length?I||J?null:/* @__PURE__ */S("p",{className:"px-3 py-3 text-sm text-ink-faintest text-center",children:be.select.noMatches}):0===Pe.length?null:l(Ge,(e,t)=>{const n=q.includes(e.value);/* @__PURE__ */
|
|
10
10
|
return C("button",{id:pe(t),type:"button",role:"option","aria-selected":n,"aria-disabled":e.disabled||void 0,tabIndex:-1,onMouseDown:n=>{(e.disabled||Z)&&n.preventDefault(),De(e,t)},className:"w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center justify-between gap-2 whitespace-nowrap "+(e.disabled?"cursor-not-allowed text-gray-400":`hover:bg-gray-50 ${n?"text-blue-600 font-medium":"text-gray-700"} ${t===se?"bg-gray-100":n?"bg-blue-50/50":""}`),children:[Z&&/* @__PURE__ */S(o,{selected:n}),
|
|
11
|
-
/* @__PURE__ */S("span",{className:`min-w-0 ${re?"flex-auto":"flex-1"} truncate`,children:
|
|
12
|
-
/* @__PURE__ */S("button",{id:pe(
|
|
11
|
+
/* @__PURE__ */S("span",{className:`min-w-0 ${re?"flex-auto":"flex-1"} truncate`,children:P?P(e,{selected:n,active:t===se}):e.label}),e.sublabel&&/* @__PURE__ */S(i,{grows:re,children:e.sublabel})]},e.value)},ce),Ke&&O&&
|
|
12
|
+
/* @__PURE__ */S("button",{id:pe(Pe.length),type:"button",role:"option","aria-selected":!1,tabIndex:-1,onMouseDown:e=>{Z&&e.preventDefault(),De(Ke,Pe.length)},className:`w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 whitespace-nowrap text-ink hover:bg-row-hover ${Pe.length?`border-t ${g}`:""} ${se===Pe.length?"bg-gray-100":""}`,children:/* @__PURE__ */S("span",{className:"min-w-0 flex-1 truncate",children:O(Ke.value)})},`${ce}-typed`)]})]}),document.body)]});var Ve}export{R as SearchableSelect,W as fitChoice};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Banner as e}from"./chunk-
|
|
1
|
+
import{Banner as e}from"./chunk-7WLFHDWA.js";import{Button_default as t}from"./chunk-NHH2MXFU.js";import{useShellStrings as n}from"./chunk-PEM7UXQ3.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};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{FormField as e}from"./chunk-6KBDNYRW.js";import{ImageFocusPoint as a}from"./chunk-6TRE326A.js";import{Segmented as i}from"./chunk-CKPVXDKX.js";import{isVideoUrl as t,mediaPromptLine as o,mediaFileName as r,FilenameBadge as n,BusyOverlay as l,UploadGlyph as s,dropzoneClass as c,zoneFocusClass as d}from"./chunk-D4KZOYXQ.js";import{TransferProgress as u}from"./chunk-BJONHLET.js";import{useFileIntake as m,FileIntakeAlert as h}from"./chunk-LYX55RI3.js";import{Icon as p}from"./chunk-FSPFV4MI.js";import{useShellStrings as b}from"./chunk-PEM7UXQ3.js";import{useState as g,useRef as v,useEffect as f,useId as y}from"react";import{jsxs as k,jsx as j,Fragment as x}from"react/jsx-runtime";var N=["flex h-8 items-center justify-center rounded-(--radius-control) text-(--status-on-solid)","not-disabled:hover:bg-white/10 disabled:cursor-not-allowed disabled:opacity-60","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]"].join(" ");function w({value:w,onChange:L,onPick:R,onFile:F,label:C,hint:U,error:P,required:O,className:$,accept:z="image/*",maxSizeBytes:K,fit:X="cover",height:B=112,placeholder:H,cta:I,acceptHint:q,showFilename:D=!0,allowReplace:E=!0,allowRemove:S=!0,replaceLabel:V,removeLabel:Y,busy:A=!1,busyLabel:M,choosingLabel:Q,pickFailedLabel:T,progress:W,disabled:_=!1,kind:J,onKindChange:Z,focus:G,onFocusChange:ee,focusLabel:ae}){const ie=b().media,te=I??ie.cta,oe=J??(/video/.test(z)&&!/image/.test(z)?"video":"image"),re="string"==typeof Y&&Y?Y:ie.remove,[ne,le]=g(!1),[se,ce]=g(!1),de=v(!0);f(()=>()=>{de.current=!1},[]);const ue=A||ne,me=ne&&!A?Q??ie.choosing:M??ie.uploading,he=P??(se?T??ie.pickFailed:void 0),pe=e=>{if(!R)return;ce(!1);const a=R(e);a&&"function"==typeof a.then&&(le(!0),a.then(e=>{de.current&&(le(!1),"string"==typeof e&&e&&L(e))},()=>{de.current&&(le(!1),ce(!0))}))},be=y(),ge=v(null),[ve,fe]=g(null);f(()=>()=>{ge.current&&URL.revokeObjectURL(ge.current)},[]);const ye=_||ue,ke=!!w&&(t(w,z)||w===ve),je=H??o(z,ie),xe=V??(ke||"video"===oe?ie.changeVideo:ie.changeImage),Ne=e=>{R?pe(e):F?F(e):(e=>{ge.current&&URL.revokeObjectURL(ge.current);const a=URL.createObjectURL(e);ge.current=a,fe(e.type.startsWith("video/")?a:null),L(a)})(e)},we=m({accept:z,maxSizeBytes:K,acceptHint:q,multiple:!1,disabled:ye,onAccept:([e])=>Ne(e)}),{dragOver:Le}=we,Re=()=>{ye||(R?pe():we.open())},Fe=w?r(w):"",Ce=!ke&&!!ee,Ue=_||!E&&!S?null:/* @__PURE__ */k("div",{"data-media-bar":"",className:["absolute inset-x-0 bottom-0 flex items-center gap-1 p-1 text-(--status-on-solid)","opacity-0 transition-opacity duration-(--motion-fast)","group-hover/media:opacity-100 group-focus-within/media:opacity-100 [@media(hover:none)]:opacity-100"].join(" "),style:{background:"var(--rosh-media-scrim-button)"},children:[E&&/* @__PURE__ */k("button",{id:Ce?void 0:be,type:"button","aria-labelledby":`${be}-change`,onClick:()=>Re(),disabled:ue,className:`min-w-0 flex-1 gap-1 px-2 text-sm font-medium ${N}`,children:[
|
|
2
|
+
/* @__PURE__ */j(p,{name:"swap","aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
|
|
3
|
+
/* @__PURE__ */j("span",{id:`${be}-change`,className:"truncate",children:xe})]}),S&&/* @__PURE__ */j("button",{type:"button","aria-label":re,onClick:()=>{ge.current&&(URL.revokeObjectURL(ge.current),ge.current=null),fe(null),L("")},disabled:ue,className:`ml-auto w-8 shrink-0 ${N}`,children:/* @__PURE__ */j(p,{name:"trash","aria-hidden":"true",className:"h-4 w-4"})})]}),Pe=/* @__PURE__ */k("div",{...we.zoneProps,"data-media-frame":"",className:["group/media relative overflow-hidden rounded-(--radius-control) border transition-colors",Ce?"":"bg-gray-100",Le?"border-blue-500":"border-line"].join(" "),style:Ce?void 0:{height:B},children:[Ce?
|
|
4
|
+
/* @__PURE__ */j(a,{value:G??"",onChange:e=>ee?.(e),label:ae??ie.focus,image:w,hint:null,id:be,disabled:ye,className:"[&_[data-image-focus-picture]]:rounded-none [&_[data-image-focus-picture]]:border-0"}):ke?/* @__PURE__ */j("video",{src:w??void 0,muted:!0,playsInline:!0,preload:"metadata","aria-label":Fe||void 0,className:"h-full w-full",style:{objectFit:X}}):/* @__PURE__ */j("img",{src:w??void 0,alt:Fe,className:"h-full w-full",style:{objectFit:X,objectPosition:G||void 0}}),D&&w&&/* @__PURE__ */j(n,{children:Fe}),Ue,ue&&/* @__PURE__ */j(l,{label:me,progress:W,rounded:"rounded-md"})]}),Oe=/* @__PURE__ */j("button",{type:"button",id:be,onClick:()=>Re(),disabled:ye,"aria-label":"string"==typeof je?je:ie.upload,"aria-busy":ue||void 0,"aria-invalid":!!he||void 0,"aria-required":O||void 0,"aria-describedby":he?`${be}-error`:U?`${be}-hint`:void 0,...we.zoneProps,className:c(Le,ye,d(ye)),style:{minHeight:B},children:ue?/* @__PURE__ */j(u,{state:"busy",verb:me,pct:W}):/* @__PURE__ */k(x,{children:[
|
|
5
|
+
/* @__PURE__ */j("span",{className:"text-ink-faintest",children:/* @__PURE__ */j(s,{})}),
|
|
6
|
+
/* @__PURE__ */j("span",{className:"px-3 text-xs text-ink-faint",children:je}),
|
|
7
|
+
/* @__PURE__ */j("span",{className:"text-sm font-medium text-blue-600",children:te}),q&&/* @__PURE__ */j("span",{className:"text-xs text-ink-faintest",children:q})]})});/* @__PURE__ */
|
|
8
|
+
return k(e,{label:C,htmlFor:be,hint:U,error:he,required:O,className:$,children:[Z&&/* @__PURE__ */j("div",{"data-media-kind":"",className:"mb-2",children:/* @__PURE__ */j(i,{value:oe,onChange:e=>Z(e),options:[{value:"image",label:ie.image,icon:/* @__PURE__ */j(p,{name:"image","aria-hidden":"true",className:"h-4 w-4"}),disabled:ye},{value:"video",label:ie.video,icon:/* @__PURE__ */j(p,{name:"play","aria-hidden":"true",className:"h-4 w-4"}),disabled:ye}],block:!0,size:"md",label:"string"==typeof C&&C?C:ie.upload})}),w?Pe:Oe,!R&&/* @__PURE__ */j("input",{...we.inputProps}),
|
|
9
|
+
/* @__PURE__ */j(h,{rejections:we.rejections})]})}export{w as MediaUploadField};
|
|
@@ -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-P65C5TUU.js";import{SpinnerRing as r}from"./chunk-R2VKEMZH.js";import{TH_ONE_LINE as o,OneLineLabel as n}from"./chunk-OZAAIE4E.js";import{useBrowserLayoutEffect as l}from"./chunk-D65T4H6J.js";import{useShellStrings as s}from"./chunk-PEM7UXQ3.js";import{useState as i,useRef as a}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),f=e=>"wide"===e.only?"rosh-dt-only-wide":"stacked"===e.only?"rosh-dt-only-stacked":"",g="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:$=!1,size:S="md",minWidth:z,rowClassName:H,onRow:
|
|
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:E,onRowPress:I,linkAs:A,emptyText:P,selection:O,footer:D,virtualized:F,stackOnNarrow:L=!1,stackBelow:R,className:K=""}){const U=s(),W=P??U.table.empty,Z=(e,t)=>"function"==typeof k?k(e,t):String(e[k]),G=L&&!F,J=G?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}]:[]}),Q=e=>G?{role:e}:{},V=(e,t)=>(t??("string"==typeof e||"number"==typeof e?String(e):"")).trim()||void 0,[X,q]=i(0),Y=F?.overscan??6,_=F?e=>{const t=Math.max(0,Math.floor(e.currentTarget.scrollTop/F.rowHeight)-Y);q(e=>e===t?e:t)}:void 0,ee=F?Math.ceil(F.height/F.rowHeight)+2*Y:v.length,te=F?Math.min(X,Math.max(0,v.length-ee)):0,re=Math.min(v.length,te+ee),oe=F?te*F.rowHeight:0,ne=F?(v.length-re)*F.rowHeight:0,le=a(null),[se,ie]=i(0);l(()=>{if(!F)return;const e=le.current?.offsetHeight??0;ie(t=>t===e?t:e)});const ae=e=>e.sortField??e.key,ce=e=>N&&N.field===ae(e)?N.direction:null,de=J.flatMap(e=>m(e)?e.columns:[e]),he=J.some(m),ue=/* @__PURE__ */new Map;if(G)for(const e of J)if(m(e))for(const t of e.columns)ue.set(t,V(e.title,e.label));const me=e=>{const t=V(e.title,e.label),r=ue.get(e);return t&&r?`${r} · ${t}`:t},fe=new Set(O?.selected??[]),ge=O?v.map((e,t)=>Z(e,t)):[],pe=ge.length>0&&ge.every(e=>fe.has(e)),ye=ge.some(e=>fe.has(e)),be=O?36:0,we=de.length+(O?1:0),xe=de.some(e=>"left"===e.fixed),ve=G&&!O&&de.some(e=>e.cardCorner),ke=A??"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,r,l=0)=>{const s=ce(e),i=y[e.align??(e.numeric?"right":"left")],a="left"===e.fixed,d=!(!e.sortable||!C);/* @__PURE__ */
|
|
5
|
+
return h("th",{scope:"col",...Q("columnheader"),rowSpan:r>1?r:void 0,"aria-sort":"asc"===s?"ascending":"desc"===s?"descending":d?"none":void 0,style:{width:e.width,...a?{left:(Be[t]??0)+be}:{},...F?{top:l}:{}},className:[Ne,i,o,"font-semibold uppercase tracking-wide text-gray-500","sm"===S?"text-2xs":"text-xs",a?F?"sticky z-20 bg-gray-50":"sticky z-10 bg-gray-50":F?"sticky z-10 bg-gray-50":"",G&&d?"rosh-dt-sort":"",G?f(e):"",e.headerClassName??""].filter(Boolean).join(" "),children:Ce(e,d?/* @__PURE__ */c("button",{type:"button",onClick:()=>(e=>{if(!C)return;const t=ae(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":G?ue.get(e):void 0,className:`inline-flex max-w-full items-center font-semibold uppercase tracking-wide hover:text-ink ${i}`,children:[
|
|
6
6
|
/* @__PURE__ */h(n,{children:e.title}),
|
|
7
7
|
/* @__PURE__ */h(b,{direction:s})]}):/* @__PURE__ */h(n,{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:
|
|
8
|
+
/* @__PURE__ */c("div",{onScroll:_,style:F?{maxHeight:F.height}:void 0,className:`relative overflow-x-auto ${F?"overflow-y-auto":""} ${$?"rounded-lg border border-gray-200":""}${G?" 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(r,{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",
|
|
11
|
+
/* @__PURE__ */h("span",{className:"sr-only",children:U.table.loading})]}),
|
|
12
|
+
/* @__PURE__ */c("table",{...Q("table"),className:(G?"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",{...Q("rowgroup"),className:G?"rosh-dt-head":void 0,children:[
|
|
14
|
+
/* @__PURE__ */c("tr",{ref:le,...Q("row"),className:"border-b border-gray-200 bg-gray-50",children:[O&&/* @__PURE__ */h("th",{scope:"col",...Q("columnheader"),rowSpan:he?2:void 0,style:{width:36,...F?{top:0}:{}},className:[Ne,o,xe||F?"sticky z-20 bg-gray-50":"",xe?"left-0":"",G?"rosh-dt-select":""].filter(Boolean).join(" "),children:/* @__PURE__ */h(e,{"aria-label":U.table.selectAll,checked:pe,indeterminate:ye&&!pe,onChange:()=>{if(!O)return;const e=new Set(ge);O.onChange(pe?O.selected.filter(t=>!e.has(t)):[...O.selected,...ge.filter(e=>!fe.has(e))])}})}),J.map((e,t)=>m(e)?/* @__PURE__ */h("th",{scope:"colgroup",...Q("columnheader"),colSpan:e.columns.length,style:F?{top:0}:void 0,className:[Ne,"text-center",o,"font-semibold uppercase tracking-wide text-gray-500","sm"===S?"text-2xs":"text-xs","border-b border-gray-200",F?"sticky z-10 bg-gray-50":"",e.headerClassName??""].filter(Boolean).join(" "),children:/* @__PURE__ */h(n,{children:e.title})},e.key??`group-${t}`):je(e,de.indexOf(e),he?2:1))]}),he&&/* @__PURE__ */h("tr",{...Q("row"),className:"border-b border-gray-200 bg-gray-50",children:J.flatMap(e=>m(e)?e.columns:[]).map(e=>je(e,de.indexOf(e),1,se))})]}),
|
|
15
|
+
/* @__PURE__ */h("tbody",{...Q("rowgroup"),className:G?"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=E?.(t,o),i=void 0===s&&I?()=>I(t,o):void 0,a=void 0!==s||void 0!==i;let d=!1;const m=(e,t)=>{if(d=!0,!a)return e;const r=[g,i?"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:i,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(a&&!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),...Q("row"),style:F?{height:F.rowHeight}:void 0,onClick:n?.onClick,onMouseEnter:n?.onMouseEnter,onMouseLeave:n?.onMouseLeave,onFocus:b(n?.onFocus),onBlur:b(n?.onBlur),"aria-current":l&&!a?"true":void 0,...n?.onClick?{tabIndex:0,onKeyDown:e=>{e.target===e.currentTarget&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),n.onClick?.()))}}:{},className:[G?O?"rosh-dt-row rosh-dt-row-select":"rosh-dt-row":"",G&&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)]":"",a?"rosh-dt-linked hover:bg-gray-50":"",l?"rosh-dt-current":"",H?.(t,o)??"",n?.className??""].filter(Boolean).join(" "),children:[O&&(()=>{const r=Z(t,o);/* @__PURE__ */
|
|
17
|
+
return h("td",{...Q("cell"),style:{width:36},onClick:e=>e.stopPropagation(),className:[Ne,xe?"sticky left-0 z-10 bg-white":"",G?"rosh-dt-select":""].filter(Boolean).join(" "),children:/* @__PURE__ */h(e,{"aria-label":U.table.selectRow,checked:fe.has(r),onChange:()=>(e=>{O&&O.onChange(fe.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=G&&!n&&"wide"!==e.only;/* @__PURE__ */
|
|
18
|
+
return h("td",{...Q("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":"",G?f(e):"",Ne,y[e.align??(e.numeric?"right":"left")],G?"":w(e),"text-ink-strongest",e.ellipsis?"max-w-0 truncate":"",r?"sticky z-10 bg-white":"",e.className??""].filter(Boolean).join(" "),children:G?
|
|
19
|
+
/* @__PURE__ */h("span",{className:["rosh-dt-value",w(e,!0)].filter(Boolean).join(" "),children:o}):o},e.key)})]},Z(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",{...Q("row"),className:G?"rosh-dt-empty":void 0,children:/* @__PURE__ */h("td",{...Q("cell"),colSpan:we,className:`${Ne} py-10 text-center text-gray-500`,children:W})})})]}),D]}),j&&j.pageCount>1&&/* @__PURE__ */h("div",{className:G?"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",G?void 0!==R&&R>0&&40!==R?{className:`rosh-dt-at ${K}`.trim(),children:/* @__PURE__ */h("div",{className:"rosh-dt-stack",style:{width:40/R*100+"%"},children:/* @__PURE__ */h("div",{className:"rosh-dt-fit",style:{width:R/40*100+"%"},children:$e})})}:{className:`rosh-dt-stack ${K}`.trim(),children:$e}:{className:K,children:$e})}export{x as DataTable};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Tooltip as e}from"./chunk-BCDG4N6L.js";import{useBrowserLayoutEffect as r}from"./chunk-D65T4H6J.js";import{useShellStrings as t}from"./chunk-
|
|
2
|
-
return s(e,{content:z??
|
|
1
|
+
import{Tooltip as e}from"./chunk-BCDG4N6L.js";import{useBrowserLayoutEffect as r}from"./chunk-D65T4H6J.js";import{useShellStrings as t}from"./chunk-PEM7UXQ3.js";import{useRef as o,useEffect as n,useCallback as i}from"react";import{jsx as s}from"react/jsx-runtime";var a=(e,r,t)=>Math.min(t,Math.max(r,e));function l(e,r,t,o,n){return Math.round(a("left"===t||"top"===t?e+r:e-r,o,n))}function u(e,r,t){let o=null;try{o=window.localStorage.getItem(e)}catch{return null}const n=o?parseInt(o,10):NaN;return Number.isNaN(n)?null:a(n,r,t)}function c({width:c,onResize:d,orientation:h="vertical",side:m,min:f,max:p,defaultWidth:v=f,step:g=16,storageKey:b,label:w,hint:z,controls:y,className:x=""}){const P="horizontal"===h,N=t().resizeHandle,k=o(null),D=o({onResize:d,min:f,max:p,side:m});D.current={onResize:d,min:f,max:p,side:m},r(()=>{if(!b)return;const e=u(b,f,p);null!==e&&e!==c&&d(e)},[b]),n(()=>{if(!b)return;const e=window.setTimeout(()=>{try{window.localStorage.setItem(b,String(Math.round(c)))}catch{}},200);return()=>window.clearTimeout(e)},[c,b]);const M=i(()=>{k.current=null,document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")},[]);n(()=>M,[M]);const C=e=>{k.current&&(e.currentTarget.hasPointerCapture?.(k.current.pointer)&&e.currentTarget.releasePointerCapture(k.current.pointer),M())},I="left"===m?"right-0":"right"===m?"left-0":"top"===m?"bottom-0":"top-0",T="left"===m?"right":"right"===m?"left":"top"===m?"bottom":"top",$=P?`absolute inset-x-0 ${I} z-10 flex h-2`:`absolute inset-y-0 ${I} z-10 flex w-2`;/* @__PURE__ */
|
|
2
|
+
return s(e,{content:z??N.hint,side:T,delay:600,className:`${$} ${x}`.trim(),children:/* @__PURE__ */s("div",{role:"separator",tabIndex:0,"aria-orientation":h,"aria-label":w??N.label,"aria-valuenow":Math.round(c),"aria-valuemin":f,"aria-valuemax":p,"aria-controls":y,"data-resize-handle":m,onPointerDown:e=>{0===e.button&&(e.preventDefault(),k.current={x:P?e.clientY:e.clientX,width:c,moved:!1,pointer:e.pointerId},e.currentTarget.setPointerCapture?.(e.pointerId),document.body.style.cursor=P?"row-resize":"col-resize",document.body.style.userSelect="none")},onPointerMove:e=>{const r=k.current;if(!r)return;if(0===e.buttons)return void M();const t=(P?e.clientY:e.clientX)-r.x;if(!r.moved){if(Math.abs(t)<3)return;r.moved=!0}const{onResize:o,min:n,max:i,side:s}=D.current;o(l(r.width,t,s,n,i))},onPointerUp:C,onPointerCancel:C,onLostPointerCapture:()=>{k.current&&M()},onDoubleClick:()=>d(a(v,f,p)),onKeyDown:e=>{const r=P?"ArrowDown":"ArrowRight",t=P?"ArrowUp":"ArrowLeft",o=e.key===r?g:e.key===t?-g:null,n=null!==o?l(c,o,m,f,p):"Home"===e.key?f:"End"===e.key?p:"Enter"===e.key?a(v,f,p):null;null!==n&&(e.preventDefault(),n!==c&&d(n))},className:P?"group/resize relative h-full w-full cursor-row-resize touch-none rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"group/resize relative h-full w-full cursor-col-resize touch-none rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */s("div",{"aria-hidden":"true",className:P?`absolute inset-x-0 ${I} h-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))] group-focus-visible/resize:h-0.5 group-focus-visible/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`:`absolute inset-y-0 ${I} w-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))] group-focus-visible/resize:w-0.5 group-focus-visible/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`})})})}export{c as ResizeHandle,u as readStoredWidth,l as resizedWidth};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{setPdfPreview as e}from"./chunk-ESL5TDNA.js";import{setSpreadsheetPreview as t}from"./chunk-VTVSMRFX.js";import{toast_default as n}from"./chunk-
|
|
1
|
+
import{setPdfPreview as e}from"./chunk-ESL5TDNA.js";import{setSpreadsheetPreview as t}from"./chunk-VTVSMRFX.js";import{toast_default as n}from"./chunk-4XZXY2AF.js";var i="react-os-shell:preview-opened";async function o(o){const{filePath:a,filename:r,kind:c,onStaged:s}=o;try{const o=await fetch(`${("undefined"!=typeof window&&window.__REACT_OS_SHELL_FILE_SERVER__||"http://localhost:4000").replace(/\/$/,"")}/api/file?path=${encodeURIComponent(a)}`,{credentials:"include"});if(!o.ok)return n.error(`Download failed (${o.status})`),!1;const d=await o.blob();if("csv"===c){const e=await d.text();t({csv:e,filename:r}),s?.("/spreadsheet")}else{const t=URL.createObjectURL(d);e({url:t,filename:r,kind:c}),s?.("/preview")}return"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(i,{detail:{filePath:a,filename:r,kind:c}})),!0}catch(e){return n.error(e?.message||"Open failed"),!1}}export{i as PREVIEW_OPENED_EVENT,o as openPreviewFile};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Card as e}from"./chunk-
|
|
1
|
+
import{Card as e}from"./chunk-5RAOFJYT.js";import{Radio_default as a}from"./chunk-NI5FXWK5.js";import{Select_default as l}from"./chunk-4DBPKTVX.js";import{FormField as r}from"./chunk-6KBDNYRW.js";import{Checkbox_default as n}from"./chunk-CGZBDI6C.js";import{Textarea_default as i}from"./chunk-PB7G6CJ7.js";import{Input_default as c}from"./chunk-MAMWQCJ6.js";import{Button_default as o}from"./chunk-NHH2MXFU.js";import{useState as t}from"react";import{jsx as m,jsxs as d}from"react/jsx-runtime";function s(){const[s,h]=t("pro"),[u,p]=t(!0),[f,g]=t("us");/* @__PURE__ */
|
|
2
2
|
return m("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */d("form",{className:"mx-auto max-w-2xl space-y-5",onSubmit:e=>e.preventDefault(),children:[
|
|
3
3
|
/* @__PURE__ */d("div",{children:[
|
|
4
4
|
/* @__PURE__ */m("h1",{className:"text-xl font-semibold text-gray-900",children:"Account settings"}),
|