efficient-shell 10.13.0 → 10.15.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 +16 -6
- package/dist/{Browser-36HIDVL6.js → Browser-WR4GMYE7.js} +14 -14
- package/dist/Calculator-MV5JVQBS.js +29 -0
- package/dist/{CurrencyConverter-577XB7A3.js → CurrencyConverter-HEAAQX23.js} +7 -7
- package/dist/{Documents-ZS4M5I3S.js → Documents-NSPKXCTF.js} +10 -10
- package/dist/Files-5HAUE2PR.js +88 -0
- package/dist/{Notepad-6CFMSQCK.js → Notepad-5LSFAYXO.js} +9 -9
- package/dist/PdfViewer-LU5JKHSG.js +1 -0
- package/dist/{PomodoroTimer-CXJVY7U3.js → PomodoroTimer-5V32QOCZ.js} +20 -20
- package/dist/{Preview-HV2KB3IU.js → Preview-PDVZZRSK.js} +29 -29
- package/dist/{Sidebar-7RR5WNIF.js → Sidebar-E3VDFBF6.js} +32 -32
- package/dist/{Spreadsheet-J5AGNSGN.js → Spreadsheet-K4IAI3A2.js} +12 -12
- package/dist/{Stock-M4TDRNCI.js → Stock-AOCHAKUF.js} +3 -3
- package/dist/{Weather-K634BVDX.js → Weather-F2QHTG32.js} +18 -18
- package/dist/{WorldClock-56CYOGR2.js → WorldClock-G72577HU.js} +6 -6
- package/dist/ai/index.d.ts +8 -2
- package/dist/ai/index.js +57 -53
- package/dist/ai.css +1 -1
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/ChartTooltip.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/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/SankeyChart.js +1 -1
- package/dist/charts/ScatterChart.js +1 -1
- package/dist/charts/SpecChart.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-3BYLHJLC.js → chunk-25M7CYCR.js} +8 -8
- package/dist/chunk-26LO7XCK.js +2 -0
- package/dist/{chunk-QNK2I4IH.js → chunk-2RAOWHHM.js} +12 -12
- package/dist/{chunk-KKSVRIMP.js → chunk-2UO47XB4.js} +8 -3
- package/dist/{chunk-ULXCDM7Y.js → chunk-36R3R3IB.js} +4 -4
- package/dist/{chunk-O4V5PEA3.js → chunk-3AH524CN.js} +1 -1
- package/dist/{chunk-OZBM2XFQ.js → chunk-3EJ64VKE.js} +1 -1
- package/dist/chunk-3GHTOSJP.js +14 -0
- package/dist/chunk-4AQ67NP2.js +15 -0
- package/dist/{chunk-2SY76NFO.js → chunk-4U57ANZF.js} +1 -1
- package/dist/{chunk-QHOBK35Y.js → chunk-4VTJEKHX.js} +1 -1
- package/dist/{chunk-H64JJSXC.js → chunk-4XS32UWF.js} +4 -4
- package/dist/{chunk-A4HJDSRA.js → chunk-55W5TTKS.js} +6 -6
- package/dist/{chunk-SDQIXE5M.js → chunk-5FRFSPQ2.js} +8 -8
- package/dist/{chunk-GBCH3UHD.js → chunk-5JU53T3U.js} +17 -17
- package/dist/{chunk-3ELLBQPS.js → chunk-5LCDCO46.js} +1 -1
- package/dist/{chunk-YJLLLO5R.js → chunk-5LXT3IUL.js} +1 -1
- package/dist/{chunk-GISDIVFK.js → chunk-5N5AAYQV.js} +1 -1
- package/dist/{chunk-SMUH7NAN.js → chunk-66XPG5G3.js} +1 -1
- package/dist/{chunk-RPYFOQM2.js → chunk-6BB6A5OB.js} +5 -5
- package/dist/chunk-6C6TRDNI.js +1 -0
- package/dist/chunk-6WSH6D5N.js +29 -0
- package/dist/chunk-7LQGPMRP.js +3 -0
- package/dist/{chunk-KOBYM5JV.js → chunk-7MSC3Z5H.js} +12 -12
- package/dist/{chunk-D7F442OZ.js → chunk-7PSIPTOE.js} +1 -1
- package/dist/{chunk-SO6X4CII.js → chunk-A267MPGS.js} +1 -1
- package/dist/{chunk-ORIGX2H5.js → chunk-AJFR35CO.js} +4 -4
- package/dist/{chunk-JBOMPD3V.js → chunk-AJFWBEIG.js} +9 -9
- package/dist/{chunk-ZNAVCHBV.js → chunk-AJVUND5A.js} +6 -6
- package/dist/chunk-ALDGSODF.js +2 -0
- package/dist/chunk-ARCQYF7G.js +23 -0
- package/dist/{chunk-UNRPRMQO.js → chunk-B25RVAVS.js} +44 -44
- package/dist/{chunk-FFIQPFUR.js → chunk-B37JVKW5.js} +1 -1
- package/dist/chunk-CDA2VXBN.js +8 -0
- package/dist/{chunk-JRZ7PPVJ.js → chunk-CFAELIKH.js} +6 -6
- package/dist/{chunk-7PUVPDUZ.js → chunk-CHAWFMV4.js} +4 -4
- package/dist/chunk-CNLYFW47.js +9 -0
- package/dist/{chunk-XNKIDGZW.js → chunk-CRILBBSU.js} +1 -1
- package/dist/{chunk-XAROKI7X.js → chunk-E5QPXEKN.js} +2 -2
- package/dist/chunk-EFU4Z66K.js +8 -0
- package/dist/{chunk-BS7IPLRR.js → chunk-EHGGSUXA.js} +1 -1
- package/dist/{chunk-F6JDUMM7.js → chunk-EK5WJQTR.js} +1 -1
- package/dist/{chunk-TXDA7TTP.js → chunk-EQZZ4V5X.js} +1 -1
- package/dist/{chunk-NPK2TLIU.js → chunk-ESYYKGN4.js} +1 -1
- package/dist/{chunk-URERZUX5.js → chunk-EXJXOKUU.js} +1 -1
- package/dist/{chunk-EYZZW6SO.js → chunk-EYEB3J77.js} +5 -5
- package/dist/{chunk-RBQWIHYD.js → chunk-F2R3UFNQ.js} +1 -1
- package/dist/{chunk-LOFYSLC7.js → chunk-FFZREKEF.js} +9 -9
- package/dist/{chunk-2VTO64YC.js → chunk-FGJOGBGZ.js} +8 -8
- package/dist/{chunk-MXH3UPCH.js → chunk-FJYTYW6M.js} +5 -5
- package/dist/chunk-FQIA5BTN.js +22 -0
- package/dist/{chunk-37U326EL.js → chunk-FRVNDEV2.js} +11 -11
- package/dist/{chunk-LDE5IV2M.js → chunk-FUVVO6YP.js} +1 -1
- package/dist/chunk-FX6DBXXD.js +1 -0
- package/dist/{chunk-7JGR7WPD.js → chunk-G4JTO5PB.js} +1 -1
- package/dist/{chunk-3RORPK2J.js → chunk-G7QK7WAK.js} +1 -1
- package/dist/{chunk-TVH7IZQ4.js → chunk-GKIU55T5.js} +2 -2
- package/dist/{chunk-CBEKJTXU.js → chunk-HL3DJTIC.js} +7 -7
- package/dist/{chunk-F2MWLDN2.js → chunk-HRPXJ4EI.js} +1 -1
- package/dist/chunk-HXNMRJQ4.js +2 -0
- package/dist/{chunk-SCPCZCYQ.js → chunk-IC7BEFE3.js} +1 -1
- package/dist/chunk-IFA2EOAF.js +4 -0
- package/dist/chunk-JEH5EVIG.js +1 -0
- package/dist/{chunk-DRDYZ633.js → chunk-KJCTXWF7.js} +2 -2
- package/dist/{chunk-UDRMZ22J.js → chunk-KKOADH55.js} +1 -1
- package/dist/chunk-KMEERBZV.js +2 -0
- package/dist/chunk-KORKSPHQ.js +6 -0
- package/dist/{chunk-QODTON7V.js → chunk-LJN77RG6.js} +1 -1
- package/dist/{chunk-63L5ORRZ.js → chunk-LPXMHYTM.js} +1 -1
- package/dist/{chunk-JGFY54A4.js → chunk-LVBO2OMQ.js} +2 -2
- package/dist/{chunk-M3OYHYIS.js → chunk-LWEWURFT.js} +13 -13
- package/dist/chunk-LWWMRL2Y.js +5 -0
- package/dist/chunk-M4K6FLIY.js +1 -0
- package/dist/{chunk-O6JJIR4H.js → chunk-M5LR7ZZX.js} +1 -1
- package/dist/{chunk-UWIZX3RK.js → chunk-MCYFUIXH.js} +1 -1
- package/dist/{chunk-N67QX3WW.js → chunk-MMQ6ETRD.js} +2 -2
- package/dist/chunk-MNZ7MGAT.js +2 -0
- package/dist/{chunk-2K2W6VIR.js → chunk-N2RHM432.js} +1 -1
- package/dist/{chunk-CAVADOJK.js → chunk-N3YBOXOF.js} +1 -1
- package/dist/{chunk-LTKXAHS3.js → chunk-N4REWGMM.js} +8 -8
- package/dist/{chunk-7X5FABQS.js → chunk-NBB2RKDH.js} +5 -5
- package/dist/{chunk-C2P2Z6HU.js → chunk-NBVHJZVS.js} +14 -14
- package/dist/chunk-NLGMJGD6.js +14 -0
- package/dist/{chunk-CKKUFDZ3.js → chunk-NWURIQI3.js} +3 -3
- package/dist/{chunk-AZ3AR7U7.js → chunk-NZCSLS4O.js} +3 -3
- package/dist/{chunk-3NW5LD7D.js → chunk-NZQCDFDG.js} +3 -3
- package/dist/chunk-OAT7OEWP.js +11 -0
- package/dist/chunk-OET2Q7P6.js +19 -0
- package/dist/{chunk-ISJPW2FZ.js → chunk-OSVY6SUO.js} +5 -5
- package/dist/{chunk-KP2THXEI.js → chunk-PB3OC4BO.js} +8 -8
- package/dist/{chunk-MBXLROCD.js → chunk-POQ4ETLL.js} +1 -1
- package/dist/{chunk-I2XGPTCN.js → chunk-PUBJ5YHQ.js} +1 -1
- package/dist/{chunk-6XBWM453.js → chunk-Q3IR5SKD.js} +1 -1
- package/dist/{chunk-P5YFQ4IQ.js → chunk-RDYFZHT3.js} +1 -1
- package/dist/chunk-RFEET2LS.js +9 -0
- package/dist/chunk-RSS2ALHH.js +9 -0
- package/dist/{chunk-PXQG5EIH.js → chunk-S52GQQVB.js} +1 -1
- package/dist/{chunk-MVZRZTQP.js → chunk-S5SRXI4V.js} +1 -1
- package/dist/chunk-SCYL5V5X.js +20 -0
- package/dist/chunk-SM7IDX7Y.js +1 -0
- package/dist/chunk-SOGQZVPJ.js +6 -0
- package/dist/{chunk-UYRITNQW.js → chunk-SP2AUVIU.js} +3 -3
- package/dist/{chunk-34URULVW.js → chunk-SQCUN2DX.js} +1 -1
- package/dist/{chunk-67JCJ2MG.js → chunk-SSM3EN7G.js} +1 -1
- package/dist/chunk-TIPU74XW.js +22 -0
- package/dist/{chunk-SOECV4V5.js → chunk-TXNCDDB4.js} +3 -3
- package/dist/{chunk-MUMQ6PW7.js → chunk-U2RFKQVA.js} +1 -1
- package/dist/{chunk-VZ4PBHFN.js → chunk-U2WCV56F.js} +1 -1
- package/dist/{chunk-W6SC3ZNO.js → chunk-UPCLAEKC.js} +2 -2
- package/dist/chunk-UUKTYAWY.js +7 -0
- package/dist/{chunk-VTFZ6W2D.js → chunk-UWIFXNH6.js} +3 -3
- package/dist/{chunk-DDCMMOB4.js → chunk-V2MIQ4GJ.js} +2 -2
- package/dist/chunk-V6F42DX3.js +11 -0
- package/dist/chunk-VWEG2WM4.js +12 -0
- package/dist/{chunk-G4GVLK44.js → chunk-WZ5QSSUM.js} +6 -6
- package/dist/{chunk-CHBRMAJV.js → chunk-XDBG4HPV.js} +1 -1
- package/dist/chunk-XIB72X74.js +2 -0
- package/dist/{chunk-YWDEFPSW.js → chunk-XJUREXYW.js} +3 -3
- package/dist/{chunk-WINNA7LS.js → chunk-XPPLCLYK.js} +1 -1
- package/dist/{chunk-7YOQS3C6.js → chunk-XTCXX5LJ.js} +1 -1
- package/dist/{chunk-QDQ347RL.js → chunk-YFMZKTJC.js} +1 -1
- package/dist/{chunk-AJO72CPB.js → chunk-YLGQ6ACR.js} +1 -1
- package/dist/chunk-ZE5TNYWX.js +7 -0
- package/dist/{chunk-LCJRTJXT.js → chunk-ZHPHNQKM.js} +7 -7
- package/dist/{chunk-AGG4RFXR.js → chunk-ZI6SMZJ4.js} +11 -11
- package/dist/{chunk-ZZOBG6GP.js → chunk-ZL5OSF26.js} +19 -19
- package/dist/{chunk-PBWUEBJ5.js → chunk-ZL7O4KGQ.js} +1 -1
- package/dist/{chunk-CPZ42W2B.js → chunk-ZLSUQAD3.js} +1 -1
- package/dist/{chunk-TKJBZIHT.js → chunk-ZMRGHVKS.js} +1 -1
- package/dist/chunk-ZO244TWH.js +8 -0
- package/dist/{chunk-GSKLHUQ6.js → chunk-ZW3IDCP2.js} +1 -1
- package/dist/{chunk-IKNG7EFQ.js → chunk-ZZTCYEQ4.js} +7 -7
- package/dist/data/DataTable.js +1 -1
- package/dist/data/Kanban.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/format/index.js +1 -1
- package/dist/forms/AlignmentGrid.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Button.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/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/IconButton.js +1 -1
- package/dist/forms/IconPicker.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/PictureTiles.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/Segmented.js +1 -1
- package/dist/forms/Select.d.ts +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.d.ts +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/mediaLibraryMenu.js +1 -1
- package/dist/forms/textAlign.d.ts +1 -1
- package/dist/forms/textAlign.js +1 -1
- package/dist/icons/efficient-glyphs.d.ts +1 -0
- package/dist/icons/efficient-glyphs.js +1 -1
- package/dist/icons/efficient-looks.d.ts +2 -0
- package/dist/icons/efficient-looks.js +1 -1
- package/dist/icons/efficient-meanings.d.ts +1 -0
- package/dist/icons/efficient-meanings.js +1 -1
- package/dist/icons/efficient.d.ts +1 -0
- package/dist/icons/efficient.js +1 -1
- package/dist/icons/glyphs/EnterIcon.d.ts +8 -0
- package/dist/icons/glyphs/EnterIcon.js +1 -0
- package/dist/icons/index.d.ts +2 -2
- package/dist/icons/index.js +1 -1
- package/dist/icons/looks/EnterMiniIcon.d.ts +8 -0
- package/dist/icons/looks/EnterMiniIcon.js +1 -0
- package/dist/icons/looks/EnterSolidIcon.d.ts +8 -0
- package/dist/icons/looks/EnterSolidIcon.js +1 -0
- package/dist/icons/looks/map.js +1 -1
- package/dist/icons/sets.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +294 -294
- package/dist/map/index.js +7 -7
- package/dist/markdown/index.js +1 -1
- package/dist/{names-CwzeaUf6.d.ts → names-Bmx_9y41.d.ts} +1 -1
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/Banner.js +1 -1
- package/dist/shell/Breadcrumbs.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContextMenu.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/FloatingBar.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.d.ts +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/MilestoneTimeline.js +1 -1
- package/dist/shell/PageHeader.js +1 -1
- package/dist/shell/Popover.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/StatusBadge.js +1 -1
- package/dist/shell/StepChain.js +1 -1
- package/dist/shell/Stepper.js +1 -1
- package/dist/shell/Tabs.js +1 -1
- package/dist/shell/TimelineTrack.js +1 -1
- package/dist/shell/Tooltip.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/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/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-ZFMTTDQ6.js +0 -29
- package/dist/Files-7XO7A4YT.js +0 -88
- package/dist/PdfViewer-Z4YKDHIH.js +0 -1
- package/dist/chunk-3GL4OVBB.js +0 -1
- package/dist/chunk-47EYPWCB.js +0 -14
- package/dist/chunk-A5BV6NFA.js +0 -7
- package/dist/chunk-CGQAKGPT.js +0 -8
- package/dist/chunk-COJYPNKF.js +0 -2
- package/dist/chunk-EDKRGYZX.js +0 -9
- package/dist/chunk-EU3JZGV2.js +0 -14
- package/dist/chunk-I4VIEGCX.js +0 -2
- package/dist/chunk-IKMWKOT5.js +0 -1
- package/dist/chunk-JSGQWVYH.js +0 -7
- package/dist/chunk-KZMJE24J.js +0 -5
- package/dist/chunk-KZX25YEW.js +0 -22
- package/dist/chunk-L3QNKCXH.js +0 -11
- package/dist/chunk-PJQGYKN6.js +0 -11
- package/dist/chunk-PN65IIYN.js +0 -8
- package/dist/chunk-PUF75SMJ.js +0 -1
- package/dist/chunk-QKWYCOMM.js +0 -23
- package/dist/chunk-R7APUBZB.js +0 -29
- package/dist/chunk-RCPFUDPS.js +0 -4
- package/dist/chunk-STAVWXWV.js +0 -1
- package/dist/chunk-SWN3LSQX.js +0 -12
- package/dist/chunk-TMNAHOJ7.js +0 -9
- package/dist/chunk-UBOP6HFI.js +0 -6
- package/dist/chunk-UWK5Q3R4.js +0 -19
- package/dist/chunk-W35N7SL3.js +0 -8
- package/dist/chunk-W6URVLQF.js +0 -20
- package/dist/chunk-WMEYNKXZ.js +0 -22
- package/dist/chunk-WTTSB4SV.js +0 -3
- package/dist/chunk-XBB6LSSB.js +0 -6
- package/dist/chunk-Y3R267FV.js +0 -15
- package/dist/chunk-YGSU5KCP.js +0 -9
- package/dist/chunk-ZTPMMNAZ.js +0 -1
- package/dist/chunk-ZZVE64OI.js +0 -2
- /package/dist/{chunk-744BFBBV.js → chunk-6V6ANLHW.js} +0 -0
- /package/dist/{chunk-S2P74CBN.js → chunk-ID6WFAXW.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return a("div",{role:"group","aria-label":r,"data-border":c?"each":"all",className:"grid w-full min-w-0 grid-cols-2 gap-2",children:[w?c?/* @__PURE__ */a(o,{children:[k("left",b.sides.left,h.left,
|
|
1
|
+
import{Segmented as e}from"./chunk-5LCDCO46.js";import{ColorPicker as t}from"./chunk-2RAOWHHM.js";import{InputNumber_default as l}from"./chunk-LVBO2OMQ.js";import{Icon as r}from"./chunk-2UO47XB4.js";import{jsxs as a,Fragment as o,jsx as i}from"react/jsx-runtime";var s=["solid","dashed","dotted"],n=["top","right","bottom","left"];function d(e){const t=e??{},l="number"==typeof t.width?t.width:0;return Object.fromEntries(n.map(e=>[e,"number"==typeof t[e]?t[e]:l]))}function m(e,t){const l=e??{},r=d(t),a=n.some(e=>"number"==typeof l[e]),o=n.map(e=>"number"==typeof l[e]?l[e]:"number"==typeof l.width?l.width:a?0:r[e]);return!o.every(e=>e===o[0])}var c="h-3.5 w-3.5",h={all:/* @__PURE__ */i(r,{name:"border-all","aria-hidden":"true",className:c}),top:/* @__PURE__ */i(r,{name:"border-top","aria-hidden":"true",className:c}),right:/* @__PURE__ */i(r,{name:"border-right","aria-hidden":"true",className:c}),bottom:/* @__PURE__ */i(r,{name:"border-bottom","aria-hidden":"true",className:c}),left:/* @__PURE__ */i(r,{name:"border-left","aria-hidden":"true",className:c})},p={solid:/* @__PURE__ */i(r,{name:"line-solid","aria-hidden":"true",className:c}),dashed:/* @__PURE__ */i(r,{name:"line-dashed","aria-hidden":"true",className:c}),dotted:/* @__PURE__ */i(r,{name:"line-dotted","aria-hidden":"true",className:c})};function u({label:r,value:d,onChange:m,each:c,placeholder:u,presets:f,words:b,widths:w=!0,styles:y=!0,min:g=0,max:v=20,step:N=1,readOnly:x}){const O=e=>"number"==typeof d[e]?d[e]:null,j=(e,t)=>{const l={...d};if("number"==typeof d.width)for(const e of n)null===O(e)&&(l[e]=d.width);l[e]=t,delete l.width,m(l)},k=(e,t,r,a,o,s)=>/* @__PURE__ */i("div",{"data-side":e,className:"all"===e?"col-span-2 min-w-0":"min-w-0",children:/* @__PURE__ */i(l,{value:a,onChange:s,min:g,max:v,step:N,precision:0,steppers:"compact",readOnly:x,placeholder:o,prefix:r,suffix:b.unit,"aria-label":t})}),C=n.map(O),S="number"==typeof d.width?d.width:C.every(e=>null!==e&&e===C[0])?C[0]:null,H=null===S&&C.some(e=>null!==e),z=n.every(e=>u.sides[e]===u.sides.top)?String(u.sides.top):"–",B=e=>O(e)??("number"==typeof d.width?d.width:null),L=d.style??u.style;/* @__PURE__ */
|
|
2
|
+
return a("div",{role:"group","aria-label":r,"data-border":c?"each":"all",className:"grid w-full min-w-0 grid-cols-2 gap-2",children:[w?c?/* @__PURE__ */a(o,{children:[k("left",b.sides.left,h.left,B("left"),String(u.sides.left),e=>j("left",e)),k("top",b.sides.top,h.top,B("top"),String(u.sides.top),e=>j("top",e)),k("right",b.sides.right,h.right,B("right"),String(u.sides.right),e=>j("right",e)),k("bottom",b.sides.bottom,h.bottom,B("bottom"),String(u.sides.bottom),e=>j("bottom",e))]}):k("all",b.width,h.all,S,H?"–":z,e=>{const t={...d,width:e};for(const e of n)delete t[e];m(t)}):null,y&&/* @__PURE__ */i("div",{"data-border-style":"",className:"col-span-2 min-w-0",children:/* @__PURE__ */i(e,{block:!0,size:"sm",label:b.style,value:L,onChange:e=>{x||m({...d,style:e})},options:s.map(e=>({value:e,label:/* @__PURE__ */a(o,{children:[p[e],
|
|
3
3
|
/* @__PURE__ */i("span",{className:"sr-only",children:b.styles[e]})]}),title:b.styles[e]}))})}),
|
|
4
|
-
/* @__PURE__ */i("div",{"data-border-color":"",className:"col-span-2 flex min-w-0 items-center",children:/* @__PURE__ */i(
|
|
4
|
+
/* @__PURE__ */i("div",{"data-border-color":"",className:"col-span-2 flex min-w-0 items-center",children:/* @__PURE__ */i(t,{value:d.color??"",onChange:e=>{x||m({...d,color:e})},label:b.color,presets:f,fallback:u.color,showHexInput:!0,size:"md",disabled:x})})]})}export{s as BORDER_LINE_STYLES,u as BorderInput,d as borderSides,m as borderStartEach};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{railLabelsShown as e}from"./chunk-FQEALPZJ.js";import{ChoiceContent as t,choiceItemClass as n,choiceTipClass as r,choiceTrackClass as o}from"./chunk-JDQGHQ2C.js";import{Tooltip as l}from"./chunk-
|
|
2
|
-
return s("nav",{ref:v,"aria-label":m,"aria-labelledby":g,className:b(c,u),children:e.map(e=>{const o=e.id===n,a=/* @__PURE__ */s("a",{href:e.disabled?void 0:e.href,"aria-current":o?"location":void 0,"aria-disabled":e.disabled||void 0,onClick:e.disabled?void 0:t=>((e,t)=>{const n=f(t.href);n&&(e=>!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))(e)&&(e.preventDefault(),w(t.id),n.scrollIntoView({block:"start",behavior:"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"}),n.hasAttribute("tabindex")||n.setAttribute("tabindex","-1"),n.focus({preventScroll:!0}))})(t,e),className:`${h(o,c,"warning"===e.tone?"warning":"default")}${e.disabled?" cursor-not-allowed opacity-50":""}`,children:/* @__PURE__ */s(t,{icon:e.icon,label:e.label})},e.id);return null!=e.tooltip&&!1!==e.tooltip?/* @__PURE__ */s(l,{content:e.tooltip,className:c?r(c):void 0,children:a},e.id):a})})}var v=(e,t)=>`${e}-tab-${t}`,w=(e,t)=>`${e}-panel-${t}`;function y(e,t){const n=getComputedStyle(e),r=(parseFloat(n.paddingLeft)||0)+(parseFloat(n.paddingRight)||0)+(parseFloat(n.borderLeftWidth)||0)+(parseFloat(n.borderRightWidth)||0),o=(parseFloat(n.columnGap)||0)*Math.max(0,t-1),l=e.parentElement;let a=1/0;if(l){const e=getComputedStyle(l);a=l.clientWidth-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)}return{chrome:r+o,room:a}}function x(e){return e.items.some(e=>null!=e.href)?/* @__PURE__ */s(g,{...e}):/* @__PURE__ */s(k,{...e})}function k({items:f,value:p,onChange:g,variant:x="underline",block:k=!1,idPrefix:C,className:F="","aria-label":E,"aria-labelledby":R,labelsFit:A=!1}){const L=i([]),$=i(null),N="pill"===x,[D,S]=c(null),
|
|
3
|
-
return s("div",{ref:$,role:"tablist","data-labels-shown":A?
|
|
1
|
+
import{railLabelsShown as e}from"./chunk-FQEALPZJ.js";import{ChoiceContent as t,choiceItemClass as n,choiceTipClass as r,choiceTrackClass as o}from"./chunk-JDQGHQ2C.js";import{Tooltip as l}from"./chunk-Q3IR5SKD.js";import{useBrowserLayoutEffect as a}from"./chunk-D65T4H6J.js";import{useRef as i,useState as c,useEffect as d}from"react";import{jsx as s,jsxs as u,Fragment as m}from"react/jsx-runtime";var b=(e,t)=>`flex items-center border-b border-gray-200${e?"":" gap-1"} ${t}`.trim();function h(e,t,n="default"){return`-mb-px inline-flex items-center gap-2 border-b-2 px-3 py-2 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${t?"flex-1 justify-center ":""}${e?"border-blue-600 text-blue-600":`border-transparent ${"warning"===n?"text-amber-700":"text-gray-900"} hover:border-gray-300`}`}function f(e){if(!e||!e.startsWith("#")||e.length<2)return null;try{return document.getElementById(decodeURIComponent(e.slice(1)))}catch{return null}}function p(e,t){const n=e.filter(e=>!e.disabled).map(e=>({id:e.id,section:f(e.href)})).filter(e=>null!=e.section);if(0===n.length)return null;const r=function(e){for(let t=e.parentElement;t;t=t.parentElement){const e=getComputedStyle(t).overflowY;if(("auto"===e||"scroll"===e)&&t.scrollHeight>t.clientHeight)return t}return document.scrollingElement??document.documentElement}(n[0].section);if(r.scrollTop>0&&r.scrollTop+r.clientHeight>=r.scrollHeight-1)return n[n.length-1].id;const o=Math.max(0,t.getBoundingClientRect().bottom)+8;let l=n[0].id;for(const e of n)e.section.getBoundingClientRect().top<=o&&(l=e.id);return l}function g({items:e,value:n,onChange:o,block:c=!1,className:u="","aria-label":m,"aria-labelledby":g}){const v=i(null),w=function(e,t,n,r){const o=i(0),l=i({items:t,value:n,onChange:r});l.current={items:t,value:n,onChange:r};const c=i(()=>{});return c.current=()=>{const t=e.current;if(!t||Date.now()<o.current)return;const n=p(l.current.items,t);null!=n&&n!==l.current.value&&l.current.onChange(n)},a(()=>{c.current()},[t]),d(()=>{let e=0;const t=()=>{e||(e=requestAnimationFrame(()=>{e=0,c.current()}))};return document.addEventListener("scroll",t,{capture:!0,passive:!0}),window.addEventListener("resize",t),()=>{document.removeEventListener("scroll",t,{capture:!0}),window.removeEventListener("resize",t),e&&cancelAnimationFrame(e)}},[]),e=>{o.current=Date.now()+800,e!==l.current.value&&l.current.onChange(e),window.setTimeout(()=>c.current(),850)}}(v,e,n,o);/* @__PURE__ */
|
|
2
|
+
return s("nav",{ref:v,"aria-label":m,"aria-labelledby":g,className:b(c,u),children:e.map(e=>{const o=e.id===n,a=/* @__PURE__ */s("a",{href:e.disabled?void 0:e.href,"aria-current":o?"location":void 0,"aria-disabled":e.disabled||void 0,onClick:e.disabled?void 0:t=>((e,t)=>{const n=f(t.href);n&&(e=>!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))(e)&&(e.preventDefault(),w(t.id),n.scrollIntoView({block:"start",behavior:"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"}),n.hasAttribute("tabindex")||n.setAttribute("tabindex","-1"),n.focus({preventScroll:!0}))})(t,e),className:`${h(o,c,"warning"===e.tone?"warning":"default")}${e.disabled?" cursor-not-allowed opacity-50":""}`,children:/* @__PURE__ */s(t,{icon:e.icon,label:e.label})},e.id);return null!=e.tooltip&&!1!==e.tooltip?/* @__PURE__ */s(l,{content:e.tooltip,className:c?r(c):void 0,children:a},e.id):a})})}var v=(e,t)=>`${e}-tab-${t}`,w=(e,t)=>`${e}-panel-${t}`;function y(e,t){const n=getComputedStyle(e),r=(parseFloat(n.paddingLeft)||0)+(parseFloat(n.paddingRight)||0)+(parseFloat(n.borderLeftWidth)||0)+(parseFloat(n.borderRightWidth)||0),o=(parseFloat(n.columnGap)||0)*Math.max(0,t-1),l=e.parentElement;let a=1/0;if(l){const e=getComputedStyle(l);a=l.clientWidth-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)}return{chrome:r+o,room:a}}function x(e){return e.items.some(e=>null!=e.href)?/* @__PURE__ */s(g,{...e}):/* @__PURE__ */s(k,{...e})}function k({items:f,value:p,onChange:g,variant:x="underline",block:k=!1,idPrefix:C,className:F="","aria-label":E,"aria-labelledby":R,labelsFit:A=!1}){const L=i([]),$=i(null),N="pill"===x,[D,S]=c(null),H=D??"none",W=i(()=>{});W.current=()=>{const t=$.current;if(!t||!A)return;const n=function(e){return[...e.querySelectorAll('[role="tab"]')].map(e=>{const t=getComputedStyle(e),n=(parseFloat(t.paddingLeft)||0)+(parseFloat(t.paddingRight)||0)+(parseFloat(t.borderLeftWidth)||0)+(parseFloat(t.borderRightWidth)||0),r=e.querySelector("[data-tab-glyph]")?.getBoundingClientRect().width??0,o=e.querySelector("[data-tab-word]")?.scrollWidth??0;return{bare:n+r,worded:n+r+(r&&o?8:0)+o,active:"true"===e.getAttribute("aria-selected")}})}(t);S(function({tabs:t,block:n,chrome:r,room:o}){if(!n)return e({buttons:t,orientation:"horizontal",chrome:r,room:o});if(0===t.length)return"none";const l=e=>r+e*t.length<=o+.5;if(l(Math.max(...t.map(e=>e.worded))))return"all";const a=t.find(e=>e.active);return a&&l(Math.max(a.worded,...t.map(e=>e.bare)))?"chosen":"none"}({tabs:n,block:k,...y(t,n.length)}))},a(()=>{W.current()}),d(()=>{const e=$.current?.parentElement;if(!A||!e)return;let t=!0;const n=()=>{t&&W.current()},r="undefined"==typeof ResizeObserver?void 0:ResizeObserver,o=r?new r(n):null;return o?.observe(e),document.fonts?.ready.then(n,()=>{}),()=>{t=!1,o?.disconnect()}},[A]);const j=(e,t)=>{for(let n=1;n<=f.length;n+=1){const r=((e+t*n)%f.length+f.length)%f.length;if(!f[r]?.disabled)return r}return null},I=e=>{const t=1===e?f.map((e,t)=>t):f.map((e,t)=>f.length-1-t);for(const e of t)if(!f[e]?.disabled)return e;return null};/* @__PURE__ */
|
|
3
|
+
return s("div",{ref:$,role:"tablist","data-labels-shown":A?H:void 0,"aria-label":E,"aria-labelledby":R,onKeyDown:e=>{const t=f.findIndex(e=>e.id===p);let n=null;if("ArrowRight"===e.key||"ArrowDown"===e.key)n=j(t,1);else if("ArrowLeft"===e.key||"ArrowUp"===e.key)n=j(t,-1);else if("Home"===e.key)n=I(1);else{if("End"!==e.key)return;n=I(-1)}e.preventDefault(),null!==n&&n!==t&&(g(f[n].id),L.current[n]?.focus())},className:N?o(k,F):b(k,F),children:f.map((e,o)=>{const a=e.id===p,i=A&&null!=e.icon,c="all"===H||"chosen"===H&&a,d=/* @__PURE__ */s("button",{ref:e=>{L.current[o]=e},type:"button",role:"tab",id:C?v(C,e.id):void 0,"aria-controls":C?w(C,e.id):void 0,"aria-selected":a,tabIndex:a?0:-1,disabled:e.disabled,onClick:()=>g(e.id),className:N?n({selected:a,disabled:e.disabled,block:k}):h(a,k,"warning"===e.tone?"warning":"default"),children:i?/* @__PURE__ */u(m,{children:[
|
|
4
4
|
/* @__PURE__ */s("span",{"aria-hidden":"true","data-tab-glyph":"",className:"inline-flex shrink-0",children:e.icon}),
|
|
5
5
|
/* @__PURE__ */s("span",{"data-tab-word":c?"shown":"hidden",className:c?"whitespace-nowrap":"sr-only",children:e.label})]}):/* @__PURE__ */s(t,{icon:e.icon,label:e.label})},e.id),b=i?e.tooltip??e.label:e.tooltip;return null!=b&&!1!==b?/* @__PURE__ */s(l,{content:b,className:N||k?r(k):void 0,children:d},e.id):d})})}export{x as Tabs,v as tabButtonId,w as tabPanelId};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{LIGHTBOX_PICTURE_FIT as e,ZoomableImage as t}from"./chunk-CGUMJZUB.js";import{isVideoUrl as r,mediaFileName as n}from"./chunk-SSM3EN7G.js";import{dialogA11y as o}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as a}from"./chunk-7QSDPSXP.js";import{useFocusTrap as l,useScrollLock as i}from"./chunk-CDAJKLGL.js";import{Button_default as c}from"./chunk-HXNMRJQ4.js";import{buttonClasses as s}from"./chunk-UQYNPYF4.js";import{Icon as m}from"./chunk-2UO47XB4.js";import{Z_LAYERS as u}from"./chunk-62LW225J.js";import{registerModalEscapeInterceptor as d}from"./chunk-TWVUQUUD.js";import{useHydrated as f}from"./chunk-D65T4H6J.js";import{useShellStrings as h}from"./chunk-4PAWQEXM.js";import{useRef as p,useState as x,useCallback as b,useEffect as k}from"react";import{createPortal as g}from"react-dom";import{jsx as v,jsxs as w,Fragment as N}from"react/jsx-runtime";var y=/\.(pdf|docx?|xlsx?|pptx?|csv|txt|zip|rar|7z|dwg|dxf|stp|step|igs|iges)(?:[?#]|$)/i;function j(e){return e.kind?e.kind:r(e.url)?"video":y.test(e.url)?"file":"image"}var C="flex items-center justify-center rounded-full bg-black/60 text-on-accent hover:bg-black/80 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",U=e=>e.stopPropagation();function A({images:r,startIndex:y=0,onClose:A,onIndexChange:L,onOpenFile:$}){const z=h().lightbox,D=f(),J=p(null),M=p(null),[P,Q]=x(y),W=r.length,E=D&&W>0,F=b(e=>{if(W<2)return;const t=((P+e)%W+W)%W;Q(t),L?.(t)},[P,W,L]);if(a(E),l(J,E,M),i(E),k(()=>{if(E)return d(()=>(A(),!0),()=>J.current)},[E,A]),k(()=>{if(!E)return;const e=e=>{"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||e.target?.closest?.("video")||(e.preventDefault(),F("ArrowRight"===e.key?1:-1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[E,F]),!E)return null;const G=r[Math.min(P,W-1)],I=j(G),S=G.caption||n(G.url);let X;return X="video"===I?/* @__PURE__ */v("video",{src:G.url,controls:!0,playsInline:!0,"aria-label":S,onClick:U,className:`${e} rounded-lg bg-black`}):"file"===I?/* @__PURE__ */w("div",{onClick:U,className:"flex max-w-[calc(100vw-144px)] flex-col items-center gap-3 rounded-lg bg-surface px-10 py-8 text-center text-ink-faint",children:[
|
|
2
|
+
/* @__PURE__ */v(m,{name:"document","aria-hidden":"true",className:"h-10 w-10"}),
|
|
3
|
+
/* @__PURE__ */v("span",{className:"max-w-[60ch] break-all text-sm font-medium text-ink",children:S}),$?/* @__PURE__ */v(c,{size:"sm",onClick:()=>$(G),children:z.openFile}):/* @__PURE__ */v("a",{href:G.url,target:"_blank",rel:"noopener noreferrer",className:s({size:"sm"}),children:z.openFile})]}):/* @__PURE__ */v(t,{src:G.url,alt:S,className:`${e} object-contain`,frameClassName:"rounded-lg"}),g(
|
|
4
|
+
/* @__PURE__ */w("div",{ref:J,...o({role:"dialog",modal:!0,label:z.label}),"data-lightbox-backdrop":"",className:"fixed inset-0 flex items-center justify-center bg-black/80",style:{zIndex:u.overlay},onClick:A,children:[X,
|
|
5
|
+
/* @__PURE__ */w("div",{className:"absolute right-4 top-4 flex items-center gap-2",onClick:U,children:[
|
|
6
|
+
/* @__PURE__ */v("span",{className:"rounded bg-black/60 px-2 py-1 text-xs text-on-accent tabular-nums",children:z.counter(P+1,W)}),
|
|
7
|
+
/* @__PURE__ */v("button",{ref:M,type:"button",onClick:A,"aria-label":z.close,className:`${C} h-8 w-8`,children:/* @__PURE__ */v(m,{name:"close","aria-hidden":"true",className:"h-4 w-4"})})]}),W>1&&/* @__PURE__ */w(N,{children:[
|
|
8
|
+
/* @__PURE__ */v("button",{type:"button",onClick:e=>{U(e),F(-1)},"aria-label":z.previous,className:`${C} absolute left-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(m,{name:"chevron-left","aria-hidden":"true",className:"h-5 w-5"})}),
|
|
9
|
+
/* @__PURE__ */v("button",{type:"button",onClick:e=>{U(e),F(1)},"aria-label":z.next,className:`${C} absolute right-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(m,{name:"chevron-right","aria-hidden":"true",className:"h-5 w-5"})})]}),
|
|
10
|
+
/* @__PURE__ */w("div",{className:"absolute inset-x-18 bottom-4 flex items-center justify-center gap-3",onClick:U,children:[
|
|
11
|
+
/* @__PURE__ */v("span",{className:"min-w-0 break-words text-center text-sm text-on-accent/85",children:S}),"file"!==I&&/* @__PURE__ */v("a",{href:G.url,target:"_blank",rel:"noopener noreferrer",className:"flex-none text-xs font-medium text-on-accent/70 underline decoration-on-accent/30 underline-offset-2 hover:text-on-accent",children:z.openOriginal})]})]}),document.body)}export{A as ImageLightbox,j as lightboxKind};
|
|
@@ -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-LJN77RG6.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-2UO47XB4.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{solidSurfaceStyle as g}from"./chunk-F27JJHNJ.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{useBrowserLayoutEffect as x}from"./chunk-D65T4H6J.js";import{useShellStrings as k}from"./chunk-4PAWQEXM.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 E,jsx as C,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__ */E("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__ */C("option",{value:"",disabled:!0,children:i}),
|
|
2
|
+
/* @__PURE__ */C(A,{items:r})]});return j?/* @__PURE__ */E(O,{children:[S,
|
|
3
|
+
/* @__PURE__ */C("span",{id:H,hidden:!0,children:$.settingView.auto})]}):S});function A({items:e}){const t=e=>/* @__PURE__ */C("option",{value:e.value,disabled:e.disabled,lang:e.lang,children:e.label},e.value);/* @__PURE__ */
|
|
4
|
+
return C(O,{children:e.map((e,r)=>(e=>l(e))(e)?/* @__PURE__ */C("optgroup",{label:e.label,children:e.options.map(t)},`group-${r}`):t(e))})}var U=N(function({value:l,onChange:u,options:N,placeholder:z,invalid:U,className:B="",id:R,disabled:J,size:K,touchSize:P,title:V,multiple:W,renderOption:L,renderValue:M,valueText:F,readOnly:G=!1,footer:X,changed:Y=!1,auto:q,"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=!!X?.length,me="sm"===K,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=R??`${ke}-trigger`,$e=e=>`${ke}-opt-${e}`,De=`${ke}-changed`,je=d(),He=q??je,Se=`${ke}-auto`,Te=[Q,Y?De:void 0,He?Se:void 0].filter(Boolean).join(" ")||void 0,Ee=j(()=>n(N),[N]),Ce=W?l:[],Oe=u,Ie=f(oe,re,{matchTriggerWidth:!0,...X?.length?{preferredMaxHeight:Number.POSITIVE_INFINITY}:{}}),ze=`${re}|${Ie?.top}|${Ie?.bottom}|${Ie?.maxHeight}|${N.length}`;x(()=>{be(null)},[ze]),x(()=>{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=W?Ee.findIndex(e=>Ce.includes(e.value)):Ee.findIndex(e=>e.value===l),Ue=W?Ee.filter(e=>Ce.includes(e.value)).map(e=>e.label).join(", ")||void 0:Ae>=0?Ee[Ae].label:void 0,Be=!W&&Ae>=0?Ee[Ae].lang:void 0,Re=W?Ee.filter(e=>Ce.includes(e.value)):Ae>=0?[Ee[Ae]]:[],Je=M&&Re.length?M(Re):void 0,Ke=void 0!==Je&&F?F(Re):void 0,Pe=H((e=!0)=>{ie(!1),ae(-1),e&&oe.current?.focus()},[]),Ve=H(()=>{J||G||(ae(Ae>=0?Ae:e(Ee)),ie(!0))},[J,G,Ee,Ae]),We=H(e=>{const t=Ee[e];if(t&&!t.disabled){if(W){const r=l;return Oe(r.includes(t.value)?r.filter(e=>e!==t.value):[...r,t.value]),void ae(e)}Oe(t.value),Pe()}},[Ee,W,l,Oe,Pe]);S(()=>{if(!re)return;return y(e=>!("Escape"!==e.key||!ye.current)&&(Pe(),!0),ue)},[re,Pe]),S(()=>{if(!re)return;const e=e=>{const t=e.target;le.current?.contains(t)||ue()?.contains(t)||Pe(!1)};document.addEventListener("pointerdown",e);const t=v(()=>Pe(!1));return()=>{document.removeEventListener("pointerdown",e),t()}},[re,Pe]),S(()=>{!re||ne<0||de.current?.querySelector(`#${CSS.escape($e(ne))}`)?.scrollIntoView({block:"nearest"})},[re,ne]);const Le=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(Ee,r.buffer,i);n<0||(re?ae(n):W?(ae(n),ie(!0)):We(n))},[re,ne,Ae,Ee,We,W]),Me=re?a(N,(e,t)=>{const r=(i=e.value,W?Ce.includes(i):l===i);var i;const n=t===ne;/* @__PURE__ */
|
|
5
|
+
return E("div",{id:$e(t),role:"option",lang:e.description||e.labelStyle||L?void 0:e.lang,"aria-selected":r,"aria-disabled":e.disabled||void 0,onPointerEnter:()=>{e.disabled||ae(t)},onClick:()=>We(t),className:`mx-1 cursor-pointer truncate rounded-lg ${ve}${W?" 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:[W&&/* @__PURE__ */C(o,{selected:r}),L?/* @__PURE__ */C("span",{className:"block min-w-0 flex-1 truncate",children:L(e,{selected:r,active:n})}):W?/* @__PURE__ */E("span",{className:"block min-w-0 flex-1",children:[
|
|
6
|
+
/* @__PURE__ */C("span",{lang:e.lang,className:"block truncate",style:I(e),children:e.label}),e.description&&/* @__PURE__ */C("span",{className:he,children:e.description})]}):e.description||e.labelStyle?
|
|
7
|
+
/* @__PURE__ */E(O,{children:[
|
|
8
|
+
/* @__PURE__ */C("span",{lang:e.lang,className:"block truncate",style:I(e),children:e.label}),e.description&&/* @__PURE__ */C("span",{className:he,children:e.description})]}):e.label]},e.value)},ke,"mx-1"):null,Fe=void 0!==Je?
|
|
9
|
+
/* @__PURE__ */E("span",{className:"relative block min-w-0 truncate",children:[
|
|
10
|
+
/* @__PURE__ */C("span",{"aria-hidden":"true","data-select-value":"",className:"flex min-w-0 items-center gap-2 truncate",children:Je}),
|
|
11
|
+
/* @__PURE__ */C("span",{lang:void 0===Ke?Be:void 0,className:"sr-only",children:Ke??Ue})]}):/* @__PURE__ */C("span",{lang:Be,className:`block truncate ${void 0===Ue?c:""}`,children:Ue??z??" "}),Ge={zIndex:h.popup,left:Ie?.left,top:Ie?.top,bottom:Ie?.bottom,width:Ie?.width,maxHeight:Ie?.maxHeight??b,visibility:Ie?void 0:"hidden",...g()},Xe=/* @__PURE__ */C("div",{ref:de,id:Ne,role:"listbox","aria-labelledby":_??(Z?void 0:we),"aria-label":_?void 0:Z,"aria-multiselectable":W||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?{...Ge,maxHeight:fe}:Ge,children:Me}),Ye=pe?/* @__PURE__ */E("div",{ref:se,className:"fixed flex flex-col overflow-hidden rounded-(--radius-popup)",style:Ge,children:[Xe,
|
|
12
|
+
/* @__PURE__ */C("div",{className:"shrink-0 border-t border-(--rosh-glass-solid-border) px-1 py-1",children:X.map((e,t)=>/* @__PURE__ */E("button",{ref:e=>{ce.current[t]=e},type:"button","data-select-action":"","aria-disabled":e.disabled||void 0,onClick:()=>(e=>{e.disabled||(Pe(),e.onSelect())})(e),onKeyDown:e=>((e,t)=>{const r=(X?.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 Pe());case"Escape":return e.preventDefault(),e.stopPropagation(),void Pe()}})(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__ */C(m,{name:e.icon,"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
|
|
13
|
+
/* @__PURE__ */C("span",{className:"min-w-0 flex-1 truncate",children:e.label})]},e.label))})]}):Xe;/* @__PURE__ */
|
|
14
|
+
return E("div",{ref:le,className:"relative",children:[
|
|
15
|
+
/* @__PURE__ */C("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":U||void 0,"aria-describedby":Te,"aria-label":Z,"aria-labelledby":_,title:V,disabled:J,"aria-readonly":G||void 0,onClick:()=>re?Pe():Ve(),onKeyDown:t=>{if(!J&&!G)switch(t.key){case"ArrowDown":return t.preventDefault(),void(re?ae(e=>i(Ee,e,1)):Ve());case"ArrowUp":return t.preventDefault(),void(re?ae(e=>i(Ee,e,-1)):Ve());case"Home":return void(re&&(t.preventDefault(),ae(e(Ee))));case"End":return void(re&&(t.preventDefault(),ae(r(Ee))));case"Enter":return void(re&&(t.preventDefault(),We(ne)));case" ":return t.preventDefault(),void(re?We(ne):Ve());case"Escape":return void(re&&(t.preventDefault(),t.stopPropagation(),Pe()));case"Tab":return re&&pe&&!t.shiftKey?(t.preventDefault(),void ce.current[0]?.focus()):void(re&&Pe(!1));default:1!==t.key.length||t.metaKey||t.ctrlKey||t.altKey||(t.preventDefault(),Le(t.key))}},className:s({invalid:U,size:K,readOnly:G,auto:He,className:`${G?"":"pr-8 "}text-left ${B}`.trim()}),children:Y?
|
|
16
|
+
/* @__PURE__ */E("span",{className:"flex min-w-0 items-center gap-1",children:[Fe,
|
|
17
|
+
/* @__PURE__ */C("span",{"aria-hidden":"true","data-select-changed":"",className:"shrink-0",children:"*"})]}):Fe}),Y&&/* @__PURE__ */C("span",{id:De,hidden:!0,children:ge.select.changed}),He&&/* @__PURE__ */C("span",{id:Se,hidden:!0,children:ge.settingView.auto}),!G&&/* @__PURE__ */C(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__ */E("select",{ref:te,value:l,multiple:W||void 0,onChange:e=>Oe(W?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),disabled:J,"aria-hidden":"true",tabIndex:-1,className:"sr-only",...ee,children:[void 0!==z&&!W&&/* @__PURE__ */C("option",{value:"",disabled:!0,children:z}),
|
|
19
|
+
/* @__PURE__ */C(A,{items:N})]}),re&&T(Ye,document.body)]})}),B=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__ */C(z,{ref:r,...t,size:n}):/* @__PURE__ */C(U,{ref:r,...t}):/* @__PURE__ */C(U,{ref:r,...t,size:n})});export{z as NativeSelect,B as Select_default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{buildQuerySections as e,buildEmptySections as t,flattenRows as r,DEFAULT_MAGNIFIER as n,stepIndex as a,nextGroupIndex as s,SEE_ALL_ICON as l,resultTypeKey as o}from"./chunk-WGRS6QBT.js";import{useDismissPopupsOnOpen as i}from"./chunk-7QSDPSXP.js";import{
|
|
1
|
+
import{buildQuerySections as e,buildEmptySections as t,flattenRows as r,DEFAULT_MAGNIFIER as n,stepIndex as a,nextGroupIndex as s,SEE_ALL_ICON as l,resultTypeKey as o}from"./chunk-WGRS6QBT.js";import{useDismissPopupsOnOpen as i}from"./chunk-7QSDPSXP.js";import{Z_LAYERS as c}from"./chunk-62LW225J.js";import{glassStyle as d}from"./chunk-F27JJHNJ.js";import{SpinnerRing as u,LoadingSpinner as p}from"./chunk-R2VKEMZH.js";import{useShellStrings as m}from"./chunk-4PAWQEXM.js";import{useState as h,useRef as f,useEffect as y,useMemo as g,useId as x,useCallback as b}from"react";import{createPortal as k}from"react-dom";import{jsxs as v,jsx as w}from"react/jsx-runtime";function N(e){if(Array.isArray(e))return{results:e,truncatedTypes:[]};if(e&&"object"==typeof e&&Array.isArray(e.results)){const{results:t,truncatedTypes:r}=e;return{results:t,truncatedTypes:Array.isArray(r)?r:[]}}return{results:[],truncatedTypes:[]}}var A=[];function L(e,t,r){const[n,a]=h([]),[s,l]=h(A),[o,i]=h(!1),[c,d]=h("none"),u=f(function(){let e=0,t=null;const r=()=>{e+=1,t?.abort(),t=null};return{begin:()=>{r();const n=e,a=new AbortController;return t=a,{signal:a.signal,isCurrent:()=>n===e}},cancel:r}}());y(()=>{const n=u.current;if(e.length<r||!t||0===t.length)return n.cancel(),a(e=>0===e.length?e:[]),l(A),d("none"),void i(!1);i(!0);const s=setTimeout(async()=>{const r=n.begin(),s=await async function(e,t,r){const n=await Promise.all(e.map(async e=>{try{return{failed:!1,...N(await e(t,{signal:r}))}}catch(e){const t=r.aborted||function(e){if(!e||"object"!=typeof e)return!1;const{name:t,code:r}=e;return"AbortError"===t||"CanceledError"===t||"ERR_CANCELED"===r}(e);return{failed:!t,results:[],truncatedTypes:[]}}}));return{results:n.flatMap(e=>e.results),truncatedTypes:Array.from(new Set(n.flatMap(e=>e.truncatedTypes))),failed:n.filter(e=>e.failed).length}}(t,e,r.signal);r.isCurrent()&&(a(s.results),l(s.truncatedTypes),d(0===s.failed?"none":s.failed>=t.length?"all":"some"),i(!1))},250);return()=>{clearTimeout(s),n.cancel()}},[e,t,r]);return{results:n,truncatedTypes:s,loading:o,failure:c,reset:b(()=>{u.current.cancel(),a(e=>0===e.length?e:[]),l(A),d("none"),i(!1)},[])}}var C=(e,t)=>`${e}-opt-${t}`;function E(e,t){if("seeAll"===e.kind)return l;if("action"===e.kind)return e.icon??n;if(e.icon)return e.icon;const r=t?.[o(e.result)];return r||n}function T({sections:e,activeIdx:t,listId:r,label:n,typeIcons:a,groupCount:s,groupLabel:l,onHover:o,onPick:i}){let c=0;/* @__PURE__ */
|
|
2
2
|
return w("div",{id:r,role:"listbox","aria-label":n,className:"py-1",children:e.map(e=>/* @__PURE__ */v("div",{role:"group","aria-label":l(e.title,e.count,!!e.truncated),children:[
|
|
3
3
|
/* @__PURE__ */v("div",{"aria-hidden":"true",className:"flex items-center justify-between px-4 pt-2 pb-1 text-2xs font-semibold uppercase tracking-wide text-ink-faintest",children:[
|
|
4
4
|
/* @__PURE__ */w("span",{children:e.title}),
|
|
@@ -7,14 +7,14 @@ return v("div",{id:C(r,n),role:"option","aria-selected":s,className:"flex items-
|
|
|
7
7
|
/* @__PURE__ */w("svg",{className:"h-4 w-4 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:/* @__PURE__ */w("path",{strokeLinecap:"round",strokeLinejoin:"round",d:E(e,a)})}),
|
|
8
8
|
/* @__PURE__ */v("div",{className:"flex-1 min-w-0",children:[
|
|
9
9
|
/* @__PURE__ */w("p",{className:"text-sm font-medium truncate "+(u?"text-blue-600":"text-gray-900"),children:e.label}),d&&/* @__PURE__ */w("p",{className:"text-xs text-gray-400 truncate",children:d})]}),l&&/* @__PURE__ */w("span",{className:"shrink-0 rounded-full bg-gray-100 px-2 py-0.5 text-3xs font-medium text-ink-faint",children:l})]},e.key)})]},e.key))})}var j="react-os-shell:open-global-search";function D(){"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(j))}function I({providers:l,typeIcons:o,typeLabels:N,listRoutes:A,placeholder:E,quickActions:D,onSelect:I,recent:K,onRecord:M,favorites:P,hotkey:R=!0}={}){const S=m().search,$=E??S.placeholder,[B,W]=h(!1),[H,J]=h(""),[z,F]=h(0),Q=f(null),{results:G,truncatedTypes:V,loading:X,failure:q,reset:U}=L(H,l,2);y(()=>{const e=e=>{R&&!e.defaultPrevented&&(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),W(e=>!e)),"Escape"===e.key&&B&&W(!1)},t=()=>W(!0);return window.addEventListener("keydown",e),window.addEventListener(j,t),()=>{window.removeEventListener("keydown",e),window.removeEventListener(j,t)}},[B,R]),i(B);const[Z,_]=h(!1);B!==Z&&(_(B),B&&(J(""),F(0),U())),y(()=>{B?setTimeout(()=>Q.current?.focus(),50):J("")},[B]),y(()=>{F(0)},[G]);const O=H.length>=2,Y=g(()=>O?e(G,D,H,S.actions,{truncatedTypes:V,listRoutes:A,typeLabels:N,seeAllLabel:S.seeAll}):t({recent:K,favorites:P,actions:D,typeLabels:N},S),[O,G,V,A,N,D,H,K,P,S]),ee=g(()=>r(Y),[Y]),te=Math.min(z,Math.max(ee.length-1,0)),re=x(),ne=ee.length>0;y(()=>{B&&0!==ee.length&&document.getElementById(C(re,te))?.scrollIntoView?.({block:"nearest"})},[B,te,ee.length,re]);const ae=b(e=>{W(!1),"action"!==e.kind?("result"!==e.kind&&"recent"!==e.kind||M?.(e.result),I?.(e.result)):e.action.onSelect()},[I,M]);return B?k(
|
|
10
|
-
/* @__PURE__ */v("div",{"data-global-search":"",className:"fixed inset-0 flex items-start justify-center pt-[15vh]",style:{zIndex:
|
|
10
|
+
/* @__PURE__ */v("div",{"data-global-search":"",className:"fixed inset-0 flex items-start justify-center pt-[15vh]",style:{zIndex:c.overlay},onClick:()=>W(!1),children:[
|
|
11
11
|
/* @__PURE__ */w("div",{"data-global-search-backdrop":"",className:"absolute inset-0 bg-black/50 backdrop-blur-sm"}),
|
|
12
|
-
/* @__PURE__ */v("div",{className:"relative z-10 w-full max-w-xl rounded-(--radius-popup) overflow-hidden",onClick:e=>e.stopPropagation(),style:
|
|
12
|
+
/* @__PURE__ */v("div",{className:"relative z-10 w-full max-w-xl rounded-(--radius-popup) overflow-hidden",onClick:e=>e.stopPropagation(),style:d(),children:[
|
|
13
13
|
/* @__PURE__ */v("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-gray-200",children:[
|
|
14
14
|
/* @__PURE__ */w("svg",{className:"h-5 w-5 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */w("path",{strokeLinecap:"round",strokeLinejoin:"round",d:n})}),
|
|
15
|
-
/* @__PURE__ */w("input",{ref:Q,type:"text",value:H,onChange:e=>{J(e.target.value),F(0)},onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),F(a(te,1,ee.length))):"ArrowUp"===e.key?(e.preventDefault(),F(a(te,-1,ee.length))):"Tab"===e.key&&ee.length>0?(e.preventDefault(),F(s(Y.map(e=>e.rows.length),te,e.shiftKey?-1:1))):"Enter"===e.key&&ee[te]&&ae(ee[te])},placeholder:$,role:"combobox","aria-expanded":ne,"aria-controls":ne?re:void 0,"aria-activedescendant":ne?C(re,te):void 0,"aria-autocomplete":"list",className:"flex-1 text-sm bg-transparent border-0 rosh-focus-ring placeholder-gray-400"}),X&&/* @__PURE__ */w("span",{"data-global-search-spinner":"",role:"status","aria-label":S.searching,className:"flex shrink-0",children:/* @__PURE__ */w(
|
|
15
|
+
/* @__PURE__ */w("input",{ref:Q,type:"text",value:H,onChange:e=>{J(e.target.value),F(0)},onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),F(a(te,1,ee.length))):"ArrowUp"===e.key?(e.preventDefault(),F(a(te,-1,ee.length))):"Tab"===e.key&&ee.length>0?(e.preventDefault(),F(s(Y.map(e=>e.rows.length),te,e.shiftKey?-1:1))):"Enter"===e.key&&ee[te]&&ae(ee[te])},placeholder:$,role:"combobox","aria-expanded":ne,"aria-controls":ne?re:void 0,"aria-activedescendant":ne?C(re,te):void 0,"aria-autocomplete":"list",className:"flex-1 text-sm bg-transparent border-0 rosh-focus-ring placeholder-gray-400"}),X&&/* @__PURE__ */w("span",{"data-global-search-spinner":"",role:"status","aria-label":S.searching,className:"flex shrink-0",children:/* @__PURE__ */w(u,{className:"h-4 w-4",ink:"text-ink-faint"})}),
|
|
16
16
|
/* @__PURE__ */w("kbd",{className:"hidden sm:inline-flex items-center rounded border border-line-strong px-2 py-0.5 text-2xs font-medium text-ink-faintest",children:S.escBadge})]}),
|
|
17
|
-
/* @__PURE__ */v("div",{className:"max-h-[50vh] overflow-y-auto",children:[X&&0===ee.length&&/* @__PURE__ */w(
|
|
17
|
+
/* @__PURE__ */v("div",{className:"max-h-[50vh] overflow-y-auto",children:[X&&0===ee.length&&/* @__PURE__ */w(p,{size:"sm",padding:"py-6",label:S.searching}),!X&&"all"===q&&O&&/* @__PURE__ */w("div",{role:"alert",className:"px-4 py-3 text-center text-sm text-red-600",children:S.searchFailed}),!X&&O&&0===ee.length&&"all"!==q&&/* @__PURE__ */w("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:S.noResults}),ne&&/* @__PURE__ */w(T,{sections:Y,activeIdx:te,listId:re,label:S.listLabel,typeIcons:o,groupCount:S.groupCount,groupLabel:S.groupLabel,onHover:F,onPick:ae}),!X&&"some"===q&&O&&/* @__PURE__ */w("div",{role:"status",className:"px-4 py-2 text-xs text-amber-600",children:S.partialFailure}),!X&&!O&&0===ee.length&&/* @__PURE__ */w("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:S.minChars(2)})]}),
|
|
18
18
|
/* @__PURE__ */v("div",{className:"flex items-center justify-between px-4 py-2 border-t border-line-subtle bg-surface-sunken text-2xs text-ink-faintest",children:[
|
|
19
19
|
/* @__PURE__ */v("div",{className:"flex items-center gap-3",children:[
|
|
20
20
|
/* @__PURE__ */v("span",{className:"flex items-center gap-1",children:[
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import{MOVE_KEYS as e,MoveGrip as t,MoveHint as r,moveFromKey as a}from"./chunk-
|
|
1
|
+
import{MOVE_KEYS as e,MoveGrip as t,MoveHint as r,moveFromKey as a}from"./chunk-PUBJ5YHQ.js";import{ItemCount as n}from"./chunk-4VTJEKHX.js";import{GROUP_COLORS as o}from"./chunk-EQZZ4V5X.js";import{Icon as i}from"./chunk-2UO47XB4.js";import{OneLineLabel as s}from"./chunk-S5SRXI4V.js";import{Tooltip as l}from"./chunk-Q3IR5SKD.js";import{useBrowserLayoutEffect as c}from"./chunk-D65T4H6J.js";import{useShellStrings as d}from"./chunk-4PAWQEXM.js";import{useRef as u,useCallback as p,useId as m,isValidElement as f}from"react";import{jsx as h,jsxs as g}from"react/jsx-runtime";var b='[role="treeitem"]';function v(e){return[...e.querySelectorAll(b)].filter(t=>{for(let r=t.parentElement?.closest('[role="group"]');r&&e.contains(r);r=r.parentElement?.closest('[role="group"]')??null)if(r.hasAttribute("hidden"))return!1;return!0})}function y({"aria-label":e,"aria-labelledby":t,children:r,className:a="",rootProps:n}){const o=u(null);c(()=>{const e=o.current;if(!e)return;const t=[...e.querySelectorAll(b)];if(0===t.length)return;const r=t.find(e=>e===document.activeElement)??t.find(e=>"true"===e.getAttribute("aria-selected"))??v(e)[0]??t[0];for(const e of t)e.tabIndex=e===r?0:-1});const i=p(e=>{n?.onKeyDown?.(e);const t=o.current,r=e.target.closest?.(b);if(!t||!r||e.target!==r||e.defaultPrevented)return;if(e.altKey||e.ctrlKey||e.metaKey)return;const a=v(t),i=a.indexOf(r),s=Number(r.getAttribute("aria-level")??"1"),l=r=>{e.preventDefault(),function(e,t){if(t){for(const r of e.querySelectorAll(b))r.tabIndex=r===t?0:-1;t.focus()}}(t,r)};switch(e.key){case"ArrowDown":l(a[i+1]);break;case"ArrowUp":l(a[i-1]);break;case"Home":l(a[0]);break;case"End":l(a[a.length-1]);break;case"ArrowRight":if("true"===r.getAttribute("aria-expanded")){const t=a[i+1];t&&Number(t.getAttribute("aria-level")??"1")>s?l(t):e.preventDefault()}break;case"ArrowLeft":if("true"!==r.getAttribute("aria-expanded"))for(let e=i-1;e>=0;e--)if(Number(a[e].getAttribute("aria-level")??"1")<s){l(a[e]);break}}},[n]);/* @__PURE__ */
|
|
2
2
|
return h("div",{...n,ref:o,role:"tree","aria-label":t?void 0:e,"aria-labelledby":t,onKeyDown:i,className:`flex flex-col gap-1 ${a}`.trim(),children:r})}function x({children:e,hidden:t,className:r=""}){/* @__PURE__ */
|
|
3
3
|
return h("div",{role:"group",hidden:t,className:`ml-4 flex flex-col gap-1 border-l border-gray-200 pl-2 ${r}`.trim(),children:e})}var k=["inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-full px-2","text-2xs font-medium normal-case tabular-nums tracking-normal"].join(" "),w=`${k} bg-[color:color-mix(in_srgb,var(--ink-faint)_12%,transparent)] text-gray-600`;function N(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&!f(e)&&"label"in e}function A(e){if(null==e||!1===e||"number"==typeof e)return null;const t=Array.isArray(e)&&e.length>0&&e.every(N)?e:N(e)?[e]:null;return t?t.map((e,t)=>/* @__PURE__ */h("span",{"data-tree-count":"","data-tone":e.tone,className:e.tone?`${k} ${o[e.tone]}`:w,children:e.label},t)):/* @__PURE__ */h("span",{"data-tree-count":"",className:w,children:e})}function j({children:e,count:t,countLabel:r,expanded:a,onToggle:o}){const i=void 0!==a,l=
|
|
4
4
|
/* @__PURE__ */h("span",{"data-tree-label-text":"",className:"flex min-w-0 flex-1 text-left",children:/* @__PURE__ */h(s,{children:e})}),c="number"==typeof t?/* @__PURE__ */h(n,{count:t,label:r,showZero:!0}):null!=t&&!1!==t&&/* @__PURE__ */h("span",{"data-tree-count":"",className:w,children:t}),d="text-xs font-semibold uppercase tracking-wide text-ink-faint";return i?/* @__PURE__ */h("div",{role:"presentation",className:"pb-1 pt-3",children:/* @__PURE__ */g("button",{type:"button","aria-expanded":a,onClick:o,className:["flex w-full items-center gap-2 rounded-md px-2 hover:text-ink-strongest","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",d].join(" "),children:[
|
|
5
|
-
/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-caret":"",className:"flex h-4 w-4 shrink-0 items-center justify-center",children
|
|
6
|
-
/* @__PURE__ */h("span",{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),l,c]})}var
|
|
7
|
-
return g("div",{...
|
|
5
|
+
/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-caret":"",className:"flex h-4 w-4 shrink-0 items-center justify-center",children:$(!!a)}),l,c]})}):/* @__PURE__ */g("div",{role:"presentation",className:`flex items-center gap-2 px-2 pb-1 pt-3 ${d}`,children:[
|
|
6
|
+
/* @__PURE__ */h("span",{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),l,c]})}var $=e=>/* @__PURE__ */h(i,{name:"chevron-right","aria-hidden":"true",strokeWidth:2.6,className:"h-3 w-3 transition-transform "+(e?"rotate-90":"")}),P={backgroundColor:"inherit",maskImage:"linear-gradient(to right, transparent, black 12px)",WebkitMaskImage:"linear-gradient(to right, transparent, black 12px)"};function D({label:o,level:i=1,icon:l,preview:c,selected:d=!1,tone:u,expanded:p,onToggle:f,onSelect:b,muted:v=!1,badge:y,count:x,countLabel:k,actions:w,actionsPinned:N=!1,actionsOverlay:j=!0,rename:D,drop:C,dragging:K=!1,draggable:E=!1,dragHint:I,onMove:H,rowProps:S,className:T=""}){const X=void 0!==p,B=m(),L=x??("number"==typeof y?y:void 0),Q=[S?.["aria-describedby"],H?B:void 0].filter(Boolean).join(" ")||void 0,R="shared"===u?"text-[color:var(--status-success-soft-ink)]":null,W=d?R?`bg-[var(--status-success-soft)] ${R}`:"bg-accent-tint text-blue-700":"into"===C?`bg-accent-tint ${R??"text-ink-strongest"}`:`${R??"text-ink"} hover:bg-gray-100`;/* @__PURE__ */
|
|
7
|
+
return g("div",{...S,role:"treeitem","aria-level":i,"aria-selected":d,"aria-expanded":X?p:void 0,"data-tone":u,tabIndex:d?0:-1,"aria-keyshortcuts":S?.["aria-keyshortcuts"]??(H?e:void 0),"aria-describedby":Q,"data-drop":C,"data-draggable":E||void 0,onKeyDown:e=>{if(S?.onKeyDown?.(e),e.target!==e.currentTarget||e.defaultPrevented)return;const t=a(e);t&&H?(e.preventDefault(),H(t)):"Enter"!==e.key&&" "!==e.key||!b?("ArrowRight"===e.key&&X&&!p&&f||"ArrowLeft"===e.key&&X&&p&&f)&&(e.preventDefault(),f()):(e.preventDefault(),b())},onClick:e=>{S?.onClick?.(e),e.defaultPrevented||b?.()},className:["group/treerow relative flex h-8 shrink-0 select-none items-center gap-2 rounded-md px-2 text-sm",E?"cursor-grab active:cursor-grabbing":"cursor-pointer","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",W,"into"===C?"ring-2 ring-inset ring-[color:var(--rosh-drop-ring)]":"",K?"opacity-40":"",T].filter(Boolean).join(" "),children:["before"===C&&/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-drop-line":"",className:"pointer-events-none absolute inset-x-2 -top-0.5 h-0.5 rounded-full bg-blue-500"}),"after"===C&&/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-drop-line":"",className:"pointer-events-none absolute inset-x-2 -bottom-0.5 h-0.5 rounded-full bg-blue-500"}),E&&
|
|
8
8
|
/* @__PURE__ */h(t,{marker:"tree",hint:I,dragging:K,revealClassName:"group-hover/treerow:opacity-100"}),
|
|
9
|
-
/* @__PURE__ */h("span",
|
|
9
|
+
/* @__PURE__ */h("span",X?{"aria-hidden":"true","data-tree-caret":"",onClick:e=>{e.stopPropagation(),f?.()},className:"flex h-4 w-4 shrink-0 items-center justify-center rounded text-gray-500 hover:bg-gray-200 hover:text-gray-900",children:$(!!p)}:{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),null!=l&&/* @__PURE__ */h("span",{"aria-hidden":"true",className:"flex h-4 w-4 shrink-0 items-center justify-center "+(v?"text-ink-faintest":""),children:l}),
|
|
10
10
|
/* @__PURE__ */g("span",{className:"relative flex min-w-0 flex-1 items-center gap-2",children:[D??
|
|
11
|
-
/* @__PURE__ */h("span",{"data-tree-name":"",className:`flex min-w-0 ${d?"font-semibold":"font-medium"} ${v?"text-ink-faintest line-through":""}`,children:/* @__PURE__ */g(s,{children:[o,null!=c&&/* @__PURE__ */h("span",{className:"ml-2 font-normal text-ink-faint",children:c})]})}),A(y),null!=
|
|
12
|
-
/* @__PURE__ */g("span",{"data-tree-actions":"","data-tree-actions-overlay":"",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),style
|
|
11
|
+
/* @__PURE__ */h("span",{"data-tree-name":"",className:`flex min-w-0 ${d?"font-semibold":"font-medium"} ${v?"text-ink-faintest line-through":""}`,children:/* @__PURE__ */g(s,{children:[o,null!=c&&/* @__PURE__ */h("span",{className:"ml-2 font-normal text-ink-faint",children:c})]})}),A(y),null!=L&&/* @__PURE__ */h(n,{count:L,label:k,active:d,showZero:!0,className:"ml-auto"}),null!=w&&!j&&/* @__PURE__ */h("span",{"data-tree-actions":"",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),className:`${null!=L?"":"ml-auto "}flex shrink-0 items-center gap-0.5 transition-opacity ${N||v?"opacity-100":"opacity-0 group-hover/treerow:opacity-100 group-focus-within/treerow:opacity-100"}`,children:w})]}),null!=w&&j&&
|
|
12
|
+
/* @__PURE__ */g("span",{"data-tree-actions":"","data-tree-actions-overlay":"",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),style:P,className:"absolute inset-y-0 right-0 grid rounded-r-md transition-opacity "+(N||v||d?"opacity-100":"pointer-events-none opacity-0 group-hover/treerow:pointer-events-auto group-hover/treerow:opacity-100 group-focus-within/treerow:pointer-events-auto group-focus-within/treerow:opacity-100"),children:[
|
|
13
13
|
/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-actions-scrim":"",className:"col-start-1 row-start-1",style:{background:"var(--rosh-tree-ground, var(--surface))"}}),
|
|
14
14
|
/* @__PURE__ */h("span",{"aria-hidden":"true",className:"col-start-1 row-start-1",style:{backgroundColor:"inherit"}}),
|
|
15
|
-
/* @__PURE__ */h("span",{className:"col-start-1 row-start-1 flex items-center gap-0.5 pl-4 pr-2",children:w})]}),
|
|
15
|
+
/* @__PURE__ */h("span",{className:"col-start-1 row-start-1 flex items-center gap-0.5 pl-4 pr-2",children:w})]}),H&&/* @__PURE__ */h(r,{id:B})]})}function C({onAdd:e,label:t,drop:r=!1,slotProps:a}){const n=d().tree,o=r?n.dropHere:t??n.empty,i="flex min-h-8 w-full items-center gap-2 rounded-md border border-dashed px-3 text-sm "+(r?"border-blue-500 bg-blue-50 text-blue-700":"border-gray-300 text-gray-500");/* @__PURE__ */
|
|
16
16
|
return h("div",{...a,role:"presentation","data-drop":r||void 0,children:e?/* @__PURE__ */g("button",{type:"button",onClick:e,className:`${i} text-left hover:bg-gray-100 hover:text-gray-900 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]`,children:[
|
|
17
17
|
/* @__PURE__ */h("span",{"aria-hidden":"true",children:"+"}),o]}):/* @__PURE__ */h("span",{className:i,children:o})})}function K({onInsert:e,label:t,drop:r=!1,seamProps:a}){const n=d().tree,o=t??n.insertHere,s=r?"opacity-100":e?"opacity-0 group-hover/seam:opacity-100 group-focus-within/seam:opacity-100":"opacity-0";/* @__PURE__ */
|
|
18
18
|
return g("div",{...a,role:"presentation","data-tree-seam":"","data-drop":r||void 0,className:`group/seam relative z-10 -my-1 h-1 shrink-0 ${a?.className??""}`.trim(),children:[
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{isSafeLinkHref as e}from"./chunk-PJPK2ADX.js";import{Button_default as t}from"./chunk-
|
|
1
|
+
import{isSafeLinkHref as e}from"./chunk-PJPK2ADX.js";import{Button_default as t}from"./chunk-HXNMRJQ4.js";import{Icon as n}from"./chunk-2UO47XB4.js";import{useShellStrings as r}from"./chunk-4PAWQEXM.js";import{createContext as l,useContext as s}from"react";import{jsx as a,jsxs as i}from"react/jsx-runtime";var c=/!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]+)\]\(([^)]+)\)|\*\*([^*]+)\*\*|`([^`]+)`|\*([^*]+)\*/g,o=l(void 0);function d({href:t,children:n}){const r=s(o),l=(t=>e(t.trim()))(t)?t:void 0;/* @__PURE__ */
|
|
2
2
|
return a("a",{href:l,target:"_blank",rel:"noreferrer",className:"text-blue-600 hover:underline",onClick:l&&r?e=>{(e=>!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))(e)&&r(l)&&e.preventDefault()}:void 0,children:n})}function u(e){const t=[];let n,r=0,l=0;const s=new RegExp(c.source,"g");for(;null!==(n=s.exec(e));)n.index>r&&t.push(e.slice(r,n.index)),void 0!==n[1]?t.push(
|
|
3
3
|
/* @__PURE__ */i("span",{className:"text-gray-400",children:["[",n[1],"]"]},l++)):void 0!==n[3]?t.push(
|
|
4
4
|
/* @__PURE__ */a(d,{href:n[4],children:n[3]},l++)):void 0!==n[5]?t.push(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Tooltip as r}from"./chunk-
|
|
1
|
+
import{Tooltip as r}from"./chunk-Q3IR5SKD.js";import{useShellStrings as e}from"./chunk-4PAWQEXM.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";var i="Alt+ArrowUp Alt+ArrowDown";function c(r){return!r.altKey||r.ctrlKey||r.metaKey?null:"ArrowUp"===r.key?"up":"ArrowDown"===r.key?"down":null}var a=/* @__PURE__ */n("svg",{"aria-hidden":"true",viewBox:"0 0 4 14",fill:"currentColor",className:"h-3.5 w-1",children:[
|
|
2
2
|
/* @__PURE__ */t("circle",{cx:"2",cy:"3",r:"1.1"}),
|
|
3
3
|
/* @__PURE__ */t("circle",{cx:"2",cy:"7",r:"1.1"}),
|
|
4
4
|
/* @__PURE__ */t("circle",{cx:"2",cy:"11",r:"1.1"})]});function l({hint:n,dragging:i,revealClassName:c,marker:l}){const o=e().tree;/* @__PURE__ */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{onOverlayOpen as t}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as e}from"./chunk-62LW225J.js";import{followAnchor as r,popupBounds as o,VIEWPORT_MARGIN as n,showingBox as i,placeBeside as a,placeArrow as l}from"./chunk-GLUJS42B.js";import{
|
|
1
|
+
import{onOverlayOpen as t}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as e}from"./chunk-62LW225J.js";import{followAnchor as r,popupBounds as o,VIEWPORT_MARGIN as n,showingBox as i,placeBeside as a,placeArrow as l}from"./chunk-GLUJS42B.js";import{solidSurfaceStyle as c}from"./chunk-F27JJHNJ.js";import{registerModalEscapeInterceptor as s,escapeSurfaceAbove as d}from"./chunk-TWVUQUUD.js";import{useBrowserLayoutEffect as h}from"./chunk-D65T4H6J.js";import{createContext as m,useContext as u,useState as p,useRef as f,useId as x,useEffect as w,isValidElement as g,cloneElement as b}from"react";import{createPortal as v}from"react-dom";import{jsxs as y,jsx as k}from"react/jsx-runtime";var j=m(!1),H=()=>u(j),W={top:"bottom-full left-1/2 -translate-x-1/2 mb-3",bottom:"top-full left-1/2 -translate-x-1/2 mt-3",left:"right-full top-1/2 -translate-y-1/2 mr-3",right:"left-full top-1/2 -translate-y-1/2 ml-3"};function N({content:m,side:u="top",delay:H=200,children:N,className:B="relative inline-flex",describe:J=!0,open:T}){const[M,U]=p(!1),z=(T??M)&&!(null==m||!1===m||""===m),[C,D]=p(null),E=f(void 0),L=f(null),P=f(null),$=x(),F=f(!1),G=()=>{window.clearTimeout(E.current),F.current||(E.current=window.setTimeout(()=>U(!0),H))},R=()=>{window.clearTimeout(E.current),U(!1)},I=()=>{F.current=!0,R()},Q=()=>{F.current=!1,R()};w(()=>()=>window.clearTimeout(E.current),[]),h(()=>{if(!z)return void D(null);const t=()=>{const t=L.current,e=P.current;if(!t||!e)return;const r=o(t),c=Math.max(0,r.right-r.left-2*n),s=Math.max(0,r.bottom-r.top-2*n);e.style.maxWidth=`${c}px`,e.style.maxHeight=`${s}px`;const d=e.getBoundingClientRect();if(d.width<=0||d.height<=0)return;const h=t.getBoundingClientRect();if(!i(t))return void R();const m=a(h,d,u,r,12),p=l(h,m,d,16,6),f={anchor:{left:h.left,top:h.top,width:h.width,height:h.height},left:m.left-h.left,top:m.top-h.top,maxWidth:c,maxHeight:s,side:m.side,arrow:p&&{left:p.x-h.left,top:p.y-h.top}};D(t=>{return t&&(r=f,(e=t).anchor.left===r.anchor.left&&e.anchor.top===r.anchor.top&&e.anchor.width===r.anchor.width&&e.anchor.height===r.anchor.height&&e.left===r.left&&e.top===r.top&&e.maxWidth===r.maxWidth&&e.maxHeight===r.maxHeight&&e.side===r.side&&e.arrow?.left===r.arrow?.left&&e.arrow?.top===r.arrow?.top)?t:f;var e,r})};return t(),r(()=>L.current,t)},[z,u,m]),w(()=>{if(!z)return;const e=s(t=>"Escape"===t.key&&(R(),!d(L.current))),r=t(R);return()=>{e(),r()}},[z]);const S=z&&J?$:void 0,V=g(N)?b(N,{"aria-describedby":[N.props["aria-describedby"],S].filter(Boolean).join(" ")||void 0}):N,q=z?c():void 0;/* @__PURE__ */
|
|
2
2
|
return y("span",{ref:L,className:B,"aria-describedby":g(N)?void 0:S,onMouseEnter:G,onMouseLeave:Q,onFocus:t=>{let e=!0;try{e=t.target.matches(":focus-visible")}catch{}e&&G()},onBlur:Q,onPointerDown:I,onClick:I,children:[
|
|
3
3
|
/* @__PURE__ */k(j.Provider,{value:!0,children:V}),z&&v(
|
|
4
4
|
/* @__PURE__ */y("span",{className:"pointer-events-none fixed left-0 top-0",style:{zIndex:e.hint,...C?.anchor},children:[
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-2UO47XB4.js";import{SpinnerRing as t}from"./chunk-R2VKEMZH.js";import{useState as a,useId as r,Children as s,isValidElement as i}from"react";import{jsx as n,jsxs as l}from"react/jsx-runtime";function c({summary:t,busy:c=!1,open:o,onOpenChange:d,label:m="Steps",className:u="",children:p}){const[f,h]=a(null),g=r(),x=o??f??c;return 1===s.toArray(p).filter(i).length?/* @__PURE__ */n("div",{className:`text-xs text-gray-500 ${u}`.trim(),children:/* @__PURE__ */n("ol",{"aria-label":m,children:p})}):/* @__PURE__ */l("div",{className:`text-xs text-gray-500 ${u}`.trim(),children:[
|
|
2
2
|
/* @__PURE__ */l("button",{type:"button",onClick:()=>{h(!x),d?.(!x)},"aria-expanded":x,"aria-controls":x?g:void 0,className:"flex w-full items-center gap-2 rounded text-left hover:text-gray-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-blue-600",children:[
|
|
3
3
|
/* @__PURE__ */n(e,{name:"chevron-right",size:12,className:"shrink-0 motion-safe:transition-transform "+(x?"rotate-90":"")}),
|
|
4
4
|
/* @__PURE__ */n("span",{"aria-live":"polite",className:"min-w-0 flex-1 truncate",children:t})]}),x&&/* @__PURE__ */n("ol",{id:g,"aria-label":m,className:"mt-2 ml-2 space-y-2 border-l border-gray-200 pl-3",children:p})]})}var o={pending:"text-gray-400",active:"text-gray-800",complete:"text-gray-600",failed:"text-red-600",stopped:"text-gray-500",waiting:"text-amber-700",skipped:"text-gray-400"},d={pending:"Pending",active:"In progress",complete:"Done",failed:"Failed",stopped:"Stopped",waiting:"Waiting for you",skipped:"Skipped"};function m({status:a}){switch(a){case"active":/* @__PURE__ */
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{Calendar as e}from"./chunk-7MSC3Z5H.js";import{fromDateKey as t,toDateKey as r}from"./chunk-2HMNOLKX.js";import{inputClasses as a,PLACEHOLDER_INK as n}from"./chunk-AYZY3YNC.js";import{calendarNames as i}from"./chunk-Y3JW2GW5.js";import{Icon as o}from"./chunk-2UO47XB4.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as s}from"./chunk-62LW225J.js";import{useDropdownPosition as d}from"./chunk-GLUJS42B.js";import{registerModalEscapeInterceptor as u}from"./chunk-TWVUQUUD.js";import{useBrowserLayoutEffect as c}from"./chunk-D65T4H6J.js";import{useShellStrings as m,useShellLocale as b}from"./chunk-4PAWQEXM.js";import{forwardRef as f,useState as p,useRef as h,useId as v,useEffect as g}from"react";import{createPortal as y}from"react-dom";import{jsx as x,jsxs as N}from"react/jsx-runtime";var k=/^\d{4}-\d{2}-\d{2}$/,j=/^(aria|data)-/,w=/* @__PURE__ */new Set(["aria-invalid","aria-required"]);function D(e){if(null==e||""===e)return"";if(e instanceof Date)return Number.isNaN(e.getTime())?"":r(e);if(k.test(e))return e;const t=new Date(e);return Number.isNaN(t.getTime())?"":r(t)}function W(e,r){const a=t(e);return a?r.longDate(a.getFullYear(),a.getMonth(),a.getDate()):""}var B=f(function({value:f,onChange:k,min:B,max:C,invalid:F,size:E,native:O,weekStartsOn:S,className:$="","aria-label":q,"aria-describedby":L,"aria-labelledby":M,id:U,name:Y,disabled:z,placeholder:I,required:J,clearable:T,form:G,title:H,tabIndex:P,autoFocus:X,onFocus:A,onBlur:Q,...Z},K){const R=T??!J,V=D(f),_=D(B),ee=D(C),te=m().datePicker,re=b(),ae=i(re),[ne,ie]=p(!1),oe=h(null),le=h(null),se=h(null),de=v(),ue=v(),ce=v(),me=d(le,ne,{popupRef:se}),[be,fe]=p(!1);c(()=>{const e=!!U&&(le.current?.labels?.length??0)>0;e!==be&&fe(e)});const pe=!q&&(!!M||be);if(g(()=>{if(!ne)return;const e=e=>{const t=e.target;oe.current?.contains(t)||se.current?.contains(t)||ie(!1)};document.addEventListener("pointerdown",e,!0);const t=l(()=>ie(!1));return()=>{document.removeEventListener("pointerdown",e,!0),t()}},[ne]),g(()=>{if(ne)return u(e=>"Escape"===e.key&&(ie(!1),le.current?.focus(),!0),()=>se.current)},[ne]),O)/* @__PURE__ */
|
|
2
|
+
return x("input",{ref:K,type:"date",lang:re,id:U,name:Y,disabled:z,"aria-label":q,"aria-describedby":L,"aria-invalid":F||void 0,value:V,min:_||void 0,max:ee||void 0,onChange:e=>k?.(t(e.target.value)),className:a({invalid:F,size:E,className:$}),"aria-labelledby":M,required:J,form:G,title:H,tabIndex:P,autoFocus:X,onFocus:A,onBlur:Q,...Z});const he=Object.fromEntries(Object.entries(Z).filter(([e])=>j.test(e)&&!w.has(e))),ve=Z["aria-required"],ge=!!J||!0===ve||"true"===ve,ye=[pe?ue:void 0,ge?ce:void 0,L].filter(Boolean).join(" ")||void 0,xe=r(/* @__PURE__ */new Date),Ne=(!_||xe>=_)&&(!ee||xe<=ee),ke=I??te.placeholder;/* @__PURE__ */
|
|
3
|
+
return N("div",{ref:oe,className:"relative",children:[
|
|
4
|
+
/* @__PURE__ */x("input",{ref:K,type:"hidden",name:Y,form:G,value:V}),
|
|
5
|
+
/* @__PURE__ */N("button",{ref:le,type:"button",...he,id:U,disabled:z,title:H,tabIndex:P,autoFocus:X,onFocus:A,onBlur:Q,"aria-haspopup":"dialog","aria-expanded":ne,"aria-controls":ne?de:void 0,"aria-labelledby":M,"aria-describedby":ye,"aria-label":q?`${q}${V?`, ${W(V,ae)}`:""}`:void 0,onClick:()=>ie(e=>!e),className:`${a({invalid:F,size:E,className:$})} flex items-center justify-between text-left`,children:[
|
|
6
|
+
/* @__PURE__ */x("span",{className:V?"text-ink-strongest":n,children:V?W(V,ae):ke}),
|
|
7
|
+
/* @__PURE__ */x(o,{name:"date",className:`h-4 w-4 shrink-0 ${n}`,strokeWidth:"1.75","aria-hidden":"true"})]}),pe&&/* @__PURE__ */x("span",{id:ue,className:"sr-only",children:V?W(V,ae):ke}),ge&&/* @__PURE__ */x("span",{id:ce,className:"sr-only",children:te.required}),ne&&y(
|
|
8
|
+
/* @__PURE__ */N("div",{ref:se,id:de,role:"dialog","aria-label":q??te.dialog,className:"fixed w-72 rounded-xl border border-gray-200 bg-white p-3 shadow-lg",style:{zIndex:s.popup,left:me?.left,right:me?.right,top:me?.top,bottom:me?.bottom,maxWidth:me?.maxWidth,visibility:me?void 0:"hidden"},children:[
|
|
9
|
+
/* @__PURE__ */x(e,{value:V||null,min:_||null,max:ee||null,weekStartsOn:S,onSelect:e=>{ie(!1),le.current?.focus(),k?.(t(e))}}),(R||Ne)&&/* @__PURE__ */N("div",{className:"mt-2 flex justify-between border-t border-gray-100 pt-2",children:[R&&/* @__PURE__ */x("button",{type:"button",onClick:()=>{ie(!1),le.current?.focus(),k?.(null)},className:"rounded-(--radius-control) px-2 py-1 text-sm text-gray-500 hover:bg-gray-100 hover:text-gray-700",children:te.clear}),Ne&&/* @__PURE__ */x("button",{type:"button",onClick:()=>{ie(!1),le.current?.focus(),k?.(/* @__PURE__ */new Date)},className:"ml-auto rounded-(--radius-control) px-2 py-1 text-sm font-medium text-blue-600 hover:bg-blue-50",children:te.today})]})]}),document.body)]})});export{B as DatePicker_default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{ImageFocusPoint as e}from"./chunk-VKKK4WLS.js";import{FormField as a}from"./chunk-6KBDNYRW.js";import{Segmented as i}from"./chunk-5LCDCO46.js";import{isVideoUrl as t,mediaPromptLine as o,mediaFileName as r,FilenameBadge as n,BusyOverlay as l,UploadGlyph as s,dropzoneClass as c,zoneFocusClass as d}from"./chunk-SSM3EN7G.js";import{TransferProgress as u}from"./chunk-SP2AUVIU.js";import{useFileIntake as m,FileIntakeAlert as h}from"./chunk-6RX4PVBU.js";import{Icon as p}from"./chunk-2UO47XB4.js";import{useShellStrings as b}from"./chunk-4PAWQEXM.js";import{useState as g,useRef as v,useEffect as f,useId as y}from"react";import{jsxs as k,jsx as j,Fragment as x}from"react/jsx-runtime";var N=["flex h-8 items-center justify-center rounded-(--radius-control) text-(--status-on-solid)","not-disabled:hover:bg-white/10 disabled:cursor-not-allowed disabled:opacity-60","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]"].join(" ");function w({value:w,onChange:L,onPick:R,onFile:U,label:C,hint:F,error:P,required:O,className:S,accept:$="image/*",maxSizeBytes:z,fit:B="cover",height:K=112,placeholder:V,cta:W,acceptHint:q,showFilename:A=!0,allowReplace:H=!0,allowRemove:I=!0,replaceLabel:X,removeLabel:D,busy:E=!1,busyLabel:M,choosingLabel:_,pickFailedLabel:G,progress:Q,disabled:Y=!1,kind:J,onKindChange:T,focus:Z,onFocusChange:ee,focusLabel:ae}){const ie=b().media,te=W??ie.cta,oe=J??(/video/.test($)&&!/image/.test($)?"video":"image"),re="string"==typeof D&&D?D:ie.remove,[ne,le]=g(!1),[se,ce]=g(!1),de=v(!0);f(()=>()=>{de.current=!1},[]);const ue=E||ne,me=ne&&!E?_??ie.choosing:M??ie.uploading,he=P??(se?G??ie.pickFailed:void 0),pe=e=>{if(!R)return;ce(!1);const a=R(e);a&&"function"==typeof a.then&&(le(!0),a.then(e=>{de.current&&(le(!1),"string"==typeof e&&e&&L(e))},()=>{de.current&&(le(!1),ce(!0))}))},be=y(),ge=v(null),[ve,fe]=g(null);f(()=>()=>{ge.current&&URL.revokeObjectURL(ge.current)},[]);const ye=Y||ue,ke=!!w&&(t(w,$)||w===ve),je=V??o($,ie),xe=X??(ke||"video"===oe?ie.changeVideo:ie.changeImage),Ne=e=>{R?pe(e):U?U(e):(e=>{ge.current&&URL.revokeObjectURL(ge.current);const a=URL.createObjectURL(e);ge.current=a,fe(e.type.startsWith("video/")?a:null),L(a)})(e)},we=m({accept:$,maxSizeBytes:z,acceptHint:q,multiple:!1,disabled:ye,onAccept:([e])=>Ne(e)}),{dragOver:Le}=we,Re=()=>{ye||(R?pe():we.open())},Ue=w?r(w):"",Ce=!ke&&!!ee,Fe=Y||!H&&!I?null:/* @__PURE__ */k("div",{"data-media-bar":"",className:["absolute inset-x-0 bottom-0 flex items-center gap-1 p-1 text-(--status-on-solid)","opacity-0 transition-opacity duration-(--motion-fast)","group-hover/media:opacity-100 group-focus-within/media:opacity-100 [@media(hover:none)]:opacity-100"].join(" "),style:{background:"var(--rosh-media-scrim-button)"},children:[H&&/* @__PURE__ */k("button",{id:Ce?void 0:be,type:"button","aria-labelledby":`${be}-change`,onClick:()=>Re(),disabled:ue,className:`min-w-0 flex-1 gap-1 px-2 text-sm font-medium ${N}`,children:[
|
|
2
|
+
/* @__PURE__ */j(p,{name:"swap","aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
|
|
3
|
+
/* @__PURE__ */j("span",{id:`${be}-change`,className:"truncate",children:xe})]}),I&&/* @__PURE__ */j("button",{type:"button","aria-label":re,onClick:()=>{ge.current&&(URL.revokeObjectURL(ge.current),ge.current=null),fe(null),L("")},disabled:ue,className:`ml-auto w-8 shrink-0 ${N}`,children:/* @__PURE__ */j(p,{name:"trash","aria-hidden":"true",className:"h-4 w-4"})})]}),Pe=/* @__PURE__ */k("div",{...we.zoneProps,"data-media-frame":"",className:["group/media relative overflow-hidden rounded-(--radius-control) border transition-colors",Ce?"":"bg-gray-100",Le?"border-blue-500":"border-line"].join(" "),style:Ce?void 0:{height:K},children:[Ce?
|
|
4
|
+
/* @__PURE__ */j(e,{value:Z??"",onChange:e=>ee?.(e),label:ae??ie.focus,image:w,hint:null,id:be,disabled:ye,className:"[&_[data-image-focus-picture]]:rounded-none [&_[data-image-focus-picture]]:border-0"}):ke?/* @__PURE__ */j("video",{src:w??void 0,muted:!0,playsInline:!0,preload:"metadata","aria-label":Ue||void 0,className:"h-full w-full",style:{objectFit:B}}):/* @__PURE__ */j("img",{src:w??void 0,alt:Ue,className:"h-full w-full",style:{objectFit:B,objectPosition:Z||void 0}}),A&&w&&/* @__PURE__ */j(n,{children:Ue}),Fe,ue&&/* @__PURE__ */j(l,{label:me,progress:Q,rounded:"rounded-md"})]}),Oe=/* @__PURE__ */j("button",{type:"button",id:be,onClick:()=>Re(),disabled:ye,"aria-label":"string"==typeof je?je:ie.upload,"aria-busy":ue||void 0,"aria-invalid":!!he||void 0,"aria-required":O||void 0,"aria-describedby":he?`${be}-error`:F?`${be}-hint`:void 0,...we.zoneProps,className:c(Le,ye,d(ye)),style:{minHeight:K},children:ue?/* @__PURE__ */j(u,{state:"busy",verb:me,pct:Q}):/* @__PURE__ */k(x,{children:[
|
|
5
|
+
/* @__PURE__ */j("span",{className:"text-ink-faintest",children:/* @__PURE__ */j(s,{})}),
|
|
6
|
+
/* @__PURE__ */j("span",{className:"px-3 text-xs text-ink-faint",children:je}),
|
|
7
|
+
/* @__PURE__ */j("span",{className:"text-sm font-medium text-blue-600",children:te}),q&&/* @__PURE__ */j("span",{className:"text-xs text-ink-faintest",children:q})]})});/* @__PURE__ */
|
|
8
|
+
return k(a,{label:C,htmlFor:be,hint:F,error:he,required:O,className:S,children:[T&&/* @__PURE__ */j("div",{"data-media-kind":"",className:"mb-2",children:/* @__PURE__ */j(i,{value:oe,onChange:e=>T(e),options:[{value:"image",label:ie.image,icon:/* @__PURE__ */j(p,{name:"image","aria-hidden":"true",className:"h-4 w-4"}),disabled:ye},{value:"video",label:ie.video,icon:/* @__PURE__ */j(p,{name:"play","aria-hidden":"true",className:"h-4 w-4"}),disabled:ye}],block:!0,size:"md",label:"string"==typeof C&&C?C:ie.upload})}),w?Pe:Oe,!R&&/* @__PURE__ */j("input",{...we.inputProps}),
|
|
9
|
+
/* @__PURE__ */j(h,{rejections:we.rejections})]})}export{w as MediaUploadField};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{GROUP_COLORS as e,BADGE_PILL as o}from"./chunk-
|
|
1
|
+
import{GROUP_COLORS as e,BADGE_PILL as o}from"./chunk-EQZZ4V5X.js";import{Icon as i}from"./chunk-2UO47XB4.js";import{OneLineLabel as r}from"./chunk-S5SRXI4V.js";import{useShellStrings as s}from"./chunk-4PAWQEXM.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";function l({colorClass:l,tone:c,children:a,size:m="sm",capitalize:p=!1,closable:u=!1,onClose:f,closeLabel:h,className:x=""}){const d=l??e[c??"neutral"],y="xs"===m?"px-2 py-0.5 text-3xs":"md"===m?"px-3 py-0.5 text-xs":"px-2 py-0.5 text-xs",b=p?"capitalize":"",g=s().badge,j=h??("string"==typeof a?g.removeItem(a):g.remove),k="xs"===m?"h-2.5 w-2.5":"h-3 w-3";/* @__PURE__ */
|
|
2
2
|
return t("span",{className:[o,"font-medium",y,b,d,x].filter(Boolean).join(" "),children:[
|
|
3
3
|
/* @__PURE__ */n(r,{children:a}),u&&/* @__PURE__ */n("button",{type:"button",onClick:f,"aria-label":j,className:"-mr-0.5 ml-1 inline-flex shrink-0 items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-strong)]",children:/* @__PURE__ */n(i,{name:"close",look:"mini",className:k,"aria-hidden":"true"})})]})}export{l as ColoredBadge};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useInsideTooltip as e,Tooltip as n}from"./chunk-
|
|
1
|
+
import{useInsideTooltip as e,Tooltip as n}from"./chunk-Q3IR5SKD.js";import{useRef as r,useState as t}from"react";import{jsx as c}from"react/jsx-runtime";var i="whitespace-nowrap";function l({children:i}){const l=e(),o=r(null),[a,s]=t(!1),m=/* @__PURE__ */c("span",{ref:o,className:"min-w-0 truncate",onMouseEnter:()=>{const e=o.current;s(!!e&&e.scrollWidth>e.clientWidth+1)},children:i});return l?m:/* @__PURE__ */c(n,{content:a?i:null,describe:!1,className:"relative inline-flex min-w-0 max-w-full",children:m})}export{l as OneLineLabel,i as TH_ONE_LINE};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import{Checkbox_default as e}from"./chunk-CGZBDI6C.js";import{Pagination as t}from"./chunk-ULAGXDOL.js";import{TH_ONE_LINE as r,OneLineLabel as o}from"./chunk-S5SRXI4V.js";import{useBrowserLayoutEffect as n}from"./chunk-D65T4H6J.js";import{SpinnerRing as l}from"./chunk-R2VKEMZH.js";import{useShellStrings as s}from"./chunk-4PAWQEXM.js";import{useState as i,useRef as a}from"react";import{jsxs as c,Fragment as d,jsx as h}from"react/jsx-runtime";function u(e){const t={};if(!e)return t;for(const[r,o]of Object.entries(e))!r.startsWith("data-")||"string"!=typeof o&&"number"!=typeof o&&"boolean"!=typeof o||(t[r]=o);return t}var m=e=>Array.isArray(e.columns),f=e=>"wide"===e.only?"rosh-dt-only-wide":"stacked"===e.only?"rosh-dt-only-stacked":"",g="rosh-dt-row-link rosh-focus-ring underline-offset-4 hover:underline",p={sm:"px-2 py-2",md:"px-3 py-2"},y={left:"text-left",right:"text-right",center:"text-center"};function b({direction:e}){/* @__PURE__ */
|
|
2
|
+
return c("span",{className:"ml-1 inline-flex flex-col leading-none","aria-hidden":"true",children:[
|
|
3
|
+
/* @__PURE__ */h("svg",{className:"h-2 w-2 "+("asc"===e?"text-gray-700":"text-gray-300"),viewBox:"0 0 8 5",fill:"currentColor",children:/* @__PURE__ */h("path",{d:"M4 0L8 5H0z"})}),
|
|
4
|
+
/* @__PURE__ */h("svg",{className:"h-2 w-2 "+("desc"===e?"text-gray-700":"text-gray-300"),viewBox:"0 0 8 5",fill:"currentColor",children:/* @__PURE__ */h("path",{d:"M4 5L0 0h8z"})})]})}function w(e,t=!1){const r=t?"":" whitespace-nowrap";return e.code?`font-mono${r}`:e.numeric?`tabular-nums${r}`:""}function x({columns:x,data:v,rowKey:k,sort:N=null,onSortChange:C,pagination:j,caption:M,loading:S=!1,bordered:B=!1,size:$="md",minWidth:z,rowClassName:H,onRow:I,rowHref:T,onRowPress:A,linkAs:L,emptyText:D,selection:E,footer:O,virtualized:P,stackOnNarrow:R=!1,stackBelow:F,className:W=""}){const K=s(),X=D??K.table.empty,G=(e,t)=>"function"==typeof k?k(e,t):String(e[k]),V=R&&!P,Z=V?x:x.flatMap(e=>{if(!m(e))return"stacked"===e.only?[]:[e];const t=e.columns.filter(e=>"stacked"!==e.only);return t.length?[{...e,columns:t}]:[]}),J=e=>V?{role:e}:{},Q=(e,t)=>(t??("string"==typeof e||"number"==typeof e?String(e):"")).trim()||void 0,[U,q]=i(0),Y=P?.overscan??6,_=P?e=>{const t=Math.max(0,Math.floor(e.currentTarget.scrollTop/P.rowHeight)-Y);q(e=>e===t?e:t)}:void 0,ee=P?Math.ceil(P.height/P.rowHeight)+2*Y:v.length,te=P?Math.min(U,Math.max(0,v.length-ee)):0,re=Math.min(v.length,te+ee),oe=P?te*P.rowHeight:0,ne=P?(v.length-re)*P.rowHeight:0,le=a(null),[se,ie]=i(0);n(()=>{if(!P)return;const e=le.current?.offsetHeight??0;ie(t=>t===e?t:e)});const ae=e=>e.sortField??e.key,ce=e=>N&&N.field===ae(e)?N.direction:null,de=Z.flatMap(e=>m(e)?e.columns:[e]),he=Z.some(m),ue=/* @__PURE__ */new Map;if(V)for(const e of Z)if(m(e))for(const t of e.columns)ue.set(t,Q(e.title,e.label));const me=e=>{const t=Q(e.title,e.label),r=ue.get(e);return t&&r?`${r} · ${t}`:t},fe=new Set(E?.selected??[]),ge=E?v.map((e,t)=>G(e,t)):[],pe=ge.length>0&&ge.every(e=>fe.has(e)),ye=ge.some(e=>fe.has(e)),be=E?36:0,we=de.length+(E?1:0),xe=de.some(e=>"left"===e.fixed),ve=V&&!E&&de.some(e=>e.cardCorner),ke=L??"a",Ne=`${p[$]} ${"sm"===$?"text-xs":"text-sm"}`,Ce=(e,t)=>e.ellipsis?/* @__PURE__ */h("span",{className:"block w-0 min-w-full",children:t}):t,je=(e,t,n,l=0)=>{const s=ce(e),i=y[e.align??(e.numeric?"right":"left")],a="left"===e.fixed,d=!(!e.sortable||!C);/* @__PURE__ */
|
|
5
|
+
return h("th",{scope:"col",...J("columnheader"),rowSpan:n>1?n:void 0,"aria-sort":"asc"===s?"ascending":"desc"===s?"descending":d?"none":void 0,style:{width:e.width,...a?{left:(Se[t]??0)+be}:{},...P?{top:l}:{}},className:[Ne,i,r,"font-semibold uppercase tracking-wide text-gray-500","sm"===$?"text-2xs":"text-xs",a?P?"sticky z-20 bg-gray-50":"sticky z-10 bg-gray-50":P?"sticky z-10 bg-gray-50":"",V&&d?"rosh-dt-sort":"",V?f(e):"",e.headerClassName??""].filter(Boolean).join(" "),children:Ce(e,d?/* @__PURE__ */c("button",{type:"button",onClick:()=>(e=>{if(!C)return;const t=ae(e),r=ce(e),o=e.sortFirst??"asc";C(null===r?{field:t,direction:o}:r===o?{field:t,direction:"asc"===o?"desc":"asc"}:null)})(e),"data-group":V?ue.get(e):void 0,className:`inline-flex max-w-full items-center font-semibold uppercase tracking-wide hover:text-ink ${i}`,children:[
|
|
6
|
+
/* @__PURE__ */h(o,{children:e.title}),
|
|
7
|
+
/* @__PURE__ */h(b,{direction:s})]}):/* @__PURE__ */h(o,{children:e.title}))},e.key)};let Me=0;const Se=de.map(e=>{if("left"!==e.fixed)return null;const t=Me;return Me+=e.width??0,t}),Be=/* @__PURE__ */c(d,{children:[
|
|
8
|
+
/* @__PURE__ */c("div",{onScroll:_,style:P?{maxHeight:P.height}:void 0,className:`relative overflow-x-auto ${P?"overflow-y-auto":""} ${B?"rounded-lg border border-gray-200":""}${V?" rosh-dt-scroll":""}`.trim(),children:[S&&
|
|
9
|
+
/* @__PURE__ */c("div",{className:"absolute inset-0 z-20 flex items-start justify-center bg-white/60 pt-8",role:"status","aria-live":"polite",children:[
|
|
10
|
+
/* @__PURE__ */h(l,{className:"h-6 w-6"}),
|
|
11
|
+
/* @__PURE__ */h("span",{className:"sr-only",children:K.table.loading})]}),
|
|
12
|
+
/* @__PURE__ */c("table",{...J("table"),className:(V?"rosh-dt-table ":"")+"w-full border-collapse tabular-nums",style:z?{minWidth:z}:void 0,children:[M&&/* @__PURE__ */h("caption",{className:"sr-only",children:M}),
|
|
13
|
+
/* @__PURE__ */c("thead",{...J("rowgroup"),className:V?"rosh-dt-head":void 0,children:[
|
|
14
|
+
/* @__PURE__ */c("tr",{ref:le,...J("row"),className:"border-b border-gray-200 bg-gray-50",children:[E&&/* @__PURE__ */h("th",{scope:"col",...J("columnheader"),rowSpan:he?2:void 0,style:{width:36,...P?{top:0}:{}},className:[Ne,r,xe||P?"sticky z-20 bg-gray-50":"",xe?"left-0":"",V?"rosh-dt-select":""].filter(Boolean).join(" "),children:/* @__PURE__ */h(e,{"aria-label":K.table.selectAll,checked:pe,indeterminate:ye&&!pe,onChange:()=>{if(!E)return;const e=new Set(ge);E.onChange(pe?E.selected.filter(t=>!e.has(t)):[...E.selected,...ge.filter(e=>!fe.has(e))])}})}),Z.map((e,t)=>m(e)?/* @__PURE__ */h("th",{scope:"colgroup",...J("columnheader"),colSpan:e.columns.length,style:P?{top:0}:void 0,className:[Ne,"text-center",r,"font-semibold uppercase tracking-wide text-gray-500","sm"===$?"text-2xs":"text-xs","border-b border-gray-200",P?"sticky z-10 bg-gray-50":"",e.headerClassName??""].filter(Boolean).join(" "),children:/* @__PURE__ */h(o,{children:e.title})},e.key??`group-${t}`):je(e,de.indexOf(e),he?2:1))]}),he&&/* @__PURE__ */h("tr",{...J("row"),className:"border-b border-gray-200 bg-gray-50",children:Z.flatMap(e=>m(e)?e.columns:[]).map(e=>je(e,de.indexOf(e),1,se))})]}),
|
|
15
|
+
/* @__PURE__ */h("tbody",{...J("rowgroup"),className:V?"rosh-dt-body":void 0,children:0!==v.length||S?/* @__PURE__ */c(d,{children:[oe>0&&/* @__PURE__ */h("tr",{"aria-hidden":"true",children:/* @__PURE__ */h("td",{colSpan:we,style:{height:oe,padding:0,border:0}})}),v.slice(te,re).map((t,r)=>{const o=te+r,n=I?.(t,o),l=!!n?.current,s=T?.(t,o),i=void 0===s&&A?()=>A(t,o):void 0,a=void 0!==s||void 0!==i;let d=!1;const m=(e,t)=>{if(d=!0,!a)return e;const r=[g,i?"cursor-pointer text-left":"",t?.className??""].filter(Boolean).join(" "),o=l?"true":void 0;return void 0!==s?/* @__PURE__ */h(ke,{href:s,className:r,"aria-current":o,children:e}):/* @__PURE__ */h("button",{type:"button",onClick:i,className:r,"aria-current":o,children:e})},p=de.map(e=>e.render?e.render(t,o,m):e.dataIndex?t[e.dataIndex]:null);if(a&&!d){const e=de.findIndex(e=>"stacked"!==e.only&&!e.cardCorner),t=de.findIndex(e=>"wide"!==e.only&&!e.cardCorner);for(const r of/* @__PURE__ */new Set([e,t]))r>=0&&(p[r]=m(p[r]))}const b=e=>e?t=>{t.currentTarget.contains(t.relatedTarget)||e()}:void 0;/* @__PURE__ */
|
|
16
|
+
return c("tr",{...u(n),...J("row"),style:P?{height:P.rowHeight}:void 0,onClick:n?.onClick,onMouseEnter:n?.onMouseEnter,onMouseLeave:n?.onMouseLeave,onFocus:b(n?.onFocus),onBlur:b(n?.onBlur),"aria-current":l&&!a?"true":void 0,...n?.onClick?{tabIndex:0,onKeyDown:e=>{e.target===e.currentTarget&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),n.onClick?.()))}}:{},className:[V?E?"rosh-dt-row rosh-dt-row-select":"rosh-dt-row":"",V&&ve?"rosh-dt-row-corner":"","border-b border-gray-100 last:border-b-0",n?.onClick?"cursor-pointer hover:bg-gray-50 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"",a?"rosh-dt-linked hover:bg-gray-50":"",l?"rosh-dt-current":"",H?.(t,o)??"",n?.className??""].filter(Boolean).join(" "),children:[E&&(()=>{const r=G(t,o);/* @__PURE__ */
|
|
17
|
+
return h("td",{...J("cell"),style:{width:36},onClick:e=>e.stopPropagation(),className:[Ne,xe?"sticky left-0 z-10 bg-white":"",V?"rosh-dt-select":""].filter(Boolean).join(" "),children:/* @__PURE__ */h(e,{"aria-label":K.table.selectRow,checked:fe.has(r),onChange:()=>(e=>{E&&E.onChange(fe.has(e)?E.selected.filter(t=>t!==e):[...E.selected,e])})(r)})})})(),de.map((e,t)=>{const r="left"===e.fixed,o=p[t],n=ve&&!!e.cardCorner,l=V&&!n&&"wide"!==e.only;/* @__PURE__ */
|
|
18
|
+
return h("td",{...J("cell"),"data-label":l?me(e):void 0,style:r?{left:(Se[t]??0)+be}:void 0,className:[l?e.ellipsis?"rosh-dt-cell rosh-dt-clip":"rosh-dt-cell":"",n?"rosh-dt-corner":"",V?f(e):"",Ne,y[e.align??(e.numeric?"right":"left")],V?"":w(e),"text-ink-strongest",e.ellipsis?"max-w-0 truncate":"",r?"sticky z-10 bg-white":"",e.className??""].filter(Boolean).join(" "),children:V?
|
|
19
|
+
/* @__PURE__ */h("span",{className:["rosh-dt-value",w(e,!0)].filter(Boolean).join(" "),children:o}):o},e.key)})]},G(t,o))}),ne>0&&/* @__PURE__ */h("tr",{"aria-hidden":"true",children:/* @__PURE__ */h("td",{colSpan:we,style:{height:ne,padding:0,border:0}})})]}):/* @__PURE__ */h("tr",{...J("row"),className:V?"rosh-dt-empty":void 0,children:/* @__PURE__ */h("td",{...J("cell"),colSpan:we,className:`${Ne} py-10 text-center text-gray-500`,children:X})})})]}),O]}),j&&j.pageCount>1&&/* @__PURE__ */h("div",{className:V?"rosh-dt-pager mt-3 flex justify-end":"mt-3 flex justify-end",children:/* @__PURE__ */h(t,{page:j.page,pageCount:j.pageCount,onPageChange:j.onPageChange})})]});/* @__PURE__ */
|
|
20
|
+
return h("div",V?void 0!==F&&F>0&&40!==F?{className:`rosh-dt-at ${W}`.trim(),children:/* @__PURE__ */h("div",{className:"rosh-dt-stack",style:{width:40/F*100+"%"},children:/* @__PURE__ */h("div",{className:"rosh-dt-fit",style:{width:F/40*100+"%"},children:Be})})}:{className:`rosh-dt-stack ${W}`.trim(),children:Be}:{className:W,children:Be})}export{x as DataTable};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r="10.15.0",a=r;export{a as APP_VERSION,r as VERSION};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{resolveColumnShares as e,COLUMN_SHARES_EQUAL as t,COLUMN_SHARE_MIN as r,COLUMN_COUNT_MAX as n}from"./chunk-PLGJOHEG.js";import{InputNumber_default as o}from"./chunk-LVBO2OMQ.js";import{Tooltip as i}from"./chunk-Q3IR5SKD.js";import{useShellStrings as l}from"./chunk-4PAWQEXM.js";import{useId as a,useRef as s,useState as c,useEffect as u,Fragment as d}from"react";import{jsxs as h,jsx as f}from"react/jsx-runtime";var m=(e,t,r)=>Math.min(r,Math.max(t,e)),p=e=>e.reduce((e,t)=>e+t,0),v=(e,t)=>e.length===t.length&&e.every((e,r)=>e===t[r]);var g,b="w-0.5",y=`${b} group-hover/widths:w-1 group-focus-visible/widths:w-1`;var w=["text-blue-700","text-gray-600"];function x({count:x,value:$,onChange:k,label:C,"aria-labelledby":N,readOnly:P=!1,disabled:M=!1,className:R=""}){const j=l().widths,z=a(),A=m(Math.round(x)||1,1,n),B=e($,A),O=B??[...t[A]??[]],S=[...O,100-p(O)],D=P||M,K=s(null),E=s({onChange:k,shown:O,locked:D,n:A,stored:B});E.current={onChange:k,shown:O,locked:D,n:A,stored:B};const T=t=>{const{onChange:r,shown:n,locked:o,n:i}=E.current;if(o)return!1;const l=e(t,i);return!(!l||v(l,n))&&(r(l),!0)},I=(e,t,n)=>{const o=e[t]+e[t+1],i=[...e];i[t]=m(Math.round(n),r,o-r),i[t+1]=o-i[t],T(i.slice(0,-1))&&(ne.current=null)},L=e=>t=>{if(t.altKey||t.ctrlKey||t.metaKey)return;const n=t.shiftKey?10:1,o=S[e]+S[e+1],i="ArrowRight"===t.key?S[e]+n:"ArrowLeft"===t.key?S[e]-n:"PageUp"===t.key?S[e]+10:"PageDown"===t.key?S[e]-10:"Home"===t.key?r:"End"===t.key?o-r:null;null!==i&&(t.preventDefault(),I(S,e,i))},H=s(null),[Q,W]=c(null),X=()=>{H.current=null,W(null),document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")};u(()=>X,[]);const F=e=>t=>{if(0!==t.button||D)return;t.preventDefault();const r=K.current?.getBoundingClientRect().width??0;r<=0||(H.current={i:e,x:t.clientX,width:r,from:S,moved:!1,pointer:t.pointerId},W(e),t.currentTarget.setPointerCapture?.(t.pointerId),document.body.style.cursor="col-resize",document.body.style.userSelect="none")},G=e=>{const t=H.current;if(!t)return;if(0===e.buttons)return void X();const r=e.clientX-t.x;if(!t.moved){if(Math.abs(r)<3)return;t.moved=!0}I(t.from,t.i,t.from[t.i]+r/t.width*100)},U=e=>{const t=H.current;t&&(e.currentTarget.hasPointerCapture?.(t.pointer)&&e.currentTarget.releasePointerCapture(t.pointer),X())},V=(e,t)=>{const{shown:n}=E.current,o=function(e,t,n){const o=e.length,i=[...e];if(o<2)return i;const l=m(Math.round(n),r,100-(o-1)*r);let a=l-i[t];i[t]=l;const s=[...Array.from({length:o-1-t},(e,r)=>t+1+r),...Array.from({length:t},(e,r)=>t-1-r)];if(a<0)return i[s[0]]-=a,i;for(const e of s){if(a<=0)break;const t=Math.min(a,i[e]-r);i[e]-=t,a-=t}return i}([...n,100-p(n)],e,t);return T(o.slice(0,-1))?o:null},[q,J]=c(0);u(()=>{const e=K.current;if(!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>J(e.getBoundingClientRect().width));return t.observe(e),()=>t.disconnect()},[]);const Y=s(null),[Z,_]=c(null),[ee,te]=c([]),re=(e,t)=>_(r=>t?e:r===e?null:r),ne=s(null),oe=(e,t)=>{const r=ne.current;if(!r||r.column!==e||r.share!==t)return!1;const{onChange:n,locked:o,stored:i}=E.current;var l,a;return o||(l=i,a=r.stored,void 0===l||void 0===a?l===a:v(l,a))||n(r.stored),!0},ie=S.join(",");u(()=>{const e=null===Z?[]:function(e,t){if(!e)return[];const r=Array.from(e.querySelectorAll("input[data-widths-label]")),n=r[t]?.getBoundingClientRect();if(!n||0===n.width)return[];if(void 0===g&&(g=document.createElement("canvas").getContext("2d")),!g)return[];const o=g;return r.flatMap((e,r)=>{if(r===t)return[];const i=e.getBoundingClientRect(),l=getComputedStyle(e);o.font=`${l.fontWeight} ${l.fontSize} ${l.fontFamily}`;const a=o.measureText(e.value).width/2,s=(i.left+i.right)/2;return s+a>n.left&&s-a<n.right?[r]:[]})}(Y.current,Z);te(t=>v(t,e)?t:e)},[Z,ie,q]);const le=j.hint(A,r),ae=S.slice(0,-1).map((e,t)=>p(S.slice(0,t+1)));/* @__PURE__ */
|
|
2
|
+
return h("div",{role:"group","aria-label":N?void 0:C,"aria-labelledby":N,"aria-describedby":A>1?z:void 0,className:`flex w-full min-w-0 flex-col gap-2 ${M?"opacity-60":""} ${R}`.trim(),children:[
|
|
3
|
+
/* @__PURE__ */h("div",{ref:Y,"data-widths-bar":"",className:"relative h-8",children:[
|
|
4
|
+
/* @__PURE__ */f("div",{ref:K,"data-widths-track":"",className:"flex h-full w-full overflow-hidden rounded-(--radius-control) bg-surface",children:S.map((e,t)=>/* @__PURE__ */f("div",{"data-widths-segment":"",style:{flexBasis:`${e}%`},className:`flex min-w-0 shrink-0 grow-0 items-center justify-center overflow-hidden whitespace-nowrap text-xs font-medium tabular-nums ${w[t%2]} ${t%2==0?"bg-accent-tint":""}`,children:1===A&&/* @__PURE__ */f("span",{"data-widths-label":"",children:`${e}%`})},t))}),
|
|
5
|
+
/* @__PURE__ */f("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 rounded-(--radius-control) border border-line-strong"}),A>1&&S.map((e,t)=>/* @__PURE__ */h(d,{children:[(()=>{const n=Z===t,l=p(S.slice(0,t)),a=n?`max(${e}%, 40px)`:`${e}%`;/* @__PURE__ */
|
|
6
|
+
return f("div",{"data-widths-tip":"",className:"absolute inset-y-0 "+(n?"z-20":""),style:{left:`clamp(0px, calc(${l+e/2}% - ${a} / 2), calc(100% - ${a}))`,width:a},children:/* @__PURE__ */f(i,{content:le,delay:600,describe:!1,className:"absolute inset-0",children:/* @__PURE__ */f(o,{appearance:"bare",value:e,display:()=>(e=>q>0&&q*e/100<36?String(e):`${e}%`)(e),suffix:"%",min:r,max:100-(A-1)*r,step:1,shiftStep:10,precision:0,allowEmpty:!1,reportWhileTyping:!1,readOnly:P,disabled:M,"aria-label":j.column(t+1),"aria-describedby":z,"data-widths-label":"",onChange:e=>{null===e||oe(t,e)||V(t,e)},onRevert:e=>((e,t)=>{E.current.locked||null===t||oe(e,t)||V(e,t)})(t,e),onFocus:()=>{ne.current={column:t,share:e,stored:E.current.stored},re(t,!0)},onBlur:()=>re(t,!1),className:`absolute inset-0 text-xs font-medium ${w[t%2]} ${ee.includes(t)&&!n?"opacity-0":""}`})})})})(),t<A-1&&/* @__PURE__ */f("div",{className:"absolute inset-y-0 z-10 w-3 -translate-x-1/2",style:{left:`${ae[t]}%`},children:/* @__PURE__ */f(i,{content:j.dragHint,delay:600,className:"relative flex h-full w-full",children:/* @__PURE__ */f("div",{role:"separator",tabIndex:M?-1:0,"aria-orientation":"vertical","aria-label":j.divider(t+1,t+2),"aria-valuenow":S[t],"aria-valuemin":r,"aria-valuemax":S[t]+S[t+1]-r,"aria-valuetext":j.dividerValue(t+1,S[t],t+2,S[t+1]),"aria-disabled":D||void 0,onKeyDown:D?void 0:L(t),onPointerDown:F(t),onPointerMove:G,onPointerUp:U,onPointerCancel:U,onLostPointerCapture:()=>{H.current&&X()},className:"group/widths flex h-full w-full touch-none justify-center rounded-(--radius-control) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(D?"cursor-default":"cursor-col-resize"),children:/* @__PURE__ */f("span",{"aria-hidden":"true","data-widths-line":"",className:"h-full rounded-full "+(D?`${b} bg-gray-300`:`bg-accent-fill transition-[width,background-color] duration-(--motion-fast) group-hover/widths:bg-blue-700 ${Q===t?"w-1":y}`)})})})})]},t))]}),A>1&&/* @__PURE__ */f("span",{id:z,className:"sr-only",children:le})]})}export{x as WidthsBar};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{GROUP_COLORS as e}from"./chunk-
|
|
2
|
-
return t(
|
|
1
|
+
import{GROUP_COLORS as e}from"./chunk-EQZZ4V5X.js";import{Tooltip as r}from"./chunk-Q3IR5SKD.js";import{SpinnerRing as n}from"./chunk-R2VKEMZH.js";import{useShellStrings as l}from"./chunk-4PAWQEXM.js";import{jsx as t,jsxs as i,Fragment as a}from"react/jsx-runtime";var s="inline-flex items-center gap-1 whitespace-nowrap rounded-md border border-current/20 py-0.5 pl-2 pr-1 text-2xs font-medium";function o({label:e,glyph:n,onClick:l}){/* @__PURE__ */
|
|
2
|
+
return t(r,{content:e,describe:!1,children:/* @__PURE__ */t("button",{type:"button",onClick:l,"aria-label":e,className:"flex h-4 w-4 items-center justify-center rounded-full leading-none hover:bg-current/10 rosh-focus-ring focus-visible:ring-2",children:/* @__PURE__ */t("span",{"aria-hidden":"true",children:n})})})}function c({state:r,label:c,verb:u,subject:m,pct:p,onCancel:d,onRetry:h,onDismiss:f,className:b=""}){const g=l().transfer;if("idle"===r)return null==c?null:/* @__PURE__ */t("span",{className:`${s} ${e.neutral} pr-2 ${b}`.trim(),children:c});if("error"===r)/* @__PURE__ */
|
|
3
3
|
return i("span",{role:"status",className:`${s} ${e.danger} ${b}`.trim(),children:[
|
|
4
4
|
/* @__PURE__ */t("span",{children:g.error}),h&&/* @__PURE__ */t(o,{label:g.retry,glyph:"↻",onClick:h}),f&&/* @__PURE__ */t(o,{label:g.dismiss,glyph:"×",onClick:f})]});const y=u??g.uploading,$=null==p||Number.isNaN(p)?null:Math.max(0,Math.min(100,Math.round(p))),k="string"==typeof y?g.cancelVerb(y.toLowerCase()):g.cancel,N=e=>[e,m,null==$?"":`${$}%`].filter(Boolean).join(" ");/* @__PURE__ */
|
|
5
|
-
return i("span",{role:"status","aria-live":"polite",className:`${s} ${e.info} ${b}`.trim(),children:[null==$&&/* @__PURE__ */t(
|
|
5
|
+
return i("span",{role:"status","aria-live":"polite",className:`${s} ${e.info} ${b}`.trim(),children:[null==$&&/* @__PURE__ */t(n,{ink:""}),
|
|
6
6
|
/* @__PURE__ */t("span",{className:"tabular-nums",children:"string"==typeof y?N(y):/* @__PURE__ */i(a,{children:[y,N("")&&` ${N("")}`]})}),d&&/* @__PURE__ */t(o,{label:k,glyph:"×",onClick:d})]})}export{c as TransferProgress};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Tooltip as e}from"./chunk-
|
|
1
|
+
import{Tooltip as e}from"./chunk-Q3IR5SKD.js";import{jsxs as r,Fragment as n,jsx as i}from"react/jsx-runtime";var l=e=>!0===e||"true"===e;function o(e){e.preventDefault(),e.stopPropagation()}var t=(e,r)=>[e,r].filter(Boolean).join(" ")||void 0;function a({reason:l,id:o,block:t=!1,children:a}){/* @__PURE__ */
|
|
2
2
|
return r(n,{children:[
|
|
3
3
|
/* @__PURE__ */i(e,{content:l,describe:!1,className:t?"relative flex w-full":"relative inline-flex",children:a}),
|
|
4
4
|
/* @__PURE__ */i("span",{id:o,className:"sr-only",children:l})]})}export{a as OffWithReason,t as describedByWith,l as isAriaDisabled,o as swallowPress};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{TransferProgress as e}from"./chunk-
|
|
1
|
+
import{TransferProgress as e}from"./chunk-SP2AUVIU.js";import{Icon as r}from"./chunk-2UO47XB4.js";import{DEFAULT_SHELL_STRINGS as t}from"./chunk-4PAWQEXM.js";import{jsx as o}from"react/jsx-runtime";var n=/^data:([a-z0-9!#$&^_.+-]+)\/([a-z0-9!#$&^_.+-]+)/i;function i(e){if(/^data:/i.test(e||""))return function(e){const r=n.exec(e);if(!r)return"media";const[,t,o]=r,i=o.split("+")[0].split(".").pop().replace(/^x-/i,"");return i?`${t.toLowerCase()}.${i.toLowerCase()}`:"media"}(e);const r=(e||"").split("?")[0].split("#")[0],t=r.substring(r.lastIndexOf("/")+1);try{return decodeURIComponent(t.replace(/^[0-9a-f]{32}_/i,""))||t||"media"}catch{return t||"media"}}var s=/\.(mp4|webm|ogg|ogv|mov|m4v)(\?|#|$)/i;function a(e,r=t.media){const o=function(e){const r=e.includes("video"),t=e.includes("image")||"*"===e||""===e;return r&&!t?"video":t&&!r?"image":"file"}(e);return"image"===o?r.uploadImage:"video"===o?r.uploadVideo:r.uploadFile}function c(e,r,t="",o="p-4"){return["flex w-full flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed text-center transition-colors",o,r?"cursor-not-allowed opacity-60":"cursor-pointer",e?"border-blue-500 bg-blue-50":"border-gray-300 bg-gray-50 hover:bg-gray-100",t].filter(Boolean).join(" ")}function u(e){return e?"rosh-focus-ring":"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-zone)]"}function d({label:r,progress:t,rounded:n="rounded-lg"}){/* @__PURE__ */
|
|
2
2
|
return o("div",{className:`absolute inset-0 flex items-center justify-center bg-white/60 ${n}`,children:/* @__PURE__ */o(e,{state:"busy",verb:r,pct:t})})}function l({children:e}){/* @__PURE__ */
|
|
3
3
|
return o("span",{className:"absolute inset-x-1 bottom-1 truncate rounded px-2 py-0.5 text-xs text-on-accent",style:{background:"var(--rosh-media-scrim)"},children:e})}function m(e,r=""){if(!e)return!1;const t=n.exec(e);if(t)return"video"===t[1].toLowerCase();const o=r.includes("video"),i=r.includes("image")||"*"===r||""===r;return s.test(e)||o&&!i}function f({className:e="h-4 w-4"}){/* @__PURE__ */
|
|
4
4
|
return o(r,{name:"close",className:e,strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})}function p({className:e="h-6 w-6"}){/* @__PURE__ */
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import{stepPath as t,curvePath as e,areaBetween as a,areaFrom as r}from"./chunk-VFC6QUEN.js";import{ChartDefs as o,MOTION as l,stagger as n,fillFor as i,dashFor as s,maskId as c}from"./chunk-465RRWBY.js";import{ChartSkeleton as d}from"./chunk-M22B3Y5Y.js";import{useHighlight as m,highlightOpacity as h}from"./chunk-CNYAHYE6.js";import{ChartTooltip as u}from"./chunk-WZ5QSSUM.js";import{useDragZoom as f,DragBand as p,ChartZoomSummary as g,tooltipBesideBand as y}from"./chunk-QP4UPCXQ.js";import{pairedAxes as k,niceAxis as x,niceMax as v,linearScale as b,axisGutter as M,bandScale as N,ladderScale as w}from"./chunk-2JWPNR2U.js";import{usePlotWidth as j}from"./chunk-MAFUXCPZ.js";import{ChartBrush as $}from"./chunk-INNIWRVU.js";import{ChartDot as V}from"./chunk-CK2YOGUS.js";import{resolveSeriesColor as W,CHART_INK as z,STATUS_VARS as A}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as S}from"./chunk-TWVUQUUD.js";import{useShellStrings as R,useShellLocale as C}from"./chunk-4PAWQEXM.js";import{formatPercent as E,formatPlain as L}from"./chunk-C3QOHMR6.js";import{useRef as U,useState as D,useId as P,useEffect as I}from"react";import{jsx as T,jsxs as Q}from"react/jsx-runtime";var Y=12,B=16,F=26,O=52,X=t=>"number"==typeof t&&Number.isFinite(t);function Z({series:Z,labels:H,height:K=200,stacked:G=!1,stackMode:J="value",levels:q,curve:_="linear",tension:tt=0,max:et,yTickCount:at=4,formatValue:rt,formatTooltipValue:ot,tooltipLabels:lt,yAxisLabel:nt,referenceLines:it,labelEndpoints:st=!1,dots:ct,dotVariant:dt="border",pulse:mt=!1,brush:ht=!1,range:ut,onRangeChange:ft,zoomable:pt=!0,columnStrip:gt,onSelect:yt,loading:kt=!1,animate:xt=!0,reveal:vt="left-to-right",fillVariant:bt="gradient",gridStyle:Mt="solid",width:Nt,className:wt,emptyLabel:jt}){const $t=R().charts,Vt=C(),Wt=rt??(t=>L(t,Vt)),zt=ot??Wt,At=jt??$t.noData,St=U(null),Rt=j(St),Ct=Nt??Rt,[Et,Lt]=D(null),[Ut,Dt]=D(null),{highlighted:Pt}=m(),It=P(),Tt=ut??Ut,Qt=f(ht&&Tt?Tt[1]-Tt[0]+1:H.length,pt);if(I(()=>{if(null!==Et)return S(t=>"Escape"===t.key&&(Lt(null),!0))},[Et]),kt)/* @__PURE__ */
|
|
2
|
+
return T("div",{className:wt,ref:St,children:/* @__PURE__ */T(d,{height:K,width:Nt??Rt})});const Yt=H,Bt=ut??Ut??[0,Math.max(0,Yt.length-1)],[Ft,Ot]=Bt,Xt=t=>Qt.slice(ht?t.slice(Ft,Ot+1):t),Zt=lt?Xt(lt):void 0,Ht=Z.map((t,e)=>({...t,slot:e})).filter(t=>t.data.some(X)).map(t=>({...t,data:Xt(t.data),pointTones:t.pointTones?Xt(t.pointTones):void 0})),Kt=t=>(ht?Ft:0)+(Qt.view?.[0]??0)+t;if(H=Xt(Yt),0===Ht.length||0===H.length)/* @__PURE__ */
|
|
3
|
+
return T("div",{className:wt,ref:St,children:/* @__PURE__ */T("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:K},children:At})});const Gt=H.map((t,e)=>Ht.reduce((t,a)=>t+(X(a.data[e])?a.data[e]:0),0)),Jt=(t,e)=>Gt[e]>0?t/Gt[e]:null,qt=[];if(G){let t=H.map(()=>0);for(const e of Ht)t=t.map((t,a)=>t+(X(e.data[a])?e.data[a]:0)),qt.push("percent"===J?t.map((t,e)=>Jt(t,e)):[...t])}const _t=!!q&&q.length>0,te=t=>"right"===t.axis,ee=!G&&!_t&&void 0===et&&Ht.some(te)&&Ht.some(t=>!te(t)),ae=gt&&!G?gt:null,re=t=>!!ae&&"column"===t.mode,oe=(ee?Ht.filter(t=>!te(t)):Ht).filter(t=>!re(t)),le=ee?Ht.filter(te).flatMap(t=>t.data.filter(X)):[],ne=G?(qt.at(-1)??[]).filter(X):oe.flatMap(t=>t.data.filter(X)),ie=ee?k([Math.min(0,...ne),Math.max(0,...ne)],[Math.min(0,...le),Math.max(0,...le)],{intervals:at+1,integerLeft:ne.every(Number.isInteger),integerRight:le.every(Number.isInteger)}):null,se=ie?ie.left:G&&"percent"===J||_t||void 0!==et?null:x(G?0:Math.min(0,...ne),Math.max(0,...ne),{intervals:at+1,integer:ne.every(Number.isInteger)}),ce=se?se.lo:0,de=G&&"percent"===J?1:se?se.hi:et??v(Math.max(...ne,0)),me=G&&"percent"===J?t=>E(Math.round(100*t),0,Vt):Wt,he=_t?q:se?se.ticks:b([ce,de],{from:0,to:1}).ticks(at+1),ue=M(he.map(me),O),fe=ie?M(ie.right.ticks.map(Wt),B):B,pe={left:ue,right:Math.max(ue+1,Ct-fe),top:Y,bottom:K-F},ge=N(H.length,{from:pe.left,to:pe.right}),ye=_t?w(q,{from:pe.bottom,to:pe.top}):null,ke=b([ce,de],{from:pe.bottom,to:pe.top}),xe=ke(Math.max(ce,0)),ve=t=>ye?ye(t):ke(t),be=Ht.filter(re),Me=Math.max(0,...H.map((t,e)=>be.reduce((t,a)=>t+Math.max(0,X(a.data[e])?a.data[e]:0),0))),Ne=t=>xe-(Me>0?t/Me:0)*(pe.bottom-pe.top)*(ae??0),we=ie?b([ie.right.lo,ie.right.hi],{from:pe.bottom,to:pe.top}):null,je=t=>we&&te(t)?we:ve,$e=ye?ye.levels.map(t=>({value:t,y:ye(t)})):he.map(t=>({value:t,y:ke(t)})),Ve=t=>e=>{e.preventDefault(),Lt(e=>{const a=(e??0)+t;return Math.min(H.length-1,Math.max(0,a))})},We=Math.max(1,Math.ceil(H.length/Math.max(1,Math.floor(Ct/96))));/* @__PURE__ */
|
|
4
|
+
return Q("div",{className:`relative ${wt??""}`,ref:St,children:[
|
|
5
|
+
/* @__PURE__ */Q("svg",{width:"100%",height:K,viewBox:`0 0 ${Ct} ${K}`,role:"img","aria-label":$t.overIntervals(Ht.map(t=>t.label),H.length),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>Lt(null),onBlur:()=>Lt(null),style:pt?{userSelect:"none",touchAction:"pan-y"}:void 0,onKeyDown:t=>{if(yt&&null!==Et&&("Enter"===t.key||" "===t.key))return t.preventDefault(),void yt(Kt(Et));"ArrowRight"===t.key&&Ve(1)(t),"ArrowLeft"===t.key&&Ve(-1)(t)},children:[
|
|
6
|
+
/* @__PURE__ */T("defs",{children:/* @__PURE__ */T("clipPath",{id:It,children:/* @__PURE__ */T("rect",{x:pe.left,y:pe.top,width:pe.right-pe.left,height:pe.bottom-pe.top})})}),
|
|
7
|
+
/* @__PURE__ */T(o,{id:It,fills:Ht.map((t,e)=>({color:W(t.slot,t.color,t.tone),variant:t.fillVariant??bt})),fadeFrom:G?.42:.3,reveal:!!xt&&vt}),$e.map(t=>/* @__PURE__ */T("line",{x1:pe.left,y1:t.y,x2:pe.right,y2:t.y,stroke:z.grid,strokeWidth:1,shapeRendering:"crispEdges",strokeDasharray:"dashed"===Mt?"3 3":void 0},`grid-${t.value}`)),
|
|
8
|
+
/* @__PURE__ */T("line",{x1:pe.left,y1:xe,x2:pe.right,y2:xe,stroke:z.axis,strokeWidth:1,shapeRendering:"crispEdges"}),$e.map(t=>/* @__PURE__ */T("text",{x:pe.left-8,y:t.y+4,textAnchor:"end","data-axis-tick":"true",fontSize:11,fill:z.label,style:{fontVariantNumeric:"tabular-nums"},children:me(t.value)},`ytick-${t.value}`)),ie&&$e.map((t,e)=>/* @__PURE__ */T("text",{x:pe.right+8,y:t.y+4,textAnchor:"start","data-axis-tick":"true",fontSize:11,fill:z.label,style:{fontVariantNumeric:"tabular-nums"},children:Wt(ie.right.ticks[e])},`ytick-r-${t.value}`)),nt&&/* @__PURE__ */T("text",{x:12,y:(pe.top+pe.bottom)/2,transform:`rotate(-90 12 ${(pe.top+pe.bottom)/2})`,textAnchor:"middle",fontSize:11,fill:z.label,children:nt}),
|
|
9
|
+
/* @__PURE__ */T("g",{clipPath:`url(#${It})`,mask:xt&&vt?`url(#${c(It)})`:void 0,children:Ht.map((o,c)=>{const d=W(o.slot,o.color,o.tone),m=o.mode??(G?"area":"line"),u=h(o.key,Pt);if("step"===m){const e=H.map((t,e)=>({start:ge(e),end:ge.end(e),value:o.data[e]})).filter(t=>X(t.value)).map(t=>({start:t.start,end:t.end,y:je(o)(t.value)}));/* @__PURE__ */
|
|
10
|
+
return T("path",{d:t(e),fill:"none",stroke:d,strokeWidth:2.5,strokeLinecap:"butt",strokeLinejoin:"miter",opacity:u??void 0,className:"rosh-viz-mark"},o.key)}const f=H.map((t,e)=>{const a=G?qt[c]?.[e]:o.data[e];return X(a)?[ge.center(e),je(o)(a)]:null}).filter(t=>null!==t);if(0===f.length)return null;if("column"===m){const t=Math.max(1,.62*ge.bandwidth),e="solid"===o.fillVariant,a=je(o);return re(o)?/* @__PURE__ */T("g",{opacity:u??void 0,className:"rosh-viz-mark",children:H.map((a,r)=>{const l=o.data[r];if(!X(l)||l<=0)return null;const n=((t,e)=>be.slice(0,be.findIndex(e=>e.key===Ht[t]?.key)).reduce((t,a)=>t+Math.max(0,X(a.data[e])?a.data[e]:0),0))(c,r),i=Ne(n+l),s=Ne(n)-(n>0?1:0);/* @__PURE__ */
|
|
11
|
+
return T("rect",{x:ge.center(r)-t/2,y:i,width:t,height:Math.max(0,s-i),rx:2,fill:o.pointTones?.[r]?A[o.pointTones[r]]:d,fillOpacity:e?1:.55},r)})},o.key):/* @__PURE__ */T("g",{opacity:u??void 0,className:"rosh-viz-mark",children:H.map((r,i)=>{const s=G?qt[c]?.[i]:o.data[i];if(!X(s))return null;const m=a(s);/* @__PURE__ */
|
|
12
|
+
return T("rect",{x:ge.center(i)-t/2,y:Math.min(m,xe),width:t,height:Math.abs(xe-m),rx:2,fill:d,fillOpacity:e?1:.35,className:xt?l.rise:void 0,style:xt?n(i,26):void 0},i)})},o.key)}const p=e(f,_,tt),g=G&&c>0?H.map((t,e)=>[ge.center(e),ve(qt[c-1]?.[e]??0)-2]):null,y=g?a(p,g):r(p,f,xe);/* @__PURE__ */
|
|
13
|
+
return Q("g",{opacity:u??void 0,className:"rosh-viz-mark",children:[("area"===m||G)&&
|
|
14
|
+
/* @__PURE__ */T("path",{d:y,fill:i(It,c,o.fillVariant??bt,d),stroke:"none"}),
|
|
15
|
+
/* @__PURE__ */T("path",{d:p,fill:"none",stroke:d,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",strokeDasharray:s(o.stroke??(o.forecast?"animated-dashed":"solid")),className:xt&&("animated-dashed"===o.stroke||o.forecast&&!o.stroke)?l.march:void 0})]},o.key)})}),it?.map((t,e)=>{const a=t.color??A[t.tone??"critical"],r=ve(t.value);/* @__PURE__ */
|
|
16
|
+
return Q("g",{children:[
|
|
17
|
+
/* @__PURE__ */T("line",{x1:pe.left,y1:r,x2:pe.right,y2:r,stroke:a,strokeWidth:1,strokeDasharray:"5 4"}),t.label&&/* @__PURE__ */T("text",{x:pe.right-4,y:r-5,textAnchor:"end",fontSize:11,fontWeight:600,fill:a,children:t.label})]},`rule-${e}`)}),"none"!==(ct??(st?"last":"none"))&&Ht.map((t,e)=>{if("column"===t.mode)return null;const a=ct??(st?"last":"none"),r=W(t.slot,t.color,t.tone),o=[...t.data].map(X).lastIndexOf(!0),l="all"===a?H.map((t,e)=>e).filter(a=>X(G?qt[e]?.[a]:t.data[a])):o>=0?[o]:[];/* @__PURE__ */
|
|
18
|
+
return Q("g",{children:[l.map(a=>{const l=G?qt[e]?.[a]:t.data[a];return X(l)?/* @__PURE__ */T(V,{cx:ge.center(a),cy:je(t)(l),color:r,variant:dt,pulse:mt&&a===o,title:`${H[a]}: ${t.label} ${Wt(l)}`},a):null}),st&&o>=0&&X(G?qt[e]?.[o]:t.data[o])&&/* @__PURE__ */T("text",{x:ge.center(o)-10,y:je(t)(G?qt[e]?.[o]:t.data[o])-9,textAnchor:"end",fontSize:12,fontWeight:600,fill:z.label,style:{fontVariantNumeric:"tabular-nums"},children:Wt(G?qt[e]?.[o]:t.data[o])})]},`dots-${t.key}`)}),H.map((t,e)=>e%We===0?/* @__PURE__ */T("text",{x:ge.center(e),y:K-8,textAnchor:"middle",fontSize:11,fill:z.label,style:{fontVariantNumeric:"tabular-nums"},children:t},`xtick-${e}`):null),null!==Et&&/* @__PURE__ */T("line",{x1:ge.center(Et),y1:pe.top,x2:ge.center(Et),y2:pe.bottom,stroke:z.axis,strokeWidth:1}),ae&&Me>0&&
|
|
19
|
+
/* @__PURE__ */Q("g",{pointerEvents:"none","data-column-strip":"true",children:[
|
|
20
|
+
/* @__PURE__ */T("line",{x1:pe.left,y1:Ne(Me),x2:pe.right,y2:Ne(Me),stroke:z.grid,strokeWidth:1,strokeDasharray:"2 3",shapeRendering:"crispEdges"}),
|
|
21
|
+
/* @__PURE__ */T("text",{x:pe.left+4,y:Ne(Me)-4,fontSize:11,fill:z.label,style:{fontVariantNumeric:"tabular-nums"},children:Wt(Me)})]}),Qt.drag&&/* @__PURE__ */T(p,{x0:ge(Qt.drag[0]),x1:ge(Qt.drag[1])+ge.bandwidth,top:pe.top,bottom:pe.bottom}),H.map((t,e)=>/* @__PURE__ */T("rect",{x:ge(e),y:pe.top,width:Math.max(1,ge.bandwidth),height:pe.bottom-pe.top,fill:"transparent",onMouseEnter:()=>Lt(e),onPointerDown:()=>Qt.press(e),onPointerEnter:()=>Qt.over(e),onPointerUp:Qt.release,onClick:yt?()=>yt(Kt(e)):void 0,style:yt?{cursor:"pointer"}:void 0},`hit-${e}`))]}),Qt.view&&/* @__PURE__ */T(g,{from:Zt?.[0]??H[0],to:Zt?.at(-1)??H[H.length-1],count:H.length,total:G&&"percent"!==J?zt(Gt.reduce((t,e)=>t+e,0)):ae?zt(be.reduce((t,e)=>t+e.data.filter(X).reduce((t,e)=>t+e,0),0)):void 0,rows:(ae?be:Ht).filter(t=>t.data.some(X)).map(t=>{const e=t.data.filter(X),a=W(t.slot,t.color,t.tone);if(0===e.length)return{key:t.key,label:t.label,color:a,value:"—"};const r=e.reduce((t,e)=>t+e,0),o=G||"column"===t.mode?zt(r):$t.zoomLevel(zt(r/e.length),zt(Math.max(...e)));return{key:t.key,label:t.label,color:a,value:o}}),onClear:Qt.clear}),ht&&Yt.length>2&&/* @__PURE__ */T($,{className:"mt-1",labels:Yt,width:Ct,data:Z[0]?.data??[],range:Bt,onRangeChange:t=>{ft?ft(t):Dt(t)}}),null!==Et&&
|
|
22
|
+
/* @__PURE__ */T("div",{className:"pointer-events-none absolute top-2 z-10",style:y(ge.center(Et),ge.bandwidth,Ct),children:/* @__PURE__ */T(u,{title:Zt?.[Et]??H[Et],rows:Ht.map((t,e)=>({key:t.key,label:t.label,color:W(t.slot,t.color,t.tone),value:X(t.data[Et])?G&&"percent"===J?`${E(100*(Jt(t.data[Et],Et)??0),1,Vt)} · ${zt(t.data[Et])}`:zt(t.data[Et]):void 0})),footnote:G&&"percent"===J?$t.inBucket(zt(Gt[Et])):void 0})})]})}export{Z as TimeSeriesChart};
|