efficient-shell 11.10.0 → 11.12.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 +3 -1
- package/dist/{Browser-FIRNNCSC.js → Browser-LPGSKKLU.js} +17 -17
- package/dist/Calculator-XUV5JV3O.js +29 -0
- package/dist/{CurrencyConverter-LU7QXMOI.js → CurrencyConverter-N2HQT7IR.js} +6 -6
- package/dist/Documents-IRPS3N5T.js +84 -0
- package/dist/Files-VN2IOPHX.js +88 -0
- package/dist/{Notepad-HNED2SWM.js → Notepad-JCWNOQET.js} +10 -10
- package/dist/PdfViewer-M4RTCNNE.js +1 -0
- package/dist/PomodoroTimer-356JUEM3.js +91 -0
- package/dist/{Preview-OGSYTTKC.js → Preview-X7XNDI6X.js} +35 -35
- package/dist/Sidebar-OZMJNAXN.js +44 -0
- package/dist/{Spreadsheet-4HZR2TUV.js → Spreadsheet-YQOVGIU7.js} +67 -67
- package/dist/{Stock-4BOTUHWE.js → Stock-2XOOZNRR.js} +3 -3
- package/dist/{Weather-NDUOK3P3.js → Weather-ZDU2722T.js} +21 -21
- package/dist/{WorldClock-FH6NFTOM.js → WorldClock-PQGERFCH.js} +6 -6
- package/dist/ai/index.js +91 -91
- package/dist/apps/index.d.ts +21 -2
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/CartesianPlot.js +1 -1
- package/dist/charts/ChartBrush.js +1 -1
- package/dist/charts/ChartFrame.js +1 -1
- package/dist/charts/ChartSkeleton.js +1 -1
- package/dist/charts/ChordChart.js +1 -1
- package/dist/charts/ColumnChart.js +1 -1
- package/dist/charts/FunnelChart.js +1 -1
- package/dist/charts/HeatmapChart.js +1 -1
- package/dist/charts/HistogramChart.js +1 -1
- package/dist/charts/Meter.js +1 -1
- package/dist/charts/PieChart.js +1 -1
- package/dist/charts/RadarChart.js +1 -1
- package/dist/charts/RadialBarChart.js +1 -1
- package/dist/charts/RangeChart.js +1 -1
- package/dist/charts/RankedBars.js +1 -1
- package/dist/charts/SankeyChart.js +1 -1
- package/dist/charts/ScatterChart.js +1 -1
- package/dist/charts/SpecChart.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-Z32K3LIJ.js → chunk-225LCPO7.js} +1 -1
- package/dist/{chunk-FNMF42DQ.js → chunk-2E3K4FSQ.js} +2 -2
- package/dist/chunk-2NRNKF46.js +9 -0
- package/dist/{chunk-HTTICQBP.js → chunk-2XOH3NJZ.js} +18 -18
- package/dist/{chunk-4UKPDURO.js → chunk-2XORVHF2.js} +1 -1
- package/dist/{chunk-IDRAW6MT.js → chunk-2ZAFRGRF.js} +2 -2
- package/dist/{chunk-DH2DKQKS.js → chunk-34AHNPW7.js} +1 -1
- package/dist/{chunk-UZ7TKJRO.js → chunk-3N2MNOV5.js} +1 -1
- package/dist/{chunk-PC44XTGN.js → chunk-3PZI2C4R.js} +1 -1
- package/dist/{chunk-DGA4SO27.js → chunk-4APQHXLI.js} +2 -2
- package/dist/chunk-4EVYK6DR.js +14 -0
- package/dist/{chunk-TKE3EF2U.js → chunk-4JJ5WT4D.js} +1 -1
- package/dist/{chunk-QVAOSKFO.js → chunk-4TB4CSLB.js} +8 -8
- package/dist/{chunk-SJQKEIS7.js → chunk-5IESW4PM.js} +5 -5
- package/dist/{chunk-SZTIP6T7.js → chunk-5KKJAYKT.js} +1 -1
- package/dist/{chunk-PBMAMVSE.js → chunk-5UCRYSQJ.js} +5 -5
- package/dist/chunk-5W3U3EVG.js +7 -0
- package/dist/{chunk-VNTJ7QO5.js → chunk-5YP7MFPK.js} +1 -1
- package/dist/chunk-64KZ74CS.js +8 -0
- package/dist/{chunk-ZWLOVJWN.js → chunk-6C6M3QXL.js} +1 -1
- package/dist/{chunk-LLNWE7DR.js → chunk-6CK44QWU.js} +30 -30
- package/dist/{chunk-UIN2LUCZ.js → chunk-6ETRVCMH.js} +14 -14
- package/dist/{chunk-MOL2ND6G.js → chunk-6S6FJJKP.js} +5 -5
- package/dist/{chunk-RSJLN3EG.js → chunk-6UJYRGWY.js} +1 -1
- package/dist/{chunk-AJ6HMM4P.js → chunk-6WPKLF6G.js} +13 -13
- package/dist/{chunk-MQHUVZWM.js → chunk-7A2Y3W55.js} +1 -1
- package/dist/{chunk-HYXDKY2L.js → chunk-7FCIFHO7.js} +1 -1
- package/dist/chunk-7TVGP2SX.js +8 -0
- package/dist/{chunk-R64OZ6TC.js → chunk-7V32O5NF.js} +6 -4
- package/dist/{chunk-YY5TUQS4.js → chunk-AD27M3ZH.js} +3 -3
- package/dist/{chunk-KZ6JVHFI.js → chunk-AO7XAAGG.js} +1 -1
- package/dist/{chunk-NTKNM25F.js → chunk-AQ7CNPEE.js} +9 -9
- package/dist/{chunk-U6IJL4Q5.js → chunk-AWQ5SOC5.js} +1 -1
- package/dist/{chunk-LVHQJ5TW.js → chunk-B2AYI45X.js} +7 -7
- package/dist/chunk-BOJEZKYS.js +14 -0
- package/dist/{chunk-YIFRSPUM.js → chunk-BPJ3CQH7.js} +9 -9
- package/dist/{chunk-IW2QNPDG.js → chunk-CAIKDX2M.js} +2 -2
- package/dist/chunk-CGA6RTVI.js +9 -0
- package/dist/{chunk-YGCVMPIU.js → chunk-CR3YDABU.js} +1 -1
- package/dist/chunk-CR42APAY.js +8 -0
- package/dist/{chunk-YM4XIO4K.js → chunk-CXZ7PHHF.js} +5 -5
- package/dist/{chunk-L3RLB37Y.js → chunk-D4RVWSUT.js} +1 -1
- package/dist/{chunk-PMKR2BF2.js → chunk-D5MN3LXC.js} +17 -17
- package/dist/{chunk-7N4P6LGD.js → chunk-DHMOJX2Z.js} +1 -1
- package/dist/{chunk-RKL47W7I.js → chunk-DMBA6KYQ.js} +6 -6
- package/dist/{chunk-WYSNMIZN.js → chunk-DXKXETTT.js} +1 -1
- package/dist/chunk-EBGOENC3.js +3 -0
- package/dist/{chunk-IAUEISDQ.js → chunk-ELIWGIR7.js} +9 -9
- package/dist/{chunk-OUXSI6X4.js → chunk-EQ72AP5E.js} +1 -1
- package/dist/chunk-ES2LUEPN.js +22 -0
- package/dist/{chunk-SIA3W7VE.js → chunk-F33L4J3P.js} +6 -6
- package/dist/{chunk-D2BXHFYK.js → chunk-FD6XZRWA.js} +1 -1
- package/dist/{chunk-B4D23ZLJ.js → chunk-FEUTN4GK.js} +1 -1
- package/dist/{chunk-E2LRAOCL.js → chunk-FFNPAJLS.js} +10 -10
- package/dist/{chunk-H5YD72OP.js → chunk-FRH2AHPI.js} +1 -1
- package/dist/{chunk-OE77XFOV.js → chunk-FUHURDBL.js} +1 -1
- package/dist/chunk-FZWSP7KJ.js +28 -0
- package/dist/chunk-G3FHFWC2.js +4 -0
- package/dist/{chunk-OZEPYQ7E.js → chunk-GJFTO7D4.js} +1 -1
- package/dist/{chunk-L433UT5E.js → chunk-GJVGGYQ2.js} +1 -1
- package/dist/{chunk-QIVIQUKB.js → chunk-GRC46C4V.js} +7 -7
- package/dist/{chunk-2UTCGWMZ.js → chunk-GS74BABV.js} +4 -4
- package/dist/{chunk-4VF66WBB.js → chunk-HDABS36W.js} +16 -16
- package/dist/{chunk-U7T2ONAY.js → chunk-HGMQOHMK.js} +1 -1
- package/dist/{chunk-HWFBNYNI.js → chunk-HJBR73GS.js} +1 -1
- package/dist/{chunk-ONIL7WXO.js → chunk-HJM4LSMM.js} +1 -1
- package/dist/{chunk-IXSSBGRD.js → chunk-HOEEFFE3.js} +8 -8
- package/dist/{chunk-IKKQ4P4R.js → chunk-HT7SOOMD.js} +10 -10
- package/dist/{chunk-GV5VNWPG.js → chunk-I5GDAQYL.js} +2 -2
- package/dist/{chunk-QL5E3MU3.js → chunk-IFWXC323.js} +1 -1
- package/dist/{chunk-JGVKGEIV.js → chunk-IIKPM3F4.js} +1 -1
- package/dist/{chunk-RPTOAKLB.js → chunk-IJ6HZXZY.js} +1 -1
- package/dist/{chunk-PAC4LK2N.js → chunk-IKKR2TYY.js} +5 -5
- package/dist/{chunk-JJHPPTM6.js → chunk-IUG4Z2ND.js} +1 -1
- package/dist/{chunk-RQ6TC6RM.js → chunk-JFCCI5L2.js} +1 -1
- package/dist/{chunk-NGUXPP5Q.js → chunk-JGWUSJDD.js} +53 -53
- package/dist/{chunk-KPFYXVCO.js → chunk-JJLAI6GL.js} +8 -8
- package/dist/{chunk-KMSK6QQB.js → chunk-JJZAYAVL.js} +1 -1
- package/dist/{chunk-MFDOGLFO.js → chunk-JRCFOZEU.js} +3 -3
- package/dist/{chunk-7QRKZOXR.js → chunk-K3IUUZO5.js} +8 -8
- package/dist/chunk-KU4IWX6F.js +2 -0
- package/dist/{chunk-T2ZFXPQV.js → chunk-KV4QPU6U.js} +21 -21
- package/dist/{chunk-MWKLLAJT.js → chunk-KVVZLEUG.js} +1 -1
- package/dist/{chunk-JADBOQ7S.js → chunk-KYHDDVTR.js} +5 -5
- package/dist/{chunk-P7NO3NGC.js → chunk-L2IPWMLI.js} +7 -7
- package/dist/chunk-L74WV4RJ.js +6 -0
- package/dist/{chunk-ALMBY7QO.js → chunk-LJJ7FDAQ.js} +5 -5
- package/dist/{chunk-AFROFSDW.js → chunk-LLSLY6BT.js} +1 -1
- package/dist/{chunk-EP5BHBZQ.js → chunk-LP45EML2.js} +1 -1
- package/dist/{chunk-4L4GQW7P.js → chunk-LWFH5QTJ.js} +1 -1
- package/dist/{chunk-QIEAZN6Z.js → chunk-LXBBJNBQ.js} +1 -1
- package/dist/{chunk-SXBOODCJ.js → chunk-LXQHTY3A.js} +5 -5
- package/dist/{chunk-V6LPIDZ6.js → chunk-M4AOQYSP.js} +1 -1
- package/dist/{chunk-MG4IUKVP.js → chunk-MD6EPKOR.js} +10 -10
- package/dist/chunk-MFP5KOQW.js +9 -0
- package/dist/{chunk-37JAU3U7.js → chunk-N75MPMLD.js} +1 -1
- package/dist/{chunk-SDAX6BXF.js → chunk-NMQGAP3H.js} +1 -1
- package/dist/{chunk-NFNDXE5O.js → chunk-NPT6EXHK.js} +3 -3
- package/dist/{chunk-DWR6RVX5.js → chunk-NTUZT37J.js} +4 -4
- package/dist/{chunk-FOHOSUK3.js → chunk-O6VIHWYU.js} +1 -1
- package/dist/{chunk-5MGNT7XM.js → chunk-OCWWEHNR.js} +2 -2
- package/dist/{chunk-OQG3XO4Y.js → chunk-OLJUPBY4.js} +1 -1
- package/dist/{chunk-LNGLJA6K.js → chunk-OMROEVOP.js} +1 -1
- package/dist/{chunk-HRXQCHKI.js → chunk-P75N466Z.js} +1 -1
- package/dist/{chunk-VTXCCFJ4.js → chunk-PDFV3YQB.js} +3 -3
- package/dist/{chunk-FTGA5IPI.js → chunk-PETBAYS5.js} +14 -14
- package/dist/{chunk-O4OFURPC.js → chunk-PL4HKGYP.js} +1 -1
- package/dist/{chunk-NSYCJTHE.js → chunk-PMKBWDXO.js} +1 -1
- package/dist/{chunk-OS2KE6QG.js → chunk-PTVTNCD6.js} +4 -4
- package/dist/{chunk-2JTG3U5L.js → chunk-PVVHWLNX.js} +1 -1
- package/dist/{chunk-YMBNVMFU.js → chunk-Q7UTGO73.js} +10 -10
- package/dist/chunk-QDL2FNP7.js +8 -0
- package/dist/{chunk-ED6HJBCO.js → chunk-R6TDZ7T5.js} +1 -1
- package/dist/chunk-R7KRBKFH.js +5 -0
- package/dist/{chunk-PTWKG635.js → chunk-RBAC26J7.js} +4 -4
- package/dist/{chunk-A65PRSKV.js → chunk-RMSF4UCJ.js} +4 -4
- package/dist/{chunk-276JUQXK.js → chunk-RXVFAFEB.js} +1 -1
- package/dist/{chunk-HBS4HYQM.js → chunk-SAASFWKB.js} +1 -1
- package/dist/{chunk-LZJCULO7.js → chunk-SEP35R2E.js} +1 -1
- package/dist/chunk-SI33IE7G.js +2 -0
- package/dist/{chunk-PR42NIDL.js → chunk-SKRFI6WB.js} +12 -12
- package/dist/chunk-SPMD7UZO.js +19 -0
- package/dist/{chunk-5DZN6ZDE.js → chunk-SSM6P43S.js} +9 -9
- package/dist/{chunk-WTTXLWMK.js → chunk-T74FGTLW.js} +8 -8
- package/dist/{chunk-WMS2DCRV.js → chunk-TTQJQKCE.js} +10 -10
- package/dist/{chunk-WDZUPDNC.js → chunk-TZXAW32T.js} +1 -1
- package/dist/{chunk-IEHTZR5M.js → chunk-UBQUXUD2.js} +5 -5
- package/dist/{chunk-ZGQ6H2PU.js → chunk-UCAMOW53.js} +4 -4
- package/dist/{chunk-WZMZ3N5B.js → chunk-UEWB6IOD.js} +2 -2
- package/dist/{chunk-EOYGTVNS.js → chunk-UHGAT5MH.js} +5 -5
- package/dist/{chunk-BAT5B2LE.js → chunk-UOGF37Z4.js} +1 -1
- package/dist/{chunk-GPCTDEXQ.js → chunk-UTITWGVW.js} +1 -1
- package/dist/{chunk-A2SP4IZV.js → chunk-UVMM7AYO.js} +1 -1
- package/dist/{chunk-HYNUJY6W.js → chunk-UZTKBA7Z.js} +12 -12
- package/dist/{chunk-BXTSBORU.js → chunk-VEATEVMV.js} +1 -1
- package/dist/{chunk-DXFG4H4V.js → chunk-VIDT4JLR.js} +1 -1
- package/dist/{chunk-ZM2NOLT6.js → chunk-VU5P4ZM5.js} +12 -12
- package/dist/{chunk-OYTRB237.js → chunk-VVDK7XPH.js} +1 -1
- package/dist/{chunk-TURECNEK.js → chunk-VZ52KKNA.js} +6 -6
- package/dist/{chunk-ZDDYTXPK.js → chunk-WEEQDPU3.js} +6 -6
- package/dist/{chunk-YKEB576T.js → chunk-WOOKUEED.js} +1 -1
- package/dist/{chunk-2V3LKX7G.js → chunk-WZJPASST.js} +6 -6
- package/dist/{chunk-2CPYXRR2.js → chunk-XOH6QERF.js} +7 -7
- package/dist/{chunk-EMUZJMR3.js → chunk-Y4RHGLXB.js} +1 -1
- package/dist/{chunk-FRNSCVPN.js → chunk-YOXR3VKO.js} +1 -1
- package/dist/{chunk-LPTN55KO.js → chunk-YQLKZ5UQ.js} +1 -1
- package/dist/chunk-YXSGMPNW.js +1 -0
- package/dist/{chunk-CFFT5OCV.js → chunk-ZA2RBNRA.js} +1 -1
- package/dist/{chunk-QRZBLNOQ.js → chunk-ZHS2VQU7.js} +3 -3
- package/dist/{chunk-RDTKMSEK.js → chunk-ZKBGUDNB.js} +1 -1
- package/dist/{chunk-GNWK77U7.js → chunk-ZMC25LRC.js} +1 -1
- package/dist/data/DataTable.js +1 -1
- package/dist/data/EntityList.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/data/ResizableTable.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/Input.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/RenameField.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.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/icons/index.js +1 -1
- package/dist/index.js +518 -518
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +3 -3
- package/dist/markdown/index.js +1 -1
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/shell/Accordion.js +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/Avatar.js +1 -1
- package/dist/shell/Banner.js +1 -1
- package/dist/shell/Breadcrumbs.js +1 -1
- package/dist/shell/BudgetBar.js +1 -1
- package/dist/shell/Card.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContainerFillChart.js +1 -1
- package/dist/shell/ContextMenu.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/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/PopupMenu.js +1 -1
- package/dist/shell/ProductionTimeline.js +1 -1
- package/dist/shell/ResizeHandle.js +1 -1
- package/dist/shell/Result.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SettingRow.js +1 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/SidebarNav.js +1 -1
- package/dist/shell/SortableList.js +1 -1
- package/dist/shell/Statistic.js +1 -1
- package/dist/shell/StepChain.js +1 -1
- package/dist/shell/Stepper.js +1 -1
- package/dist/shell/TimeAgo.js +1 -1
- package/dist/shell/TimelineTrack.js +1 -1
- package/dist/shell/TopNav.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/discardGuard.js +1 -1
- package/dist/shell/language.js +1 -1
- package/dist/shell/strings.d.ts +134 -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.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -6
- package/dist/Calculator-ELI5Z3XW.js +0 -29
- package/dist/Documents-CE7YKNJM.js +0 -52
- package/dist/Files-ARRIIZZ6.js +0 -88
- package/dist/PdfViewer-ZRDIG2L2.js +0 -1
- package/dist/PomodoroTimer-ZJ432VPC.js +0 -91
- package/dist/Sidebar-ETWHTFNP.js +0 -44
- package/dist/chunk-4LQRLYB4.js +0 -22
- package/dist/chunk-5CPRZ27M.js +0 -28
- package/dist/chunk-5XVXYBIQ.js +0 -8
- package/dist/chunk-A4FCXZSY.js +0 -8
- package/dist/chunk-ABKCC7VB.js +0 -9
- package/dist/chunk-ABKFALDE.js +0 -8
- package/dist/chunk-FBACFP4U.js +0 -4
- package/dist/chunk-FSRHVB4A.js +0 -9
- package/dist/chunk-G2BZ7NCM.js +0 -19
- package/dist/chunk-IH2KC3NQ.js +0 -5
- package/dist/chunk-LCHU3ZG4.js +0 -9
- package/dist/chunk-N3OJ47VK.js +0 -1
- package/dist/chunk-N7645DNN.js +0 -6
- package/dist/chunk-PEVWAJUR.js +0 -7
- package/dist/chunk-UGOSZLCD.js +0 -14
- package/dist/chunk-WB6E6CSH.js +0 -14
- package/dist/chunk-WQGBYFS3.js +0 -8
- package/dist/chunk-Y2LWUBXX.js +0 -2
- package/dist/chunk-ZQJTLJUF.js +0 -2
- package/dist/chunk-ZVEDA462.js +0 -3
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import{firstEnabledIndex as e,matchTypeahead as t,lastEnabledIndex as r,nextEnabledIndex as i}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as n,groupedRows as a,isOptionGroup as l,OptionCheck as o}from"./chunk-HJBR73GS.js";import{useSettingAuto as d}from"./chunk-2NMW66P5.js";import{inputClasses as s,PLACEHOLDER_INK as c}from"./chunk-AYZY3YNC.js";import{useIsMobile as u}from"./chunk-UGTRSRIW.js";import{optionNoteClass as p}from"./chunk-URHGHXDN.js";import{Icon as m}from"./chunk-7V32O5NF.js";import{onOverlayOpen as v}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as h}from"./chunk-62LW225J.js";import{useDropdownPosition as f,MENU_MAX_HEIGHT as b}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as g}from"./chunk-D65T4H6J.js";import{solidSurfaceStyle as y}from"./chunk-5FYDNH4Y.js";import{registerModalEscapeInterceptor as x}from"./chunk-TWVUQUUD.js";import{useShellStrings as k}from"./chunk-5YP7MFPK.js";import{forwardRef as N,useId as w,useState as $,useRef as D,useMemo as j,useCallback as H,useEffect as S}from"react";import{createPortal as T}from"react-dom";import{jsxs as C,jsx as E,Fragment as O}from"react/jsx-runtime";var I=e=>e.labelStyle?{lineHeight:1.25,...e.labelStyle}:void 0,z=N(function({value:e,onChange:t,options:r,placeholder:i,invalid:n,className:a="",size:l,touchSize:o,renderOption:c,renderValue:u,valueText:p,readOnly:m,footer:v,changed:h,auto:f,multiple:b,"aria-describedby":g,...y},x){const N=t,$=k(),D=d(),j=f??D,H=w(),S=/* @__PURE__ */C("select",{ref:x,value:e,multiple:b||void 0,onChange:e=>N(b?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),"aria-invalid":n||void 0,"aria-describedby":[g,j?H:void 0].filter(Boolean).join(" ")||void 0,className:s({invalid:n,size:l,auto:j,className:`pr-8 ${a}`.trim()}),...y,children:[void 0!==i&&!b&&/* @__PURE__ */E("option",{value:"",disabled:!0,children:i}),
|
|
2
|
+
/* @__PURE__ */E(A,{items:r})]});return j?/* @__PURE__ */C(O,{children:[S,
|
|
3
|
+
/* @__PURE__ */E("span",{id:H,hidden:!0,children:$.settingView.auto})]}):S});function A({items:e}){const t=e=>/* @__PURE__ */E("option",{value:e.value,disabled:e.disabled,lang:e.lang,children:e.label},e.value);/* @__PURE__ */
|
|
4
|
+
return E(O,{children:e.map((e,r)=>(e=>l(e))(e)?/* @__PURE__ */E("optgroup",{label:e.label,children:e.options.map(t)},`group-${r}`):t(e))})}var B=N(function({value:l,onChange:u,options:N,placeholder:z,invalid:B,className:K="",id:P,disabled:R,size:U,touchSize:V,title:F,multiple:Y,renderOption:M,renderValue:W,valueText:G,readOnly:L=!1,footer:J,changed:q=!1,auto:X,"aria-describedby":Q,"aria-label":Z,"aria-labelledby":_,...ee},te){const[re,ie]=$(!1),[ne,ae]=$(-1),le=D(null),oe=D(null),de=D(null),se=D(null),ce=D([]),ue=()=>se.current??de.current,pe=!!J?.length,me="sm"===U,ve=me?"min-h-7 px-3 py-1 text-xs leading-4":"min-h-(--row-height-menu) px-3 py-2 text-sm leading-5",he=p(me),[fe,be]=$(null),ge=k(),ye=D(re);ye.current=re;const xe=D({buffer:"",timer:null}),ke=w(),Ne=`${ke}-listbox`,we=P??`${ke}-trigger`,$e=e=>`${ke}-opt-${e}`,De=`${ke}-changed`,je=d(),He=X??je,Se=`${ke}-auto`,Te=[Q,q?De:void 0,He?Se:void 0].filter(Boolean).join(" ")||void 0,Ce=j(()=>n(N),[N]),Ee=Y?l:[],Oe=u,Ie=f(oe,re,{matchTriggerWidth:!0,...J?.length?{preferredMaxHeight:Number.POSITIVE_INFINITY}:{}}),ze=`${re}|${Ie?.top}|${Ie?.bottom}|${Ie?.maxHeight}|${N.length}`;g(()=>{be(null)},[ze]),g(()=>{const e=de.current;if(!re||!e||null!==fe)return;if(e.scrollHeight<=e.clientHeight+1)return;const t=getComputedStyle(e),r=parseFloat(t.paddingTop)||0;parseFloat(t.paddingBottom);const i=e.getBoundingClientRect().top;let n=0;for(const t of e.querySelectorAll('[role="option"]')){const r=t.getBoundingClientRect().bottom-i+e.scrollTop;if(!(r<=e.clientHeight+.5))break;n=r}n>r&&be(Math.floor(n))},[re,fe,ze]);const Ae=Y?Ce.findIndex(e=>Ee.includes(e.value)):Ce.findIndex(e=>e.value===l),Be=Y?Ce.filter(e=>Ee.includes(e.value)).map(e=>e.label).join(", ")||void 0:Ae>=0?Ce[Ae].label:void 0,Ke=!Y&&Ae>=0?Ce[Ae].lang:void 0,Pe=Y?Ce.filter(e=>Ee.includes(e.value)):Ae>=0?[Ce[Ae]]:[],Re=W&&Pe.length?W(Pe):void 0,Ue=void 0!==Re&&G?G(Pe):void 0,Ve=H((e=!0)=>{ie(!1),ae(-1),e&&oe.current?.focus()},[]),Fe=H(()=>{R||L||(ae(Ae>=0?Ae:e(Ce)),ie(!0))},[R,L,Ce,Ae]),Ye=H(e=>{const t=Ce[e];if(t&&!t.disabled){if(Y){const r=l;return Oe(r.includes(t.value)?r.filter(e=>e!==t.value):[...r,t.value]),void ae(e)}Oe(t.value),Ve()}},[Ce,Y,l,Oe,Ve]);S(()=>{if(!re)return;return x(e=>!("Escape"!==e.key||!ye.current)&&(Ve(),!0),ue)},[re,Ve]),S(()=>{if(!re)return;const e=e=>{const t=e.target;le.current?.contains(t)||ue()?.contains(t)||Ve(!1)};document.addEventListener("pointerdown",e);const t=v(()=>Ve(!1));return()=>{document.removeEventListener("pointerdown",e),t()}},[re,Ve]),S(()=>{!re||ne<0||de.current?.querySelector(`#${CSS.escape($e(ne))}`)?.scrollIntoView({block:"nearest"})},[re,ne]);const Me=H(e=>{const r=xe.current;r.timer&&clearTimeout(r.timer),r.buffer+=e,r.timer=setTimeout(()=>{r.buffer="",r.timer=null},500);const i=re?ne:Ae,n=t(Ce,r.buffer,i);n<0||(re?ae(n):Y?(ae(n),ie(!0)):Ye(n))},[re,ne,Ae,Ce,Ye,Y]),We=re?a(N,(e,t)=>{const r=(i=e.value,Y?Ee.includes(i):l===i);var i;const n=t===ne;/* @__PURE__ */
|
|
5
|
+
return C("div",{id:$e(t),role:"option",lang:e.description||e.labelStyle||M?void 0:e.lang,"aria-selected":r,"aria-disabled":e.disabled||void 0,onPointerEnter:()=>{e.disabled||ae(t)},onClick:()=>Ye(t),className:`mx-1 cursor-pointer truncate rounded-lg ${ve}${Y?" flex items-center gap-2":""}\n ${e.disabled?"cursor-not-allowed text-gray-400":n?"bg-blue-50 text-blue-700":r?"font-medium text-blue-600":"text-gray-700"}`,children:[Y&&/* @__PURE__ */E(o,{selected:r}),M?/* @__PURE__ */E("span",{className:"block min-w-0 flex-1 truncate",children:M(e,{selected:r,active:n})}):Y?/* @__PURE__ */C("span",{className:"block min-w-0 flex-1",children:[
|
|
6
|
+
/* @__PURE__ */E("span",{lang:e.lang,className:"block truncate",style:I(e),children:e.label}),e.description&&/* @__PURE__ */E("span",{className:he,children:e.description})]}):e.description||e.labelStyle?
|
|
7
|
+
/* @__PURE__ */C(O,{children:[
|
|
8
|
+
/* @__PURE__ */E("span",{lang:e.lang,className:"block truncate",style:I(e),children:e.label}),e.description&&/* @__PURE__ */E("span",{className:he,children:e.description})]}):e.label]},e.value)},ke,"mx-1"):null,Ge=void 0!==Re?
|
|
9
|
+
/* @__PURE__ */C("span",{className:"relative block min-w-0 truncate",children:[
|
|
10
|
+
/* @__PURE__ */E("span",{"aria-hidden":"true","data-select-value":"",className:"flex min-w-0 items-center gap-2 truncate",children:Re}),
|
|
11
|
+
/* @__PURE__ */E("span",{lang:void 0===Ue?Ke:void 0,className:"sr-only",children:Ue??Be})]}):/* @__PURE__ */E("span",{lang:Ke,className:`block truncate ${void 0===Be?c:""}`,children:Be??z??" "}),Le={zIndex:h.popup,left:Ie?.left,top:Ie?.top,bottom:Ie?.bottom,width:Ie?.width,maxHeight:Ie?.maxHeight??b,visibility:Ie?void 0:"hidden",...y()},Je=/* @__PURE__ */E("div",{ref:de,id:Ne,role:"listbox","aria-labelledby":_??(Z?void 0:we),"aria-label":_?void 0:Z,"aria-multiselectable":Y||void 0,className:pe?"min-h-0 shrink overflow-y-auto py-1":"fixed overflow-y-auto rounded-(--radius-popup) py-1",style:pe?null!==fe?{maxHeight:fe}:void 0:null!==fe?{...Le,maxHeight:fe}:Le,children:We}),qe=pe?/* @__PURE__ */C("div",{ref:se,className:"fixed flex flex-col overflow-hidden rounded-(--radius-popup)",style:Le,children:[Je,
|
|
12
|
+
/* @__PURE__ */E("div",{className:"shrink-0 border-t border-(--rosh-glass-solid-border) px-1 py-1",children:J.map((e,t)=>/* @__PURE__ */C("button",{ref:e=>{ce.current[t]=e},type:"button","data-select-action":"","aria-disabled":e.disabled||void 0,onClick:()=>(e=>{e.disabled||(Ve(),e.onSelect())})(e),onKeyDown:e=>((e,t)=>{const r=(J?.length??0)-1,i=t=>{e.preventDefault(),ce.current[t]?.focus()},n=()=>{e.preventDefault(),oe.current?.focus()};switch(e.key){case"ArrowDown":return void i(Math.min(t+1,r));case"ArrowUp":return void(0===t?n():i(t-1));case"Home":return void i(0);case"End":return void i(r);case"Tab":return e.shiftKey?void(0===t?n():i(t-1)):t<r?void i(t+1):(e.preventDefault(),void Ve());case"Escape":return e.preventDefault(),e.stopPropagation(),void Ve()}})(e,t),className:`flex w-full items-center gap-2 rounded-lg ${ve} text-left rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${e.disabled?"cursor-not-allowed text-ink-faintest":"cursor-pointer text-ink hover:bg-accent-tint hover:text-blue-700"}`,children:[e.icon&&/* @__PURE__ */E(m,{name:e.icon,"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
|
|
13
|
+
/* @__PURE__ */E("span",{className:"min-w-0 flex-1 truncate",children:e.label})]},e.label))})]}):Je;/* @__PURE__ */
|
|
14
|
+
return C("div",{ref:le,className:"relative",children:[
|
|
15
|
+
/* @__PURE__ */E("button",{ref:oe,id:we,type:"button",role:"combobox","aria-haspopup":"listbox","aria-expanded":re,"aria-controls":re?Ne:void 0,"aria-activedescendant":re&&ne>=0?$e(ne):void 0,"aria-invalid":B||void 0,"aria-describedby":Te,"aria-label":Z,"aria-labelledby":_,title:F,disabled:R,"aria-readonly":L||void 0,onClick:()=>re?Ve():Fe(),onKeyDown:t=>{if(!R&&!L)switch(t.key){case"ArrowDown":return t.preventDefault(),void(re?ae(e=>i(Ce,e,1)):Fe());case"ArrowUp":return t.preventDefault(),void(re?ae(e=>i(Ce,e,-1)):Fe());case"Home":return void(re&&(t.preventDefault(),ae(e(Ce))));case"End":return void(re&&(t.preventDefault(),ae(r(Ce))));case"Enter":return void(re&&(t.preventDefault(),Ye(ne)));case" ":return t.preventDefault(),void(re?Ye(ne):Fe());case"Escape":return void(re&&(t.preventDefault(),t.stopPropagation(),Ve()));case"Tab":return re&&pe&&!t.shiftKey?(t.preventDefault(),void ce.current[0]?.focus()):void(re&&Ve(!1));default:1!==t.key.length||t.metaKey||t.ctrlKey||t.altKey||(t.preventDefault(),Me(t.key))}},className:s({invalid:B,size:U,readOnly:L,auto:He,className:`${L?"":"pr-8 "}text-left ${K}`.trim()}),children:q?
|
|
16
|
+
/* @__PURE__ */C("span",{className:"flex min-w-0 items-center gap-1",children:[Ge,
|
|
17
|
+
/* @__PURE__ */E("span",{"aria-hidden":"true","data-select-changed":"",className:"shrink-0",children:"*"})]}):Ge}),q&&/* @__PURE__ */E("span",{id:De,hidden:!0,children:ge.select.changed}),He&&/* @__PURE__ */E("span",{id:Se,hidden:!0,children:ge.settingView.auto}),!L&&/* @__PURE__ */E(m,{name:"chevron-up-down","aria-hidden":"true",className:`pointer-events-none absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 ${c}`,strokeWidth:2}),
|
|
18
|
+
/* @__PURE__ */C("select",{ref:te,value:l,multiple:Y||void 0,onChange:e=>Oe(Y?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),disabled:R,"aria-hidden":"true",tabIndex:-1,className:"sr-only",...ee,children:[void 0!==z&&!Y&&/* @__PURE__ */E("option",{value:"",disabled:!0,children:z}),
|
|
19
|
+
/* @__PURE__ */E(A,{items:N})]}),re&&T(qe,document.body)]})}),K=N(function({touchSize:e,...t},r){const i=u(),n=e??"touch";return!i||void 0===t.footer&&void 0===t.changed||t.readOnly?i&&!t.readOnly?/* @__PURE__ */E(z,{ref:r,...t,size:n}):/* @__PURE__ */E(B,{ref:r,...t}):/* @__PURE__ */E(B,{ref:r,...t,size:n})});export{z as NativeSelect,K as Select_default};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{FormField as e}from"./chunk-6KBDNYRW.js";import{dropzoneClass as t,zoneFocusClass as a,CloseGlyph as r}from"./chunk-
|
|
2
|
-
return o(e,{label:g,htmlFor
|
|
3
|
-
/* @__PURE__ */o("button",{ref
|
|
1
|
+
import{FormField as e}from"./chunk-6KBDNYRW.js";import{dropzoneClass as t,zoneFocusClass as a,CloseGlyph as r}from"./chunk-GJVGGYQ2.js";import{useFileIntake as n,humanSize as i,FileIntakeAlert as s}from"./chunk-ZKBGUDNB.js";import{useShellStrings as l}from"./chunk-5YP7MFPK.js";import{forwardRef as c,useId as m}from"react";import{jsxs as o,jsx as d}from"react/jsx-runtime";var p=c(function({files:c,onChange:p,accept:u,acceptHint:h,multiple:x=!0,maxSizeBytes:b,maxFiles:f,disabled:y=!1,label:g,hint:N,error:j,required:k,className:v=""},B){const $=m(),z=l().files,C=n({accept:u,acceptHint:h,maxSizeBytes:b,maxFiles:f,multiple:x,disabled:y,currentCount:c.length,onAccept:e=>p(x?[...c,...e]:e.slice(0,1))}),F=j?`${$}-error`:N?`${$}-hint`:void 0;/* @__PURE__ */
|
|
2
|
+
return o(e,{label:g,htmlFor:$,hint:N,error:j,required:k,className:v,children:[
|
|
3
|
+
/* @__PURE__ */o("button",{ref:B,type:"button",id:$,disabled:y,onClick:C.open,"aria-invalid":!!j||void 0,"aria-required":k||void 0,"aria-describedby":F,...C.zoneProps,className:t(C.dragOver,y,a(y),"px-4 py-6"),children:[
|
|
4
4
|
/* @__PURE__ */o("span",{children:[
|
|
5
|
-
/* @__PURE__ */d("span",{className:"text-sm font-medium text-blue-600",children:x?
|
|
6
|
-
/* @__PURE__ */d("span",{className:"text-sm text-gray-500",children:` ${x?
|
|
7
|
-
/* @__PURE__ */d("input",{...
|
|
5
|
+
/* @__PURE__ */d("span",{className:"text-sm font-medium text-blue-600",children:x?z.chooseMany:z.chooseOne}),
|
|
6
|
+
/* @__PURE__ */d("span",{className:"text-sm text-gray-500",children:` ${x?z.dragMany:z.dragOne}`})]}),h&&/* @__PURE__ */d("span",{className:"text-xs text-gray-400",children:h})]}),
|
|
7
|
+
/* @__PURE__ */d("input",{...C.inputProps}),c.length>0&&/* @__PURE__ */d("ul",{className:"mt-2 flex flex-col gap-1",children:c.map((e,t)=>/* @__PURE__ */o("li",{className:"flex items-center justify-between gap-3 rounded-md bg-gray-50 px-3 py-2",children:[
|
|
8
8
|
/* @__PURE__ */d("span",{className:"min-w-0 flex-1 truncate text-sm text-gray-800",title:e.name,children:e.name}),
|
|
9
|
-
/* @__PURE__ */d("span",{className:"shrink-0 text-xs tabular-nums text-gray-500",children:i(e.size,
|
|
10
|
-
/* @__PURE__ */d("button",{type:"button",disabled:y,onClick:()=>{
|
|
11
|
-
/* @__PURE__ */d(s,{rejections:
|
|
9
|
+
/* @__PURE__ */d("span",{className:"shrink-0 text-xs tabular-nums text-gray-500",children:i(e.size,z)}),
|
|
10
|
+
/* @__PURE__ */d("button",{type:"button",disabled:y,onClick:()=>{C.clearRejections(),p(c.filter((e,a)=>a!==t))},"aria-label":z.remove(e.name),className:"shrink-0 text-gray-400 hover:text-gray-600",children:/* @__PURE__ */d(r,{})})]},`${e.name}-${t}`))}),
|
|
11
|
+
/* @__PURE__ */d(s,{rejections:C.rejections})]})});export{p as FilePicker_default};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import{useShellStrings as e}from"./chunk-
|
|
1
|
+
import{useShellStrings as e}from"./chunk-5YP7MFPK.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)),F=y.reduce((e,t)=>e+q(t),0),P=y.reduce((e,t)=>e+A(t),0),Q=w?Math.max(F,P):"actual"===m&&P||F,_=Q<=34.65?"20ft":"40ft",B="20ft"===_?33:67,K=Q>0?Math.max(1,Math.ceil(Q/B)):0,S=K*B,Y=Q>0&&Q>=.95*S&&Q<=1.1*S;if(0===y.length)return null;const z=(e,t)=>B>0?Math.max(0,Math.min((e-t*B)/B*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)]})]}),
|
|
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)]})]}),Q>0?/* @__PURE__ */t("div",{className:"space-y-2",children:[Array.from({length:K}).map((e,l)=>{const n=z(F,l),s=z(P,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
|
-
/* @__PURE__ */a("span",{className:"text-2xs text-ink-faintest w-8 shrink-0",children:
|
|
7
|
+
/* @__PURE__ */a("span",{className:"text-2xs text-ink-faintest w-8 shrink-0",children:_}),
|
|
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(
|
|
10
|
+
/* @__PURE__ */a("span",{className:"text-2xs text-ink-faint w-16 text-right",children:i?p.fill(Math.min(P-l*B,B),B):p.fill(Math.min(F-l*B,B),B)})]},`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(F)]}),
|
|
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
|
-
/* @__PURE__ */a("span",{className:"inline-block w-2 h-2 rounded-full bg-green-500"}),p.loaded(
|
|
18
|
-
/* @__PURE__ */t("span",{className:"font-medium "+(
|
|
17
|
+
/* @__PURE__ */a("span",{className:"inline-block w-2 h-2 rounded-full bg-green-500"}),p.loaded(P)]})]}):/* @__PURE__ */a("b",{className:"text-gray-700",children:p.volume(Q)})]}),
|
|
18
|
+
/* @__PURE__ */t("span",{className:"font-medium "+(Y?"text-green-600":"text-gray-500"),children:[Y&&"✓ ",K," × ",_]})]})]}):/* @__PURE__ */a("div",{className:"text-xs text-gray-400",children:p.noVolume})]})}export{s as ContainerFillChart};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import{escapeHtml as e}from"./chunk-G6DKCCWH.js";import{TH_ONE_LINE as t}from"./chunk-WGLHB6WE.js";import{useBrowserLayoutEffect as n}from"./chunk-D65T4H6J.js";import{useShellStrings as r}from"./chunk-
|
|
2
|
-
return h("div",{...n,dangerouslySetInnerHTML:r})}function g({columns:e,data:g,onChange:f,onColumnsChange:p,fixedRows:b=!1,minRows:y=15,maxHeight:v="260px",cellStyles:x,onFocusChange:M,onSelectionChange:D}){const k=o(null),C=r().grid,[E,L]=l(null);c(()=>{M?.(E)},[E,M]);const[$,S]=l({}),
|
|
1
|
+
import{escapeHtml as e}from"./chunk-G6DKCCWH.js";import{TH_ONE_LINE as t}from"./chunk-WGLHB6WE.js";import{useBrowserLayoutEffect as n}from"./chunk-D65T4H6J.js";import{useShellStrings as r}from"./chunk-5YP7MFPK.js";import{useRef as o,useState as l,useEffect as c,useCallback as a,useMemo as s}from"react";import{createPortal as i}from"react-dom";import{jsxs as u,jsx as h,Fragment as d}from"react/jsx-runtime";function w(e,t){const n=e[e.length-1];return n&&!n.some(e=>e.trim())?e:[...e,Array(t).fill("")]}function m({text:t,...n}){const r=s(()=>({__html:e(t)}),[t]);/* @__PURE__ */
|
|
2
|
+
return h("div",{...n,dangerouslySetInnerHTML:r})}function g({columns:e,data:g,onChange:f,onColumnsChange:p,fixedRows:b=!1,minRows:y=15,maxHeight:v="260px",cellStyles:x,onFocusChange:M,onSelectionChange:D}){const k=o(null),C=r().grid,[E,L]=l(null);c(()=>{M?.(E)},[E,M]);const[$,S]=l({}),z=o(null),[N,A]=l({}),K=o(null),[O,T]=l(null),[P,R]=l(null),[F,H]=l(null),[I,Y]=l(null),[j,W]=l(null),X=o(null);n(()=>{const e=X.current;if(!e||e.row!==j?.row||e.col!==j?.col)return;X.current=null;const t=k.current?.querySelector(`[data-row="${e.row}"][data-col="${e.col}"]`);if(!t)return;t.focus();const n=document.createRange();n.selectNodeContents(t),n.collapse(!1);const r=window.getSelection();r?.removeAllRanges(),r?.addRange(n)},[j]);const[q,B]=l(null),[G,_]=l(null);c(()=>{D?.(q&&G?{anchor:q,end:G}:null)},[q,G,D]);const J=o(!1),[U,V]=l(null),Q=o(!1),Z=o({a:null,e:null});Z.current={a:q,e:G};const ee=q&&G&&(q.row!==G.row||q.col!==G.col),te=[...g];if(!b)for(;te.length<y;)te.push(Array(e.length).fill(""));const ne=a((t,n,r)=>{const o=te.map(e=>[...e]);for(;o.length<=t;)o.push(Array(e.length).fill(""));for(;o[t].length<e.length;)o[t].push("");o[t][n]=r,f(o)},[te,e.length,f]),re=a((e,t,n)=>{if(0!==e.button)return;const r=document.activeElement;if(r?.dataset?.row&&r?.dataset?.col){const e=parseInt(r.dataset.row),t=parseInt(r.dataset.col),n=r.textContent||"";if(n!==(te[e]?.[t]||"")){const r=te.map(e=>[...e]);r[e]&&(r[e][t]=n,f(r))}}J.current=!0,e.shiftKey&&q||B({row:t,col:n}),_({row:t,col:n})},[te,f,q]),oe=a((e,t)=>{J.current&&_({row:e,col:t})},[]);c(()=>{const e=()=>{J.current=!1};return window.addEventListener("mouseup",e),()=>window.removeEventListener("mouseup",e)},[]),c(()=>{const e=e=>{if(!e.ctrlKey&&!e.metaKey||"c"!==e.key)return;if(!q||!G)return;const t=window.getSelection();if(t&&t.toString().length>0&&!ee)return;const n=Math.min(q.row,G.row),r=Math.max(q.row,G.row),o=Math.min(q.col,G.col),l=Math.max(q.col,G.col),c=[];for(let e=n;e<=r;e++){const t=[];for(let n=o;n<=l;n++)t.push(te[e]?.[n]||"");c.push(t.join("\t"))}const a=c.join("\n");a&&(e.preventDefault(),navigator.clipboard.writeText(a))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[q,G,te,ee]),c(()=>{const t=t=>{if(!E)return;const n=document.activeElement;if(n?.isContentEditable)return;if(!k.current?.contains(n))return;const r=t.clipboardData?.getData("text/plain");if(!r)return;t.preventDefault();const o=r.split("\n").filter(e=>e).map(e=>e.split("\t")),l=te.map(e=>[...e]);for(let t=0;t<o.length;t++){const n=E.row+t;for(;l.length<=n;)l.push(Array(e.length).fill(""));for(;l[n].length<e.length;)l[n].push("");for(let r=0;r<o[t].length;r++){const c=E.col+r;if(c>=e.length)break;e[c].readOnly||(l[n][c]=o[t][r].trim())}}f(b?l:w(l,e.length)),B({row:E.row,col:E.col}),_({row:Math.min(E.row+o.length-1,l.length-1),col:Math.min(E.col+(o[0]?.length||1)-1,e.length-1)})};return window.addEventListener("paste",t),()=>window.removeEventListener("paste",t)},[E,te,e,f,b]);const le=a((t,n,r)=>{const o=t.clipboardData.getData("text/plain");if(!o)return;const l=o.split("\n").map(e=>e.split("\t"));if(l.length<=1&&l[0]?.length<=1)return;t.preventDefault();const c=te.map(e=>[...e]);for(let t=0;t<l.length;t++){const o=n+t;for(;c.length<=o;)c.push(Array(e.length).fill(""));for(;c[o].length<e.length;)c[o].push("");for(let n=0;n<l[t].length;n++){const a=r+n;if(a>=e.length)break;e[a].readOnly||(c[o][a]=l[t][n].trim())}}f(b?c:w(c,e.length))},[te,e,f,b]),ce=a((t,n,r)=>{let o=n,l=r;if("Tab"===t.key)t.preventDefault(),l=t.shiftKey?r-1:r+1,l>=e.length&&(l=0,o=n+1),l<0&&(l=e.length-1,o=n-1);else if("Enter"===t.key)t.preventDefault(),o=t.shiftKey?n-1:n+1;else if("ArrowDown"===t.key)t.preventDefault(),o=n+1;else if("ArrowUp"===t.key)t.preventDefault(),o=n-1;else if("ArrowLeft"===t.key)t.preventDefault(),l=r-1;else{if("ArrowRight"!==t.key){if("Delete"===t.key||"Backspace"===t.key){const o=t.target;if(o.isContentEditable)return void(o.textContent&&window.getSelection()?.toString()===o.textContent&&(t.preventDefault(),ne(n,r,"")));if(t.preventDefault(),q&&G){const t=Math.min(q.row,G.row),n=Math.max(q.row,G.row),r=Math.min(q.col,G.col),o=Math.max(q.col,G.col),l=te.map(e=>[...e]);for(let c=t;c<=n;c++)for(let t=r;t<=o;t++)l[c]&&!e[t]?.readOnly&&(l[c][t]="");f(l)}else ne(n,r,"");return}return}t.preventDefault(),l=r+1}for(;l>=0&&l<e.length&&e[l].readOnly;)l+="Tab"===t.key&&t.shiftKey?-1:1;if(o>=0&&o<te.length&&l>=0&&l<e.length){const e=k.current?.querySelector(`[data-row="${o}"][data-col="${l}"]`);e&&(e.focus({preventScroll:!0}),e.scrollIntoView({block:"nearest",inline:"nearest"}),L({row:o,col:l}),W(null),B({row:o,col:l}),_({row:o,col:l}))}},[e,te,te.length,ne,q,G,f]),ae=a(t=>{if(!b&&t>=te.length-2){const t=te.map(e=>[...e]);for(let n=0;n<5;n++)t.push(Array(e.length).fill(""));f(t)}},[b,te,e.length,f]),[se,ie]=l(null);c(()=>{if(!se)return;const e=()=>ie(null);return window.addEventListener("pointerdown",e),()=>window.removeEventListener("pointerdown",e)},[se]);const ue=a(t=>{const n=te.map(e=>[...e]);n.splice(t,0,Array(e.length).fill("")),f(n)},[te,e.length,f]),he=a(e=>{if(te.length<=1)return;const t=te.filter((t,n)=>n!==e);f(t)},[te,f]),de=a(e=>{const t=te.map(t=>{const n=[...t];return n.splice(e,0,""),n});f(t)},[te,f]),we=a(t=>{if(e.length<=1)return;const n=te.map(e=>{const n=[...e];return n.splice(t,1),n});f(n)},[te,e.length,f]),me=a((e,t)=>{e.preventDefault(),b||ie({x:e.clientX,y:e.clientY,items:[{label:C.insertRowAbove,onClick:()=>{ue(t),ie(null)}},{label:C.insertRowBelow,onClick:()=>{ue(t+1),ie(null)}},{label:C.deleteRow(t+1),onClick:()=>{he(t),ie(null)}}]})},[b,ue,he,C]),ge=a((t,n)=>{t.preventDefault(),b||ie({x:t.clientX,y:t.clientY,items:[{label:C.insertColumnLeft,onClick:()=>{de(n),ie(null)}},{label:C.insertColumnRight,onClick:()=>{de(n+1),ie(null)}},{label:C.deleteColumn(String(e[n]?.title||n+1)),onClick:()=>{we(n),ie(null)}}]})},[b,e,de,we,C]),fe=t=>$[t]??e[t]?.width??150;c(()=>{const t=e=>{if(!z.current)return;const t=e.clientX-z.current.startX,n=Math.max(40,z.current.startW+t);S(e=>({...e,[z.current.col]:n}))},n=()=>{if(z.current&&p){const t=e.map((e,t)=>({...e,width:$[t]??e.width}));t[z.current.col]={...t[z.current.col],width:$[z.current.col]??e[z.current.col].width},p(t)}z.current=null,document.body.style.cursor=""};return window.addEventListener("mousemove",t),window.addEventListener("mouseup",n),()=>{window.removeEventListener("mousemove",t),window.removeEventListener("mouseup",n)}},[e,$,p]);const pe=e=>N[e]??28;c(()=>{const e=e=>{if(!K.current)return;const t=e.clientY-K.current.startY,n=Math.max(20,K.current.startH+t);A(e=>({...e,[K.current.row]:n}))},t=()=>{K.current=null,document.body.style.cursor=""};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}},[]);const be=a(t=>{const n=document.createElement("canvas").getContext("2d");if(!n)return;n.font="12px ui-monospace, SFMono-Regular, Menlo, monospace";let r=0;for(const e of te){const o=String(e[t]??"").replace(/<[^>]*>/g,""),l=n.measureText(o).width;l>r&&(r=l)}const o=n.measureText(e[t]?.title??"").width;o>r&&(r=o);const l=Math.max(40,Math.ceil(r+24));if(S(e=>({...e,[t]:l})),p){const n=e.map((e,n)=>({...e,width:n===t?l:$[n]??e.width}));p(n)}},[te,e,$,p]),ye=a(e=>{A(t=>{const n={...t};return delete n[e],n})},[]),ve=a(t=>{const{a:n,e:r}=Z.current;if(!n||!r)return;const o=Math.min(n.row,r.row),l=Math.max(n.row,r.row),c=Math.min(n.col,r.col),a=Math.max(n.col,r.col);let s=o,i=l,u=c,h=a;t.row>l?i=t.row:t.row<o&&(s=t.row),t.col>a?h=t.col:t.col<c&&(u=t.col);const d=l-o+1,w=a-c+1,m=te.map(e=>[...e]);for(;m.length<=i;)m.push(Array(e.length).fill(""));for(const e of m)for(;e.length<=h;)e.push("");function g(e){const t=e.map(e=>parseFloat(e));if(t.length<2||t.some(e=>Number.isNaN(e)))return null;const n=t[1]-t[0];for(let e=2;e<t.length;e++)if(Math.abs(t[e]-t[e-1]-n)>1e-9)return null;return{step:n}}for(let e=s;e<=i;e++)for(let t=u;t<=h;t++){if(e>=o&&e<=l&&t>=c&&t<=a)continue;let n;if(1===w&&u===c&&h===a){const r=g(Array.from({length:d},(e,n)=>m[o+n]?.[t]??""));if(r){const c=parseFloat(m[l]?.[t]??"0"),a=parseFloat(m[o]?.[t]??"0"),s=e>l?e-l:-(o-e);n=String((e>l?c:a)+r.step*s)}else{const r=((e-o)%d+d)%d;n=m[o+r]?.[t]??""}}else if(1===d&&s===o&&i===l){const r=g(Array.from({length:w},(t,n)=>m[e]?.[c+n]??""));if(r){const o=parseFloat(m[e]?.[a]??"0"),l=parseFloat(m[e]?.[c]??"0"),s=t>a?t-a:-(c-t);n=String((t>a?o:l)+r.step*s)}else{const r=((t-c)%w+w)%w;n=m[e]?.[c+r]??""}}else{const r=((e-o)%d+d)%d,l=((t-c)%w+w)%w;n=m[o+r]?.[c+l]??""}m[e][t]=n}f(m),B({row:s,col:u}),_({row:i,col:h})},[te,e.length,f]);c(()=>{const e=e=>{if(!Q.current)return;const t=document.elementFromPoint(e.clientX,e.clientY),n=t?.closest?.("[data-row][data-col]");if(!n)return;const r=parseInt(n.dataset.row),o=parseInt(n.dataset.col);V({row:r,col:o})},t=()=>{Q.current&&U&&ve(U),Q.current=!1,V(null),document.body.style.cursor=""};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}},[U,ve]);const xe=e=>{e.preventDefault(),e.stopPropagation(),Q.current=!0,document.body.style.cursor="crosshair"},Me=o(null),[De,ke]=l(0),[Ce,Ee]=l(800);c(()=>{const e=Me.current;if(!e)return;const t=()=>Ee(e.clientHeight||800);t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]);const Le=te.length>100,$e=Le?Math.max(0,Math.floor(De/28)-20):0,Se=Le?Math.min(te.length,Math.ceil((De+Ce)/28)+20):te.length,ze=s(()=>te.slice($e,Se),[te,$e,Se]),Ne=28*$e,Ae=28*(te.length-Se),Ke="px-2 h-8 text-left text-xs font-medium text-ink-faint uppercase bg-gray-100 border-b border-r border-line select-none";/* @__PURE__ */
|
|
3
3
|
return u("div",{ref:Me,className:"border border-gray-300 rounded overflow-scroll grid-scroll",style:{maxHeight:v,height:v},onScroll:e=>ke(e.target.scrollTop),children:[
|
|
4
4
|
/* @__PURE__ */u("table",{ref:k,className:"border-collapse select-none",style:{tableLayout:"fixed",minWidth:36+e.reduce((t,n)=>t+fe(e.indexOf(n)),0)},children:[
|
|
5
5
|
/* @__PURE__ */u("colgroup",{children:[
|
|
6
6
|
/* @__PURE__ */h("col",{style:{width:36}}),e.map((e,t)=>/* @__PURE__ */h("col",{style:{width:fe(t)}},e.key))]}),
|
|
7
7
|
/* @__PURE__ */h("thead",{className:"sticky top-0 z-10",children:/* @__PURE__ */u("tr",{children:[
|
|
8
|
-
/* @__PURE__ */h("th",{className:`${t} ${
|
|
9
|
-
return u("th",{className:`${t} ${
|
|
10
|
-
/* @__PURE__ */h("div",{className:"absolute -right-1 top-0 bottom-0 w-2 cursor-col-resize z-20",onMouseDown:e=>((e,t)=>{e.preventDefault(),e.stopPropagation(),
|
|
11
|
-
/* @__PURE__ */u("tbody",{children:[
|
|
8
|
+
/* @__PURE__ */h("th",{className:`${t} ${Ke} text-center w-9 cursor-pointer hover:bg-gray-200`,onClick:()=>{B({row:0,col:0}),_({row:te.length-1,col:e.length-1})},title:C.selectAll,children:"#"}),e.map((n,r)=>{const o=q&&G&&Math.min(q.col,G.col)<=r&&r<=Math.max(q.col,G.col)&&0===Math.min(q.row,G.row)&&Math.max(q.row,G.row)===te.length-1;/* @__PURE__ */
|
|
9
|
+
return u("th",{className:`${t} ${Ke} cursor-pointer hover:bg-gray-200 relative${o?" !bg-blue-200":""}${I===r?" !bg-blue-100":""}`,style:{width:fe(r)},draggable:!0,onDragStart:()=>(e=>H(e))(r),onDragOver:e=>((e,t)=>{e.preventDefault(),Y(t)})(e,r),onDrop:()=>(t=>{if(null===F||F===t)return H(null),void Y(null);const n=te.map(e=>{const n=[...e],[r]=n.splice(F,1);return n.splice(t,0,r),n});if(f(n),p){const n=[...e],[r]=n.splice(F,1);n.splice(t,0,r),p(n)}H(null),Y(null)})(r),onDragEnd:()=>{H(null),Y(null)},onClick:e=>{e.shiftKey&&q||B({row:0,col:r}),_({row:te.length-1,col:r})},onContextMenu:e=>ge(e,r),children:[n.title,
|
|
10
|
+
/* @__PURE__ */h("div",{className:"absolute -right-1 top-0 bottom-0 w-2 cursor-col-resize z-20",onMouseDown:e=>((e,t)=>{e.preventDefault(),e.stopPropagation(),z.current={col:t,startX:e.clientX,startW:fe(t)},document.body.style.cursor="col-resize"})(e,r),onDoubleClick:e=>{e.stopPropagation(),be(r)},title:C.resize})]},n.key)})]})}),
|
|
11
|
+
/* @__PURE__ */u("tbody",{children:[Ne>0&&/* @__PURE__ */h("tr",{style:{height:Ne}}),ze.map((t,n)=>{const r=$e+n,o=q&&G&&Math.min(q.row,G.row)<=r&&r<=Math.max(q.row,G.row)&&0===Math.min(q.col,G.col)&&Math.max(q.col,G.col)===e.length-1;/* @__PURE__ */
|
|
12
12
|
return u("tr",{style:{height:pe(r)},children:[
|
|
13
|
-
/* @__PURE__ */u("td",{className:`relative px-1 py-1 text-center text-2xs text-ink-faintest border-b border-r border-line bg-surface-sunken select-none cursor-pointer hover:bg-gray-200${o?" !bg-blue-200 !text-gray-700":""}${
|
|
14
|
-
/* @__PURE__ */h("div",{className:"absolute -bottom-1 left-0 right-0 h-2 cursor-row-resize z-20",onMouseDown:e=>((e,t)=>{e.preventDefault(),e.stopPropagation(),
|
|
15
|
-
return u("td",{className:`relative px-0 py-0 border-b border-r border-gray-200 text-sm${e.readOnly?" bg-gray-50 text-gray-500 cursor-default":" cursor-cell"}${o?" !bg-blue-100":""}${c&&!o?" ring-2 ring-inset ring-blue-400":""}${w?" !bg-blue-50 ring-1 ring-inset ring-blue-300":""}`,onMouseDown:e=>{if(e.target===e.currentTarget){re(e,r,n);const t=e.currentTarget.querySelector("[data-row][data-col]");t?.focus()}},onMouseEnter:()=>oe(r,n),onClick:e=>{if(e.target===e.currentTarget){const t=e.currentTarget.querySelector("[data-row][data-col]");t?.focus()}},onDoubleClick:t=>{t.target!==t.currentTarget||e.readOnly||
|
|
16
|
-
/* @__PURE__ */h(m,{contentEditable:l,suppressContentEditableWarning:!0,tabIndex:0,"data-row":r,"data-col":n,className:`w-full h-full px-2 py-1 rosh-focus-ring whitespace-nowrap overflow-hidden ${"right"===e.align?"text-right":"center"===e.align?"text-center":""} ${e.readOnly?"cursor-default":"cursor-cell"} font-mono ${g}${f}`,onMouseDown:e=>re(e,r,n),onMouseEnter:()=>oe(r,n),onDoubleClick:()=>{e.readOnly||
|
|
13
|
+
/* @__PURE__ */u("td",{className:`relative px-1 py-1 text-center text-2xs text-ink-faintest border-b border-r border-line bg-surface-sunken select-none cursor-pointer hover:bg-gray-200${o?" !bg-blue-200 !text-gray-700":""}${P===r?" !bg-blue-100":""}`,draggable:!0,onDragStart:()=>(e=>T(e))(r),onDragOver:e=>((e,t)=>{e.preventDefault(),R(t)})(e,r),onDrop:()=>(e=>{if(null===O||O===e)return T(null),void R(null);const t=te.map(e=>[...e]),[n]=t.splice(O,1);t.splice(e,0,n),f(t),T(null),R(null)})(r),onDragEnd:()=>{T(null),R(null)},onClick:t=>{t.shiftKey&&q||B({row:r,col:0}),_({row:r,col:e.length-1})},onContextMenu:e=>me(e,r),children:[r+1,
|
|
14
|
+
/* @__PURE__ */h("div",{className:"absolute -bottom-1 left-0 right-0 h-2 cursor-row-resize z-20",onMouseDown:e=>((e,t)=>{e.preventDefault(),e.stopPropagation(),K.current={row:t,startY:e.clientY,startH:pe(t)},document.body.style.cursor="row-resize"})(e,r),onDoubleClick:e=>{e.stopPropagation(),ye(r)},title:C.resize})]}),e.map((e,n)=>{const o=q&&G&&function(e,t,n,r){const o=Math.min(e.row,t.row),l=Math.max(e.row,t.row),c=Math.min(e.col,t.col),a=Math.max(e.col,t.col);return n>=o&&n<=l&&r>=c&&r<=a}(q,G,r,n),l=j?.row===r&&j?.col===n&&!e.readOnly,c=E?.row===r&&E?.col===n,a=x?.[`${r}:${n}`],s=q&&G?Math.max(q.row,G.row):-1,i=q&&G?Math.max(q.col,G.col):-1,d=q&&G&&r===s&&n===i,w=Q.current&&U&&q&&G&&(()=>{const e=Math.min(q.row,G.row),t=Math.max(q.row,G.row),o=Math.min(q.col,G.col),l=Math.max(q.col,G.col);let c=e,a=t,s=o,i=l;return U.row>t?a=U.row:U.row<e&&(c=U.row),U.col>l?i=U.col:U.col<o&&(s=U.col),r>=c&&r<=a&&n>=s&&n<=i&&!(r>=e&&r<=t&&n>=o&&n<=l)})(),g="sm"===a?.fontSize?"text-2xs":"lg"===a?.fontSize?"text-sm":"xl"===a?.fontSize?"text-base":"text-xs",f=`${a?.bold?" font-bold":""}${a?.italic?" italic":""}${a?.underline?" underline":""}`;/* @__PURE__ */
|
|
15
|
+
return u("td",{className:`relative px-0 py-0 border-b border-r border-gray-200 text-sm${e.readOnly?" bg-gray-50 text-gray-500 cursor-default":" cursor-cell"}${o?" !bg-blue-100":""}${c&&!o?" ring-2 ring-inset ring-blue-400":""}${w?" !bg-blue-50 ring-1 ring-inset ring-blue-300":""}`,onMouseDown:e=>{if(e.target===e.currentTarget){re(e,r,n);const t=e.currentTarget.querySelector("[data-row][data-col]");t?.focus()}},onMouseEnter:()=>oe(r,n),onClick:e=>{if(e.target===e.currentTarget){const t=e.currentTarget.querySelector("[data-row][data-col]");t?.focus()}},onDoubleClick:t=>{t.target!==t.currentTarget||e.readOnly||W({row:r,col:n})},children:[
|
|
16
|
+
/* @__PURE__ */h(m,{contentEditable:l,suppressContentEditableWarning:!0,tabIndex:0,"data-row":r,"data-col":n,className:`w-full h-full px-2 py-1 rosh-focus-ring whitespace-nowrap overflow-hidden ${"right"===e.align?"text-right":"center"===e.align?"text-center":""} ${e.readOnly?"cursor-default":"cursor-cell"} font-mono ${g}${f}`,onMouseDown:e=>re(e,r,n),onMouseEnter:()=>oe(r,n),onDoubleClick:()=>{e.readOnly||W({row:r,col:n})},onFocus:()=>{L({row:r,col:n}),J.current||(B({row:r,col:n}),_({row:r,col:n}))},onBlur:e=>{const o=e.currentTarget.textContent||"";o!==(t[n]||"")&&ne(r,n,o),W(null)},onInput:()=>ae(r),onPaste:e=>le(e,r,n),onKeyDown:t=>{if(!(l||e.readOnly||1!==t.key.length||t.ctrlKey||t.metaKey||t.altKey))return t.preventDefault(),ne(r,n,t.key),X.current={row:r,col:n},void W({row:r,col:n});ce(t,r,n)},text:t[n]||""}),d&&/* @__PURE__ */h("div",{onMouseDown:xe,title:C.fill,className:"absolute -bottom-[3px] -right-[3px] w-[7px] h-[7px] bg-blue-500 border border-white cursor-crosshair z-30 hover:bg-blue-600"})]},n)})]},r)}),Ae>0&&/* @__PURE__ */h("tr",{style:{height:Ae}})]})]}),se&&i(
|
|
17
17
|
/* @__PURE__ */u(d,{children:[
|
|
18
18
|
/* @__PURE__ */h("div",{className:"fixed inset-0 z-(--z-popup)",onPointerDown:()=>ie(null)}),
|
|
19
19
|
/* @__PURE__ */h("div",{className:"fixed z-(--z-popup) bg-surface rounded-lg shadow-lg border border-line py-1 min-w-[160px]",style:{left:se.x,top:se.y},children:se.items.map((e,t)=>/* @__PURE__ */h("button",{onPointerDown:t=>{t.stopPropagation(),e.onClick()},className:"w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm text-ink hover:bg-gray-100",children:e.label},t))})]}),document.body)]})}export{g as EditableGrid,w as withSpareRow};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-7V32O5NF.js";import{jsx as t,jsxs as r}from"react/jsx-runtime";var a=()=>/* @__PURE__ */t(e,{name:"check",className:"h-3.5 w-3.5","aria-hidden":"true"});function i({items:e,value:i,onChange:n,"aria-label":l,className:s=""}){const c=Math.max(0,e.findIndex(e=>e.id===i));/* @__PURE__ */
|
|
2
2
|
return t("ol",{"aria-label":l,className:`grid items-start ${s}`.trim(),style:{gridTemplateColumns:`repeat(${Math.max(e.length,1)}, minmax(0, 1fr))`},children:e.map((i,l)=>{const s=l<c?"complete":l===c?"current":"upcoming",o="complete"===s&&!!n,m=/* @__PURE__ */t("span",{"aria-hidden":"true",className:["flex h-7 w-7 shrink-0 items-center justify-center rounded-full text-xs font-semibold transition-colors","complete"===s?"bg-blue-600 text-white":"","current"===s?"border-2 border-blue-600 bg-white text-blue-600":"","upcoming"===s?"border-2 border-gray-300 bg-white text-gray-400":""].filter(Boolean).join(" "),children:"complete"===s?/* @__PURE__ */t(a,{}):l+1}),d=/* @__PURE__ */r("span",{className:"min-w-0 text-center",children:[
|
|
3
3
|
/* @__PURE__ */t("span",{className:"block text-sm font-medium "+("upcoming"===s?"text-gray-400":"text-gray-900"),children:i.label}),i.description&&/* @__PURE__ */t("span",{className:"block text-xs text-gray-500",children:i.description})]});/* @__PURE__ */
|
|
4
4
|
return r("li",{"aria-current":"current"===s?"step":void 0,className:"relative flex min-w-0 justify-center",children:[l<e.length-1&&/* @__PURE__ */t("span",{"aria-hidden":"true",className:"absolute top-3.5 h-0.5 rounded "+(l<c?"bg-blue-600":"bg-gray-200"),style:{left:"calc(50% + 0.875rem)",right:"calc(-50% + 0.875rem)"}}),o?/* @__PURE__ */r("button",{type:"button",onClick:()=>n?.(i.id),className:"relative z-10 flex min-w-0 flex-col items-center gap-2 rounded px-2 text-center rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:[m,d]}):/* @__PURE__ */r("span",{className:"relative z-10 flex min-w-0 flex-col items-center gap-2 px-2 text-center",children:[m,d]})]},i.id)})})}export{i as Stepper};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{isFocusableEntry as e,menuStatusIds as t,renderMenuEntries as r}from"./chunk-
|
|
2
|
-
return y("div",{ref:
|
|
3
|
-
/* @__PURE__ */x("button",{ref:
|
|
4
|
-
/* @__PURE__ */x(i,{portal:!0,className:E,style:ue,children:/* @__PURE__ */y("div",{ref:
|
|
5
|
-
/* @__PURE__ */x("div",{ref:
|
|
1
|
+
import{isFocusableEntry as e,menuStatusIds as t,renderMenuEntries as r}from"./chunk-34AHNPW7.js";import{useTabLayer as n,focusableIn as o}from"./chunk-CDAJKLGL.js";import{PopupMenu as i,PopupMenuDivider as a}from"./chunk-4TB4CSLB.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as s}from"./chunk-62LW225J.js";import{placeMenu as d,popupBounds as c,followAnchor as u}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as p}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as f}from"./chunk-TWVUQUUD.js";import{useState as m,useRef as h,useId as g,useCallback as v,useEffect as b}from"react";import{jsxs as y,jsx as x}from"react/jsx-runtime";var k=/(^|[\s:])!?z-/,w={paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:"0.25rem",paddingBottom:"0.25rem"};function D({trigger:D,items:L,align:j="end",side:A="bottom","aria-label":C,className:S="",triggerClassName:W,menuClassName:E="",minWidth:K=180,linkAs:H,disabled:N,id:$,"aria-describedby":T,"aria-disabled":B=!1,onOpenChange:U,footer:I,footerLabel:J}){const[q,G]=m(!1),[M,P]=m(-1),z=h(null),R=h(null),O=h(null),Q=h(null),V=h(null),Y=null!=I&&!1!==I,F=h({text:"",at:0}),X=g(),Z=g(),_=$??Z,ee=h(U);ee.current=U;const te=h(q);te.current=q;const re=v(e=>{G(!1),te.current&&(te.current=!1,ee.current?.(!1)),e&&R.current?.focus()},[]),ne=(t,r)=>{const n=L.length;for(let o=0;o<n;o+=1){const i=((t+r*o)%n+n)%n;if(e(L[i]))return i}return-1},oe=()=>O.current?.closest("[data-popup-menu-tree]")??null;b(()=>{if(!q)return;const e=e=>{const t=e.target;if(z.current?.contains(t)||oe()?.contains(t))return;const r=oe()?.getAttribute("data-popup-menu-tree"),n=t.closest?.("[data-popup-menu-tree]");r&&n?.getAttribute("data-popup-menu-tree")===r||re(!1)};document.addEventListener("pointerdown",e,!0);const t=l(()=>re(!1));return()=>{document.removeEventListener("pointerdown",e,!0),t()}},[q,re]);const ie=v(()=>{const e=oe(),t=R.current;if(!e||!t)return;const r=e.style;r.left="0px",r.top="0px",r.maxWidth="none",r.maxHeight="none";const n={width:e.offsetWidth,height:e.offsetHeight},o=d({trigger:t.getBoundingClientRect(),menu:n,bounds:c(t),align:j,side:A});r.left=`${o.left}px`,r.top=`${o.top}px`,r.maxWidth=`${o.maxWidth}px`,r.maxHeight=`${o.maxHeight}px`,r.overflowY=n.height>o.maxHeight?"auto":"",e.dataset.side=o.side,e.dataset.align=j},[j,A]);p(()=>{q&&ie()}),b(()=>{if(q)return u(()=>R.current,ie)},[q,ie]),b(()=>{if(!q)return;const t=O.current,r=e(L[M])?t?.querySelector(`[data-dropdown-index="${M}"]`):null;(r??t)?.focus({preventScroll:!0})},[q,M]),b(()=>{if(q)return f(e=>"Escape"===e.key&&(re(!0),!0),()=>Q.current)},[q,re]),n(Q,q&&Y);const ae=h(null),le=e=>"first"===e?ne(0,1):ne(L.length-1,-1),se=e=>{P(le(e)),G(!0),te.current||(te.current=!0,ae.current=e,U?.(!0))};p(()=>{const e=ae.current;if(!q||!e)return;ae.current=null;const t=le(e);t!==M&&P(t)});const de=t(L,X),ce="function"==typeof I?I({close:()=>re(!0)}):I,ue={...k.test(E)?{}:{zIndex:s.popup},minWidth:K};/* @__PURE__ */
|
|
2
|
+
return y("div",{ref:z,className:`relative inline-flex ${S}`.trim(),children:[
|
|
3
|
+
/* @__PURE__ */x("button",{ref:R,id:_,type:"button","aria-haspopup":"menu","aria-expanded":q,"aria-controls":q?X:void 0,"aria-label":C,"aria-describedby":T,"aria-disabled":B||void 0,disabled:N,onClick:()=>{B||(q?re(!1):se("first"))},onKeyDown:e=>{B||("ArrowDown"===e.key||"Enter"===e.key||" "===e.key?(e.preventDefault(),se("first")):"ArrowUp"===e.key&&(e.preventDefault(),se("last")))},className:W??"inline-flex items-center justify-center rounded-(--radius-control) text-gray-600 transition-colors not-disabled:not-aria-disabled:hover:bg-gray-100 not-disabled:not-aria-disabled:hover:text-ink-strongest rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] disabled:cursor-not-allowed disabled:opacity-60 "+(C?"h-8 min-w-8 px-0":"h-8 min-w-8 gap-2 px-3"),children:D}),q&&
|
|
4
|
+
/* @__PURE__ */x(i,{portal:!0,className:E,style:ue,children:/* @__PURE__ */y("div",{ref:Q,children:[
|
|
5
|
+
/* @__PURE__ */x("div",{ref:O,id:X,role:"menu","aria-orientation":"vertical","aria-label":C,"aria-labelledby":C?void 0:_,"aria-describedby":de,tabIndex:-1,onKeyDown:t=>{if(!t.target.closest?.("[data-popup-submenu-panel]")||"Tab"===t.key)if("ArrowDown"===t.key)t.preventDefault(),P(ne(M+1,1));else if("ArrowUp"===t.key)t.preventDefault(),P(ne(M-1,-1));else if("Home"===t.key)t.preventDefault(),P(ne(0,1));else if("End"===t.key)t.preventDefault(),P(ne(L.length-1,-1));else if("Tab"===t.key){t.preventDefault();const e=!t.shiftKey&&V.current?o(V.current)[0]:void 0;e?e.focus({preventScroll:!0}):re(!0)}else if(" "===t.key){const e=t.target;e.matches?.("a[href]")&&(t.preventDefault(),e.click())}else 1!==t.key.length||t.ctrlKey||t.metaKey||t.altKey||(t=>{const r=Date.now(),n=t.key.toLowerCase(),o=r-F.current.at<500?F.current.text+n:n;F.current={text:o,at:r};const i=[...o].every(e=>e===o[0]),a=i?o[0]:o,l=i?M+1:Math.max(M,0),s=O.current,d=L.length;for(let r=0;r<d;r+=1){const n=((l+r)%d+d)%d;if(e(L[n])&&(s?.querySelector(`[data-dropdown-index="${n}"]`)?.textContent?.trim().toLowerCase()??"").startsWith(a))return t.preventDefault(),void P(n)}})(t)},children:r(L,{menuId:X,choose:e=>{e.disabled||(re(!0),e.onSelect())},toggle:e=>{e.disabled||e.onSelect()},followLink:()=>re(!0),rowProps:(e,t)=>({"data-dropdown-index":e,tabIndex:e===M?0:-1,onMouseEnter:()=>{t.disabled||V.current?.contains(document.activeElement)||P(e)}}),linkAs:H})}),Y&&/* @__PURE__ */y("div",{ref:V,role:"group","aria-label":J,"data-dropdown-footer":"",onKeyDown:e=>{const t=V.current;if("Tab"!==e.key||!t||!t.contains(e.target))return;const r=o(t),n=document.activeElement;if(e.shiftKey){if(r.length>0&&n!==r[0])return;e.preventDefault();const t=O.current?.querySelector(`[data-dropdown-index="${M}"]`);return void(t??O.current)?.focus({preventScroll:!0})}r.length>0&&n!==r[r.length-1]||(e.preventDefault(),re(!0))},children:[
|
|
6
6
|
/* @__PURE__ */x("div",{"aria-hidden":"true",children:/* @__PURE__ */x(a,{})}),
|
|
7
7
|
/* @__PURE__ */x("div",{style:w,children:ce})]})]})})]})}export{D as DropdownMenu};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{InputNumber_default as e}from"./chunk-
|
|
2
|
-
return c(y.Provider,{value:r,children:e})}function g({value:r,onChange:a,min:w,max:g,step:S=1,shiftStep:z,precision:F,inputMin:
|
|
3
|
-
/* @__PURE__ */c("input",{id:H,type:"range",min:w,max:g,step:S,value:Z,disabled:
|
|
4
|
-
/* @__PURE__ */c("div",{ref:_,"data-slider-box":"",className:"shrink-0 text-xs",style:{width:ae?.width??le,...ee?{fontSize:ee.fontSize}:{}},children:/* @__PURE__ */c(e,{value:r,onChange:e=>{null!=e?e<
|
|
1
|
+
import{InputNumber_default as e}from"./chunk-I5GDAQYL.js";import{useSettingAuto as t}from"./chunk-2NMW66P5.js";import{useBrowserLayoutEffect as i}from"./chunk-D65T4H6J.js";import{useShellStrings as n}from"./chunk-5YP7MFPK.js";import{createContext as r,useState as l,useMemo as a,useId as o,useRef as d,useContext as u,useEffect as s}from"react";import{jsx as c,jsxs as m}from"react/jsx-runtime";var f=(e,t,i)=>Math.min(i,Math.max(t,e));function p(e){const t=String(e),i=/e-(\d+)$/.exec(t);return i?Number(i[1]):t.split(".")[1]?.length??0}var h=8,v=40;function x(e){return Math.max(1,...e.map(e=>(e??"").length))}function b(e,t,i,n){return Number(f(e,t,i).toFixed(n))}var y=r(null);function w({children:e}){const[t,i]=l({}),n=a(()=>(e,t)=>i(i=>{if(null===t){if(!(e in i))return i;const t={...i};return delete t[e],t}return i[e]===t?i:{...i,[e]:t}}),[]),r=a(()=>{const e=Object.values(t);return{set:n,width:e.length?`max(${e.join(", ")})`:null}},[t,n]);/* @__PURE__ */
|
|
2
|
+
return c(y.Provider,{value:r,children:e})}function g({value:r,onChange:a,min:w,max:g,step:S=1,shiftStep:z,precision:F,inputMin:k,inputMax:N,suffix:j,showInput:L=!0,emptyLabel:M,placeholderValue:$,stepFrom:K,label:A,"aria-labelledby":D,valueText:C,id:P,disabled:E,size:R="md",boxSize:W="sm",className:I="",auto:T}){const V=n(),Y=o(),q=t(),B=T??q,G=o(),H=P??Y,J=F??p(S),O=k??w,Q=N??g,U=void 0!==M||void 0!==$,X=K??$,Z=f(r??$??w,w,g),_=d(null),[ee,te]=l(null),ie=Boolean(j);i(()=>{const e=()=>{const e=_.current?.querySelector("input");if(!e)return;const t=getComputedStyle(e),i=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"].reduce((e,i)=>e+(parseFloat(t[i])||0),0);i<=0||te(e=>e&&e.frame===i&&e.fontSize===t.fontSize?e:{frame:i,fontSize:t.fontSize})};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[ie,L]);const ne=e=>C?C(e):"string"==typeof j?`${e.toFixed(J)} ${j}`:void 0,re=null==r?M??(null!=$?ne($)??String($):void 0):ne(r),le=`calc(${x([w.toFixed(J),g.toFixed(J),r?.toFixed(J),M,$?.toFixed(J)])}ch + ${(ee?.frame??10+(ie?v:h))+2}px)`,ae=u(y),oe=o(),de=ae?.set;return i(()=>{de&&de(oe,L?le:null)},[de,oe,le,L]),s(()=>()=>de?.(oe,null),[de,oe]),/* @__PURE__ */m("div",{"data-slider":"",className:`flex w-full min-w-0 items-center gap-3 ${I}`.trim(),children:[
|
|
3
|
+
/* @__PURE__ */c("input",{id:H,type:"range",min:w,max:g,step:S,value:Z,disabled:E,"aria-label":D?void 0:A,"aria-labelledby":D,"aria-valuetext":re,"aria-describedby":B?G:void 0,onKeyDown:e=>{const t="ArrowUp"===e.key||"ArrowRight"===e.key?1:"ArrowDown"===e.key||"ArrowLeft"===e.key?-1:0;if(!t||e.altKey||e.ctrlKey||e.metaKey)return;const i=e.shiftKey&&null!=z;if(!i&&!(null==r&&null!=X))return;e.preventDefault();a(b((r??X??Z)+t*(i?z??S:S),w,g,J))},onChange:e=>a(b(Number(e.target.value),w,g,J)),className:"min-w-24 flex-1 cursor-pointer accent-blue-600 disabled:cursor-not-allowed disabled:opacity-60 "+("sm"===R?"h-1":"h-1.5")}),L&&
|
|
4
|
+
/* @__PURE__ */c("div",{ref:_,"data-slider-box":"",className:"shrink-0 text-xs",style:{width:ae?.width??le,...ee?{fontSize:ee.fontSize}:{}},children:/* @__PURE__ */c(e,{value:r,onChange:e=>{null!=e?e<O||e>Q||a(e):U&&a(null)},min:O,max:Q,step:S,shiftStep:z,stepFrom:X,precision:J,snap:!0,allowEmpty:U,suffix:j,disabled:E,placeholder:M??(null!=$?$.toFixed(J):void 0),size:W,auto:B,"aria-label":A?V.slider.value(A):void 0,"aria-labelledby":A?void 0:D})}),B&&/* @__PURE__ */c("span",{id:G,hidden:!0,children:V.settingView.auto})]})}export{g as Slider,w as SliderGroup,b as settleSliderValue,x as sliderBoxChars,p as stepDecimals};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Tooltip as e}from"./chunk-NJN5IKWO.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-NJN5IKWO.js";import{useBrowserLayoutEffect as r}from"./chunk-D65T4H6J.js";import{useShellStrings as t}from"./chunk-5YP7MFPK.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),M=o({onResize:d,min:f,max:p,side:m});M.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 D=i(()=>{k.current=null,document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")},[]);n(()=>D,[D]);const I=e=>{k.current&&(e.currentTarget.hasPointerCapture?.(k.current.pointer)&&e.currentTarget.releasePointerCapture(k.current.pointer),D())},C="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 ${C} z-10 flex h-2`:`absolute inset-y-0 ${C} 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 D();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}=M.current;o(l(r.width,t,s,n,i))},onPointerUp:I,onPointerCancel:I,onLostPointerCapture:()=>{k.current&&D()},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 ${C} 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 ${C} 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,4 +1,4 @@
|
|
|
1
|
-
import{CloseGlyph as e}from"./chunk-
|
|
1
|
+
import{CloseGlyph as e}from"./chunk-GJVGGYQ2.js";import{IconButton_default as t}from"./chunk-LE5LWALR.js";import{humanSize as n,useFileIntake as r,FileIntakeAlert as a}from"./chunk-ZKBGUDNB.js";import{Button_default as s}from"./chunk-EOVXFXVV.js";import{Icon as i}from"./chunk-7V32O5NF.js";import{useShellStrings as c}from"./chunk-5YP7MFPK.js";import{useRef as l,useEffect as o}from"react";import{jsx as d,jsxs as u}from"react/jsx-runtime";function m({className:e="h-4 w-4"}){/* @__PURE__ */
|
|
2
2
|
return d(i,{name:"attach",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:e})}function p({className:e="h-4 w-4"}){/* @__PURE__ */
|
|
3
3
|
return d(i,{name:"page",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:e})}function h({intake:e,dropLabel:t,className:n="",children:r}){const a=c().files;/* @__PURE__ */
|
|
4
4
|
return u("div",{...e.zoneProps,...e.pasteProps,className:`relative ${n}`,children:[r,
|
|
@@ -6,8 +6,8 @@ return u("div",{...e.zoneProps,...e.pasteProps,className:`relative ${n}`,childre
|
|
|
6
6
|
return u("li",{className:"flex max-w-full items-center gap-2 rounded-md border border-line bg-surface-sunken py-1 pl-2 pr-1 text-xs text-ink",children:[c?/* @__PURE__ */d("img",{src:c,alt:"",className:"h-6 w-6 shrink-0 rounded object-cover"}):/* @__PURE__ */d("span",{className:"text-gray-400",children:/* @__PURE__ */d(p,{})}),
|
|
7
7
|
/* @__PURE__ */d("span",{className:"min-w-0 truncate",title:t.name,children:t.name}),
|
|
8
8
|
/* @__PURE__ */d("span",{className:"shrink-0 tabular-nums text-gray-400",children:n(t.size,i)}),r&&/* @__PURE__ */d("button",{type:"button",disabled:a,onClick:()=>r(s),"aria-label":i.remove(t.name),className:"shrink-0 rounded p-0.5 text-gray-400 hover:bg-gray-200 hover:text-gray-600 disabled:cursor-not-allowed",children:/* @__PURE__ */d(e,{className:"h-3.5 w-3.5"})})]},`${t.name}-${t.size}-${s}`)})})}function b({onClick:e,count:n=0,variant:r="button",label:a,disabled:i=!1}){const l=c().files,o=a??l.attach,p=n>0?`${o} (${n})`:o;return"icon"===r?/* @__PURE__ */u("span",{className:"relative inline-flex",children:[
|
|
9
|
-
/* @__PURE__ */d(t,{"aria-label":p,onClick:e,disabled:i,size:"sm",children:/* @__PURE__ */d(m,{})}),n>0&&/* @__PURE__ */d("span",{"aria-hidden":"true",className:"pointer-events-none absolute -right-1 -top-1 min-w-[1rem] rounded-full bg-accent-fill px-1 text-center text-2xs font-semibold leading-4 text-on-accent",children:n})]}):/* @__PURE__ */d(s,{type:"button",variant:"secondary",size:"sm",onClick:e,disabled:i,leftIcon:/* @__PURE__ */d(m,{}),children:p})}function x({files:e,onChange:t,accept:n,maxSizeBytes:s,maxFiles:i,acceptHint:c,disabled:m=!1,dropLabel:p,attachLabel:x,trigger:g="button",actions:k,onReject:j,className:N="",children:
|
|
10
|
-
/* @__PURE__ */d(f,{files:e,disabled:m,onRemove:n=>{
|
|
9
|
+
/* @__PURE__ */d(t,{"aria-label":p,onClick:e,disabled:i,size:"sm",children:/* @__PURE__ */d(m,{})}),n>0&&/* @__PURE__ */d("span",{"aria-hidden":"true",className:"pointer-events-none absolute -right-1 -top-1 min-w-[1rem] rounded-full bg-accent-fill px-1 text-center text-2xs font-semibold leading-4 text-on-accent",children:n})]}):/* @__PURE__ */d(s,{type:"button",variant:"secondary",size:"sm",onClick:e,disabled:i,leftIcon:/* @__PURE__ */d(m,{}),children:p})}function x({files:e,onChange:t,accept:n,maxSizeBytes:s,maxFiles:i,acceptHint:c,disabled:m=!1,dropLabel:p,attachLabel:x,trigger:g="button",actions:k,onReject:j,className:N="",children:v}){const L=r({accept:n,maxSizeBytes:s,maxFiles:i,acceptHint:c,disabled:m,multiple:!0,currentCount:e.length,onAccept:n=>t([...e,...n])}),y=l([]);return o(()=>{j&&L.rejections.length>0&&L.rejections!==y.current&&(y.current=L.rejections,j(L.rejections))},[L.rejections,j]),/* @__PURE__ */u(h,{intake:L,dropLabel:p,className:N,children:[v,
|
|
10
|
+
/* @__PURE__ */d(f,{files:e,disabled:m,onRemove:n=>{L.clearRejections(),t(e.filter((e,t)=>t!==n))},className:"mt-2"}),
|
|
11
11
|
/* @__PURE__ */u("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[
|
|
12
|
-
/* @__PURE__ */d(b,{onClick:
|
|
13
|
-
/* @__PURE__ */d(a,{rejections:
|
|
12
|
+
/* @__PURE__ */d(b,{onClick:L.open,count:e.length,variant:g,label:x,disabled:m}),k]}),
|
|
13
|
+
/* @__PURE__ */d(a,{rejections:L.rejections})]})}export{b as AttachButton,h as AttachmentDropZone,f as AttachmentList,x as ComposerAttachments,m as PaperclipGlyph};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Button_default as e}from"./chunk-EOVXFXVV.js";import{Icon as r}from"./chunk-
|
|
1
|
+
import{Button_default as e}from"./chunk-EOVXFXVV.js";import{Icon as r}from"./chunk-7V32O5NF.js";import{useShellStrings as t}from"./chunk-5YP7MFPK.js";import{jsxs as a,jsx as d}from"react/jsx-runtime";function n({title:n,message:o,onRetry:s,variant:i="dashed"}){const m=t().list;/* @__PURE__ */
|
|
2
2
|
return a("div",{className:`flex flex-col items-center justify-center text-center ${"card"===i?"rounded-md border border-gray-200 bg-white px-6 py-12":"none"===i?"px-6 py-12":"rounded-lg border-2 border-dashed border-red-200 px-6 py-12"}`,role:"alert",children:[
|
|
3
3
|
/* @__PURE__ */d(r,{name:"warning",className:"h-10 w-10 text-red-300 mb-3",strokeWidth:1,"aria-hidden":"true"}),
|
|
4
4
|
/* @__PURE__ */d("h3",{className:"text-sm font-medium text-gray-900",children:n??m.loadError}),
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{optionNoteClass as e}from"./chunk-URHGHXDN.js";import{DEFAULT_SHELL_STRINGS as n,useShellStrings as o}from"./chunk-
|
|
1
|
+
import{optionNoteClass as e}from"./chunk-URHGHXDN.js";import{DEFAULT_SHELL_STRINGS as n,useShellStrings as o}from"./chunk-5YP7MFPK.js";import{jsxs as t,jsx as a}from"react/jsx-runtime";function l(n){const o=n.depth?{paddingInlineStart:16*n.depth+"px"}:{};/* @__PURE__ */
|
|
2
2
|
return t("span",{"data-move-target":"",className:"flex min-w-0 flex-col",style:o,children:[
|
|
3
3
|
/* @__PURE__ */a("span",{children:n.label}),n.disabledReason&&/* @__PURE__ */a("span",{className:e(),children:n.disabledReason})]})}function r({count:e,kind:o="file",targets:t,onPick:a},r=n.media){const i=[{type:"label",key:"move-to",label:r.moveTo(e,o)}];if(!t.length)return i.push({type:"status",key:"move-nowhere",label:r.moveNowhere}),i;let s;return t.forEach((e,n)=>{(n>0&&e.group!==s||0===n&&e.group)&&(n>0&&i.push({type:"divider",key:`group-line:${n}`}),e.group&&i.push({type:"label",key:`group:${n}`,label:e.group})),s=e.group,i.push({key:e.key,label:l(e),disabled:!!e.disabledReason,onSelect:()=>a(e)})}),i}function i(e,o=n.media){const{head:t=!0,icon:a,disabled:l,key:i="move-to-menu",...s}=e,u=r(s,o);return{type:"submenu",key:i,label:o.moveToMenu,icon:a,disabled:l,maxHeight:320,items:t?u:u.slice(1)}}function s(e){return r(e,o().media)}export{r as mediaMoveItems,i as mediaMoveSubmenu,s as useMediaMoveItems};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ShellStringsProvider as t}from"./chunk-
|
|
1
|
+
import{ShellStringsProvider as t}from"./chunk-5YP7MFPK.js";import{createContext as e,useEffect as a,useCallback as n,useMemo as r,useContext as l}from"react";import{jsx as o}from"react/jsx-runtime";var g={tag:"en",name:"English",locale:null},c="react-os-shell:language",u=t=>"string"==typeof t?t:t.tag;function i(t){try{const e=new Intl.Locale(t).maximize();return{language:e.language,script:e.script}}catch{return null}}function s(t,e){const a=e.map(u),n=t.toLowerCase(),r=a.find(t=>t.toLowerCase()===n);if(r)return r;const l=i(t);if(!l)return;const o=a.map(t=>({tag:t,parts:i(t)})).filter(t=>t.parts?.language===l.language);return(o.find(t=>t.parts?.script===l.script)??o[0])?.tag}function f(){try{return globalThis.localStorage?.getItem(c)??null}catch{return null}}function m(t){try{return globalThis.localStorage?.setItem(c,t),globalThis.localStorage?.getItem(c)===t}catch{return!1}}function h({offered:t,fallback:e,saved:a=f(),preferred:n=globalThis.navigator?.languages??[]}){const r=e??(t.length>0?u(t[0]):g.tag);if(a){const e=s(a,t);if(e)return e}for(const e of n){const a=s(e,t);if(a)return a}return r}var d=e({language:g.tag,languages:[g],setLanguage:async()=>{}}),p=()=>globalThis.location?.reload();function b({languages:e,language:l,strings:g,onChange:c,reload:u=p,children:i}){const s=e.find(t=>t.tag===l),f=s?void 0===s.locale?s.tag:s.locale??void 0:void 0;a(()=>{const t=globalThis.document?.documentElement;if(!t)return;const e=t.getAttribute("lang");return t.setAttribute("lang",l),()=>{null===e?t.removeAttribute("lang"):t.setAttribute("lang",e)}},[l]);const h=n(async t=>{if(t!==l&&e.some(e=>e.tag===t)){m(t);try{await(c?.(t))}catch{}u&&u()}},[l,e,c,u]),b=r(()=>({language:l,languages:e,setLanguage:h}),[l,e,h]);/* @__PURE__ */
|
|
2
2
|
return o(d.Provider,{value:b,children:/* @__PURE__ */o(t,{value:g,locale:f,children:i})})}function v(){return l(d)}export{g as ENGLISH,c as SHELL_LANGUAGE_STORAGE_KEY,b as ShellLanguageProvider,s as matchShellLanguage,f as readSavedShellLanguage,h as resolveShellLanguage,m as saveShellLanguage,v as useShellLanguage};
|
|
@@ -1,13 +1,13 @@
|
|
|
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-
|
|
2
|
-
return M("div",{ref:$e,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&($e.current?.contains(t)||Ce.current?.contains(t))||Fe.current||document.activeElement!==De.current&&Me(!0)},children:[(rt=/* @__PURE__ */R("input",{id:ge,ref:De,type:"text",autoComplete:"off",role:"combobox","aria-expanded":he,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-controls":he?ve:void 0,"aria-activedescendant":he&&me>=0&&me<nt.length?we(me):void 0,"aria-label":te?void 0:ee,"aria-labelledby":te,"aria-describedby":ne,value:he?ye:
|
|
3
|
-
/* @__PURE__ */R("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */R("span",{ref:
|
|
4
|
-
/* @__PURE__ */M(s,{children:[
|
|
5
|
-
/* @__PURE__ */R("span",{onMouseDown:e=>e.preventDefault(),className:"flex opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100",children:/* @__PURE__ */R(c,{action:{label:ke.select.clear,icon:/* @__PURE__ */R(p,{name:"close"}),onClick:()=>{ie([]),Me(!1)}}})}),
|
|
6
|
-
/* @__PURE__ */M("div",{ref:Ce,onMouseDownCapture:()=>{Fe.current=!0,setTimeout(()=>{Fe.current=!1},0)},className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:g.popup,left:
|
|
7
|
-
/* @__PURE__ */R("button",{type:"button",tabIndex:-1,onMouseDown:e=>{e.preventDefault(),ie([])},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 ${x}`,children:ke.select.clearAll}),
|
|
8
|
-
/* @__PURE__ */R(m,{size:"sm",padding:"py-2",label:ke.search.searching}):
|
|
9
|
-
/* @__PURE__ */R("span",{className:"min-w-0 flex-1",children:
|
|
10
|
-
/* @__PURE__ */M("div",{id:ve,role:nt.length?"listbox":void 0,"aria-labelledby":nt.length?te??(ee?void 0:ge):void 0,"aria-label":nt.length&&!te?ee:void 0,"aria-multiselectable":!(!nt.length||!re)||void 0,className:"overflow-y-auto",style:{maxHeight:
|
|
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-HJBR73GS.js";import{END_ACTIONS_PAD as a,InputEndActionSlot as s,InputEndActionButton as c}from"./chunk-GS74BABV.js";import{INPUT_BASE_ON as u,INPUT_BASE as d}from"./chunk-AYZY3YNC.js";import{Button_default as h}from"./chunk-EOVXFXVV.js";import{Icon as p}from"./chunk-7V32O5NF.js";import{LoadingSpinner as m}from"./chunk-R2VKEMZH.js";import{Tooltip as f}from"./chunk-NJN5IKWO.js";import{onOverlayOpen as b}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as g}from"./chunk-62LW225J.js";import{useDropdownPosition as v,MENU_MAX_HEIGHT as w}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as y}from"./chunk-D65T4H6J.js";import{GLASS_DIVIDER as x,glassStyle as k}from"./chunk-5FYDNH4Y.js";import{registerModalEscapeInterceptor as N}from"./chunk-TWVUQUUD.js";import{useShellStrings as j}from"./chunk-5YP7MFPK.js";import{useState as $,useId as D,useRef as C,useMemo as S,useEffect as W}from"react";import{createPortal as F}from"react-dom";import{jsxs as M,jsx as R}from"react/jsx-runtime";function E(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}}var O=["right-2","right-8","right-16"],z=[8,32,64];function A(A){const{options:L,placeholder:T,emptyOptionLabel:B,className:V="",disabled:H,id:Y,filter:I=!1,allowFreeText:J=!1,freeTextOption:U,onSearchChange:G,loading:K=!1,error:P,onRetry:X,rightAdornment:Z,endAction:Q,renderOption:q,clearable:_=!0,"aria-label":ee,"aria-labelledby":te,"aria-describedby":ne}=A,re=!0===A.multiple,le=A.multiple?A.value:A.value?[A.value]:[],oe=A.multiple?"":A.value,ie=e=>{A.multiple?A.onChange(e):A.onChange(e[0]??"")},ae=le.length>0,se=I&&ae&&!H,ce=re||I,ue=null!=U,de=J||ue,[he,pe]=$(!1),[me,fe]=$(-1),be=D(),ge=Y??`${be}-input`,ve=`${be}-listbox`,we=e=>`${be}-opt-${e}`,[ye,xe]=$(""),ke=j(),Ne=B??ke.select.none,je=e=>{xe(e),fe(-1),G?.(e)},$e=C(null),De=C(null),Ce=C(null),Se=C(null),We=C(he);We.current=he;const Fe=C(!1),Me=e=>{We.current&&(We.current=!1,e&&J&&!ue&&et&&(re?le.includes(et)||ie([...le,et]):et!==oe&&ie([et])),pe(!1),je(""))},Re=(e,t)=>{if(!e.disabled){if(re)return ie(le.includes(e.value)?le.filter(t=>t!==e.value):[...le,e.value]),void(e===tt?je(""):fe(t));ie([e.value]),Me(!1)}},[Ee,Oe]=$(null);y(()=>{if(!Z||he)return void Oe(null);const e=Se.current?.offsetWidth??0;Oe(e?e+z[He]+6:null)});const ze=v(De,he,ce?{popupRef:Ce}:{matchTriggerWidth:!0}),Ae=S(()=>t(L),[L]),Le=le.join("\0"),Te=S(()=>{const e=[],t=/* @__PURE__ */new Set;for(const n of Ae)le.includes(n.value)&&!t.has(n.value)&&(t.add(n.value),e.push(n.label));if(de)for(const n of le)t.has(n)||e.push(n);return e},[Ae,Le,de]),Be=Te.join(", "),Ve=_&&ae&&!H,He=(Ve?1:0)+(Q?1:0),[Ye,Ie]=$(null),Je=C(null),Ue=C(""),Ge=C(()=>{});Ge.current=()=>{const e=De.current,t=Je.current;if(!re||!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}|${Te.join("\0")}`;if(o===Ue.current)return;Ue.current=o;let i=null;r>0&&Te.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=E(Te,e=>(t.textContent=e,t.getBoundingClientRect().width<=r)),t.textContent=""),Ie(e=>e?.shown===i?.shown&&e?.cut===i?.cut?e:i)},y(()=>{Ge.current()}),W(()=>{const e=De.current;if(!re||!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Ge.current());return t.observe(e),()=>t.disconnect()},[re]);const Ke=Te.length,Pe=!re||!Ye||Ye.shown>=Ke?Be:0===Ye.shown?ke.select.selectedCount(Ke):`${Te.slice(0,Ye.shown).join(", ")} +${Ke-Ye.shown}`,Xe=re&&null!==Ye&&(Ye.shown<Ke||Ye.cut),Ze=he&&ae&&ce;W(()=>{if(!he)return;const e=e=>{const t=e.target;$e.current?.contains(t)||Ce.current?.contains(t)||Me(!0)};document.addEventListener("mousedown",e);const t=b(()=>Me(!0));return()=>{document.removeEventListener("mousedown",e),t()}},[he,J,ye,Le,A.onChange]),W(()=>{if(he)return N(e=>!("Escape"!==e.key||!We.current)&&(Me(!1),De.current?.blur(),!0),()=>Ce.current)},[he]);const Qe=S(()=>{const e=/* @__PURE__ */new Set;return n(L,t=>!e.has(t.value)&&(e.add(t.value),!0))},[L]),qe=S(()=>{if(G)return Qe;const e=ye.trim().toLowerCase();return e?n(Qe,t=>r(t,e)):Qe},[Qe,ye,G]),_e=S(()=>t(qe),[qe]),et=ye.trim(),tt=S(()=>ue&&et?Ae.some(e=>e.label===et)||le.includes(et)?null:{value:et,label:et}:null,[ue,et,Ae,Le]),nt=S(()=>tt?[..._e,tt]:_e,[_e,tt]);/* @__PURE__ */
|
|
2
|
+
return M("div",{ref:$e,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&($e.current?.contains(t)||Ce.current?.contains(t))||Fe.current||document.activeElement!==De.current&&Me(!0)},children:[(rt=/* @__PURE__ */R("input",{id:ge,ref:De,type:"text",autoComplete:"off",role:"combobox","aria-expanded":he,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-controls":he?ve:void 0,"aria-activedescendant":he&&me>=0&&me<nt.length?we(me):void 0,"aria-label":te?void 0:ee,"aria-labelledby":te,"aria-describedby":ne,value:he?ye:Pe,onChange:e=>{je(e.target.value),pe(!0)},onFocus:()=>{H||(je(""),pe(!0))},onKeyDown:t=>{if("ArrowDown"===t.key||"ArrowUp"===t.key){if(H)return;if(t.preventDefault(),!he)return void pe(!0);if(0===nt.length)return;const n="ArrowDown"===t.key?1:-1;return void fe(t=>e(nt,t,n))}"Enter"===t.key?(t.preventDefault(),he&&me>=0&&me<nt.length?Re(nt[me],me):1!==_e.length||_e[0].disabled?J&&!ue&&et&&(re?(le.includes(et)||ie([...le,et]),je("")):(ie([et]),Me(!1),De.current?.blur())):Re(_e[0],0)):"Escape"===t.key?(Me(!1),De.current?.blur()):"Tab"===t.key&&Me(!0)},placeholder:Ze?Pe:T||Ne,className:`${se?u:d} ${V} ${a[He]}${H?"bg-surface-sunken text-ink-faintest cursor-not-allowed":""} truncate${Ze?" rosh-field-shows-choice":""}`,style:Ee?{paddingRight:Ee}:void 0,disabled:H}),re?/* @__PURE__ */R(f,{content:!he&&Xe?Be:null,className:"block",children:rt}):rt),re&&
|
|
3
|
+
/* @__PURE__ */R("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */R("span",{ref:Je,className:"whitespace-pre"})}),He>0&&
|
|
4
|
+
/* @__PURE__ */M(s,{children:[Ve&&
|
|
5
|
+
/* @__PURE__ */R("span",{onMouseDown:e=>e.preventDefault(),className:"flex opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100",children:/* @__PURE__ */R(c,{action:{label:ke.select.clear,icon:/* @__PURE__ */R(p,{name:"close"}),onClick:()=>{ie([]),Me(!1)}}})}),Q&&/* @__PURE__ */R("span",{onMouseDown:e=>e.preventDefault(),className:"flex",children:/* @__PURE__ */R(c,{action:Q})})]}),Z&&!he&&/* @__PURE__ */R("div",{ref:Se,className:`absolute top-1/2 -translate-y-1/2 ${O[He]} flex items-center gap-1 flex-nowrap justify-end pointer-events-none`,children:Z}),he&&F(
|
|
6
|
+
/* @__PURE__ */M("div",{ref:Ce,onMouseDownCapture:()=>{Fe.current=!0,setTimeout(()=>{Fe.current=!1},0)},className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:g.popup,left:ze?.left,right:ze?.right,top:ze?.top,bottom:ze?.bottom,minWidth:ze?.minWidth,width:ze?.width,...ce&&{maxWidth:ze?.maxWidth},visibility:ze?void 0:"hidden",...k()},children:[re&&ae&&_&&!H&&
|
|
7
|
+
/* @__PURE__ */R("button",{type:"button",tabIndex:-1,onMouseDown:e=>{e.preventDefault(),ie([])},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 ${x}`,children:ke.select.clearAll}),K?
|
|
8
|
+
/* @__PURE__ */R(m,{size:"sm",padding:"py-2",label:ke.search.searching}):P?/* @__PURE__ */M("div",{role:"alert",className:"flex items-center gap-2 px-3 py-2 text-sm text-red-600",children:[
|
|
9
|
+
/* @__PURE__ */R("span",{className:"min-w-0 flex-1",children:P}),X&&/* @__PURE__ */R(h,{variant:"link",size:"sm",onMouseDown:e=>e.preventDefault(),onClick:X,className:"shrink-0",children:ke.list.retry})]}):null,
|
|
10
|
+
/* @__PURE__ */M("div",{id:ve,role:nt.length?"listbox":void 0,"aria-labelledby":nt.length?te??(ee?void 0:ge):void 0,"aria-label":nt.length&&!te?ee:void 0,"aria-multiselectable":!(!nt.length||!re)||void 0,className:"overflow-y-auto",style:{maxHeight:ze?.maxHeight??w},children:[0===nt.length?K||P?null:/* @__PURE__ */R("p",{className:"px-3 py-3 text-sm text-ink-faintest text-center",children:ke.select.noMatches}):0===_e.length?null:l(qe,(e,t)=>{const n=le.includes(e.value);/* @__PURE__ */
|
|
11
11
|
return M("button",{id:we(t),type:"button",role:"option","aria-selected":n,"aria-disabled":e.disabled||void 0,tabIndex:-1,onMouseDown:n=>{(e.disabled||re)&&n.preventDefault(),Re(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===me?"bg-gray-100":n?"bg-blue-50/50":""}`),children:[re&&/* @__PURE__ */R(o,{selected:n}),
|
|
12
|
-
/* @__PURE__ */R("span",{className:`min-w-0 ${ce?"flex-auto":"flex-1"} truncate`,children:q?q(e,{selected:n,active:t===me}):e.label}),e.sublabel&&/* @__PURE__ */R(i,{grows:ce,children:e.sublabel})]},e.value)},be),tt&&
|
|
13
|
-
/* @__PURE__ */R("button",{id:we(_e.length),type:"button",role:"option","aria-selected":!1,tabIndex:-1,onMouseDown:e=>{re&&e.preventDefault(),Re(tt,_e.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 ${_e.length?`border-t ${x}`:""} ${me===_e.length?"bg-gray-100":""}`,children:/* @__PURE__ */R("span",{className:"min-w-0 flex-1 truncate",children:
|
|
12
|
+
/* @__PURE__ */R("span",{className:`min-w-0 ${ce?"flex-auto":"flex-1"} truncate`,children:q?q(e,{selected:n,active:t===me}):e.label}),e.sublabel&&/* @__PURE__ */R(i,{grows:ce,children:e.sublabel})]},e.value)},be),tt&&U&&
|
|
13
|
+
/* @__PURE__ */R("button",{id:we(_e.length),type:"button",role:"option","aria-selected":!1,tabIndex:-1,onMouseDown:e=>{re&&e.preventDefault(),Re(tt,_e.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 ${_e.length?`border-t ${x}`:""} ${me===_e.length?"bg-gray-100":""}`,children:/* @__PURE__ */R("span",{className:"min-w-0 flex-1 truncate",children:U(tt.value)})},`${be}-typed`)]})]}),document.body)]});var rt}export{A as SearchableSelect,E as fitChoice};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ChartTooltip as e}from"./chunk-36VIGB6J.js";import{CartesianPlot as t}from"./chunk-
|
|
1
|
+
import{ChartTooltip as e}from"./chunk-36VIGB6J.js";import{CartesianPlot as t}from"./chunk-QDL2FNP7.js";import{resolveSeriesColor as i,CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as r,useShellLocale as a}from"./chunk-5YP7MFPK.js";import{formatPlain as o}from"./chunk-C3QOHMR6.js";import{jsx as m,jsxs as n}from"react/jsx-runtime";function s({boxes:s,height:c=240,width:h,color:u,tone:x,formatValue:d,yAxisLabel:y,label:k,className:b,emptyLabel:f}){const p=r().charts,q=a(),g=d??(e=>o(e,q)),v=k??p.distribution,W=i(0,u,x),j=s.flatMap(e=>[e.min,e.max,...e.outliers??[]]).filter(Number.isFinite);/* @__PURE__ */
|
|
2
2
|
return m(t,{labels:s.map(e=>e.label),values:j,height:c,width:h,bandPadding:.5,formatValue:g,yAxisLabel:y,className:b,emptyLabel:f,ariaLabel:p.fiveNumber(v,s.length),tooltip:t=>{const i=s[t];/* @__PURE__ */
|
|
3
3
|
return m(e,{title:i.label,rows:[{key:"max",label:p.maximum,color:W,value:g(i.max)},{key:"q3",label:p.q3,color:W,value:g(i.q3)},{key:"median",label:p.median,color:W,value:g(i.median)},{key:"q1",label:p.q1,color:W,value:g(i.q1)},{key:"min",label:p.minimum,color:W,value:g(i.min)}],emphasisKey:"median",footnote:i.outliers?.length?p.outliers(i.outliers.length):void 0})},children:({x:e,y:t,active:i})=>/* @__PURE__ */m("g",{children:s.map((r,a)=>{const o=e.center(a),s=Math.max(6,e.bandwidth);/* @__PURE__ */
|
|
4
4
|
return n("g",{opacity:null!==i&&i!==a?.45:1,children:[
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{StatCard as e,Card as a}from"./chunk-
|
|
1
|
+
import{StatCard as e,Card as a}from"./chunk-WEEQDPU3.js";import{Avatar as t}from"./chunk-SEP35R2E.js";import{Sparkline as r}from"./chunk-CKCDGSTC.js";import{PieChart as s}from"./chunk-XOH6QERF.js";import{ColumnChart as l}from"./chunk-IKKR2TYY.js";import{StatusBadgeProvider as i,StatusBadge as d}from"./chunk-FZM3ZPW3.js";import{Button_default as c}from"./chunk-EOVXFXVV.js";import{TH_ONE_LINE as n}from"./chunk-WGLHB6WE.js";import{jsx as o,jsxs as m}from"react/jsx-runtime";var u={paid:"success",shipped:"active",processing:"queued",refunded:"neutral",overdue:"danger"},h=[12,18,14,22,19,27,24,31,28,35,30,38],p=["J","F","M","A","M","J","J","A","S","O","N","D"],g=[{key:"direct",label:"Direct",value:45},{key:"search",label:"Search",value:30},{key:"social",label:"Social",value:15},{key:"email",label:"Email",value:10}],x=[{id:"#3201",customer:"Alice Nguyen",total:"$1,204",status:"paid"},{id:"#3202",customer:"Marco Reyes",total:"$642",status:"shipped"},{id:"#3203",customer:"Priya Patel",total:"$2,980",status:"processing"},{id:"#3204",customer:"Tom Becker",total:"$318",status:"overdue"},{id:"#3205",customer:"Sara Lind",total:"$540",status:"refunded"}];function v(){/* @__PURE__ */
|
|
2
2
|
return o(i,{groups:u,children:/* @__PURE__ */o("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */m("div",{className:"mx-auto max-w-6xl space-y-6",children:[
|
|
3
3
|
/* @__PURE__ */m("div",{className:"flex items-center justify-between gap-4",children:[
|
|
4
4
|
/* @__PURE__ */m("div",{children:[
|