efficient-shell 9.12.0 → 9.14.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 +11 -1
- package/dist/{Browser-G7AXZ4OT.js → Browser-42NYVAPR.js} +13 -13
- package/dist/Calculator-PCTFUS5O.js +29 -0
- package/dist/{CurrencyConverter-EDEJOKHC.js → CurrencyConverter-OIXAMDP7.js} +8 -8
- package/dist/{Documents-7AVOO2DA.js → Documents-V2OKP6JZ.js} +26 -26
- package/dist/{Files-MT6PMAHO.js → Files-OAMTKHYK.js} +18 -18
- package/dist/{Notepad-KBRNR5BU.js → Notepad-3LG227K2.js} +10 -10
- package/dist/{PdfViewer-FFQOKKFW.js → PdfViewer-DFBPEUY5.js} +1 -1
- package/dist/{PomodoroTimer-HCLT2JVD.js → PomodoroTimer-AYGPGA6Q.js} +11 -11
- package/dist/{Preview-4SOGNXHL.js → Preview-BBQWQ4DG.js} +28 -28
- package/dist/Sidebar-RHGWTAPS.js +44 -0
- package/dist/{Spreadsheet-W2AGKEWT.js → Spreadsheet-MS5FU7ET.js} +14 -14
- package/dist/{Stock-3IBS63UR.js → Stock-GSQNTV7E.js} +3 -3
- package/dist/{Weather-EFIIVKFE.js → Weather-5XLO2GLO.js} +15 -15
- package/dist/{WorldClock-ERQQ4VWP.js → WorldClock-CG3NF4GA.js} +6 -6
- package/dist/ai/index.js +51 -51
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/CartesianPlot.js +1 -1
- package/dist/charts/ChartBrush.js +1 -1
- package/dist/charts/ChartFrame.js +1 -1
- package/dist/charts/ChartSkeleton.js +1 -1
- package/dist/charts/ChordChart.js +1 -1
- package/dist/charts/ColumnChart.js +1 -1
- package/dist/charts/FunnelChart.js +1 -1
- package/dist/charts/HeatmapChart.js +1 -1
- package/dist/charts/HistogramChart.js +1 -1
- package/dist/charts/Meter.js +1 -1
- package/dist/charts/PieChart.js +1 -1
- package/dist/charts/RadarChart.js +1 -1
- package/dist/charts/RadialBarChart.js +1 -1
- package/dist/charts/RangeChart.js +1 -1
- package/dist/charts/RankedBars.js +1 -1
- package/dist/charts/SankeyChart.js +1 -1
- package/dist/charts/ScatterChart.js +1 -1
- package/dist/charts/SpecChart.js +1 -1
- package/dist/charts/StatTile.js +1 -1
- package/dist/charts/SunburstChart.js +1 -1
- package/dist/charts/TimeSeriesChart.js +1 -1
- package/dist/charts/TreemapChart.js +1 -1
- package/dist/charts/WaterfallChart.js +1 -1
- package/dist/chunk-25STFYV3.js +8 -0
- package/dist/{chunk-BNKULSCG.js → chunk-2OE5VVBE.js} +1 -1
- package/dist/{chunk-FVDX6ZSZ.js → chunk-2TQ6BLSN.js} +6 -6
- package/dist/{chunk-VZV7Q5V2.js → chunk-3AZBI76O.js} +1 -1
- package/dist/{chunk-NRGBXEBU.js → chunk-43T5JGFB.js} +1 -1
- package/dist/{chunk-QLYOGT3U.js → chunk-4E4GWE4L.js} +17 -17
- package/dist/{chunk-E6EUGQGA.js → chunk-4WZRNPIG.js} +1 -1
- package/dist/{chunk-5CVQN2BR.js → chunk-53KQSCMG.js} +7 -7
- package/dist/{chunk-65DYHG73.js → chunk-5VTRKWKO.js} +1 -1
- package/dist/{chunk-7WLFHDWA.js → chunk-66JYKX4T.js} +1 -1
- package/dist/{chunk-M5MAIJQQ.js → chunk-6L2UAAGT.js} +1 -1
- package/dist/{chunk-JENEVLJU.js → chunk-6TCJOVFX.js} +2 -2
- package/dist/{chunk-HRAK46H7.js → chunk-6YQPLI5M.js} +12 -12
- package/dist/{chunk-3MHBALGV.js → chunk-76IDLFXI.js} +1 -1
- package/dist/{chunk-D4KZOYXQ.js → chunk-7BDZZANS.js} +1 -1
- package/dist/{chunk-CJI3POCE.js → chunk-7KDGW6BR.js} +1 -1
- package/dist/{chunk-QCFN3ET4.js → chunk-7VCAMNCH.js} +1 -1
- package/dist/{chunk-VBNA237H.js → chunk-A4HA7EXR.js} +1 -1
- package/dist/{chunk-SGR4V5YI.js → chunk-A7CCSRPB.js} +1 -1
- package/dist/chunk-AEJNFA2K.js +6 -0
- package/dist/{chunk-CBMXYXBH.js → chunk-AG2OLB3E.js} +9 -9
- package/dist/{chunk-ZPW3KQ27.js → chunk-APXQMZSV.js} +28 -28
- package/dist/{chunk-IK332TWA.js → chunk-B4DR72FR.js} +1 -1
- package/dist/{chunk-WZQCRTXF.js → chunk-B7AHMB3U.js} +1 -1
- package/dist/{chunk-TQH6E5V2.js → chunk-BDAKGS7O.js} +1 -1
- package/dist/chunk-BGNJQMAZ.js +1 -0
- package/dist/{chunk-MCMUJDEP.js → chunk-BMQCUHSD.js} +1 -1
- package/dist/{chunk-GVAWCTJN.js → chunk-C45OKLRM.js} +7 -7
- package/dist/{chunk-JECMVR4S.js → chunk-C6MV6IAX.js} +8 -8
- package/dist/{chunk-5RAOFJYT.js → chunk-CBGKLHPB.js} +6 -6
- package/dist/{chunk-KTRNAMHY.js → chunk-CL7SBEBQ.js} +1 -1
- package/dist/{chunk-R6R57BWQ.js → chunk-D46AP6U5.js} +1 -1
- package/dist/{chunk-E72USUUR.js → chunk-D7X2HMMA.js} +9 -9
- package/dist/{chunk-GP5UNEKY.js → chunk-DKQWFQAV.js} +1 -1
- package/dist/{chunk-IBIUI2D3.js → chunk-DL6QIWVR.js} +1 -1
- package/dist/{chunk-7JJUI52C.js → chunk-DPDRFLBY.js} +3 -3
- package/dist/{chunk-H2XCQJRG.js → chunk-DXHLUB36.js} +1 -1
- package/dist/{chunk-YBU7NOD7.js → chunk-E7WY4GZ3.js} +1 -1
- package/dist/{chunk-RLLONZJJ.js → chunk-EGEWU776.js} +1 -1
- package/dist/{chunk-46YVA2BF.js → chunk-ELUTQZGP.js} +1 -1
- package/dist/{chunk-BJONHLET.js → chunk-EQN65XOO.js} +1 -1
- package/dist/chunk-EXJZUNNW.js +29 -0
- package/dist/{chunk-EWJELWIT.js → chunk-F24QTMTY.js} +3 -3
- package/dist/{chunk-QSUQC4AN.js → chunk-FTWWJHFX.js} +1 -1
- package/dist/{chunk-KAHYUBXM.js → chunk-GKK7DR2H.js} +8 -8
- package/dist/{chunk-NGQHXTUK.js → chunk-GKZUAT3K.js} +1 -1
- package/dist/{chunk-DRNB7KDC.js → chunk-GMRZX2ET.js} +1 -1
- package/dist/{chunk-UEIJSV45.js → chunk-GNU3U2TP.js} +1 -1
- package/dist/{chunk-FKA6ZVQO.js → chunk-GQK3U2IO.js} +9 -9
- package/dist/{chunk-UL4G6JY2.js → chunk-GRBBQ3VF.js} +1 -1
- package/dist/{chunk-AOSLOKAL.js → chunk-GXGBBMGV.js} +1 -1
- package/dist/{chunk-6O2W4X2V.js → chunk-HI6IE5HI.js} +1 -1
- package/dist/chunk-HJPCHES5.js +8 -0
- package/dist/{chunk-ZC3CCRPG.js → chunk-IGEFUHYE.js} +5 -5
- package/dist/{chunk-RISKWWMD.js → chunk-IKQVK3I3.js} +2 -2
- package/dist/{chunk-2GPHHW7C.js → chunk-IWEL2ZCV.js} +1 -1
- package/dist/{chunk-P65C5TUU.js → chunk-IWJRSC7M.js} +1 -1
- package/dist/{chunk-KECOZKJU.js → chunk-J53OQCKC.js} +7 -7
- package/dist/{chunk-BF7PZFKT.js → chunk-JB3WKDD7.js} +1 -1
- package/dist/{chunk-IENPHB5B.js → chunk-JJP54OT4.js} +1 -1
- package/dist/{chunk-MUHWI4GK.js → chunk-JKZJVQIB.js} +5 -5
- package/dist/chunk-KAVFW5CU.js +7 -0
- package/dist/{chunk-VANJPZ3H.js → chunk-KCV7BFKJ.js} +1 -1
- package/dist/chunk-KE5U4KKG.js +4 -0
- package/dist/{chunk-2AHLONPR.js → chunk-KJXF5WAJ.js} +1 -1
- package/dist/{chunk-B74Y4QR2.js → chunk-KTKMM2XW.js} +1 -1
- package/dist/chunk-LKW3YAZN.js +11 -0
- package/dist/chunk-LPUGK2MC.js +2 -0
- package/dist/{chunk-HMG5TW2R.js → chunk-M33225G6.js} +1 -1
- package/dist/{chunk-2J2OU65F.js → chunk-M5YG57UP.js} +2 -2
- package/dist/{chunk-6FI3HVUR.js → chunk-M7H3OCIL.js} +50 -50
- package/dist/{chunk-Z3CYLDHB.js → chunk-ME4VRJMK.js} +11 -11
- package/dist/{chunk-JGDLTIOX.js → chunk-MNIULUQY.js} +10 -10
- package/dist/{chunk-AG63JVX7.js → chunk-MPALY3CL.js} +5 -5
- package/dist/{chunk-KJHXCVNI.js → chunk-MRUJRFIX.js} +1 -1
- package/dist/{chunk-64R3IYAM.js → chunk-MVQMAIZM.js} +1 -1
- package/dist/{chunk-5Q3PFKB5.js → chunk-MZ26SYFY.js} +1 -1
- package/dist/{chunk-BYHKYYL6.js → chunk-NDEIZUMG.js} +1 -1
- package/dist/{chunk-2LDOLQ7F.js → chunk-NDKQDIWN.js} +5 -5
- package/dist/{chunk-O56CY36U.js → chunk-NFJDLIRM.js} +5 -5
- package/dist/{chunk-4XZXY2AF.js → chunk-OQW42DOR.js} +1 -1
- package/dist/{chunk-3FBYM6O5.js → chunk-OUKDGO4N.js} +8 -8
- package/dist/{chunk-LYX55RI3.js → chunk-P6LB3I3D.js} +1 -1
- package/dist/{chunk-5ZGL2BRZ.js → chunk-PF5CKD4C.js} +2 -2
- package/dist/{chunk-27W6BXT6.js → chunk-PKHZTFBK.js} +2 -2
- package/dist/{chunk-TBLN4MDQ.js → chunk-PKIDVVAE.js} +2 -2
- package/dist/{chunk-YWR2WRDR.js → chunk-PUCPFBYO.js} +1 -1
- package/dist/{chunk-5AWV5R6E.js → chunk-PUIQFTCO.js} +6 -6
- package/dist/{chunk-PWBLGKQ3.js → chunk-Q3MNSM7W.js} +4 -4
- package/dist/chunk-QMUAY24U.js +8 -0
- package/dist/{chunk-SAHQB2JD.js → chunk-QO35WRYA.js} +17 -17
- package/dist/{chunk-5XNN2SSR.js → chunk-QRJRGP2K.js} +8 -8
- package/dist/{chunk-6TRE326A.js → chunk-QSW3YHPK.js} +4 -4
- package/dist/{chunk-T76X2SHR.js → chunk-R2QDO7NY.js} +3 -3
- package/dist/{chunk-JQDRM6UK.js → chunk-R5EJJ6HC.js} +1 -1
- package/dist/{chunk-V5QEPNPK.js → chunk-RBIGSJ2J.js} +1 -1
- package/dist/{chunk-N52D37FS.js → chunk-RPMWF42S.js} +5 -5
- package/dist/{chunk-QMYQ4B5A.js → chunk-RQNZ2PVW.js} +4 -4
- package/dist/{chunk-TRUPMMDJ.js → chunk-RYS3URDC.js} +11 -11
- package/dist/chunk-SKETTGCJ.js +2 -0
- package/dist/{chunk-OVDHEMLK.js → chunk-SVQJZF66.js} +5 -5
- package/dist/{chunk-EOWOVR55.js → chunk-SWO4VPOB.js} +1 -1
- package/dist/chunk-TIUFFVP5.js +9 -0
- package/dist/{chunk-T7O2TNNX.js → chunk-TXMAWCR7.js} +1 -1
- package/dist/{chunk-NCRLKFXD.js → chunk-U5DMF2TX.js} +1 -1
- package/dist/{chunk-T2ITXX7R.js → chunk-UB5TLWZN.js} +7 -7
- package/dist/{chunk-ERLZDA75.js → chunk-UX5L3MOB.js} +3 -3
- package/dist/{chunk-4DBPKTVX.js → chunk-UXPZQID4.js} +15 -15
- package/dist/{chunk-H4YFANH5.js → chunk-VC42SDAC.js} +1 -1
- package/dist/{chunk-5Y6LGPZI.js → chunk-VG5NGCMQ.js} +7 -7
- package/dist/{chunk-I5XVZLDH.js → chunk-VO3ZB7C6.js} +7 -7
- package/dist/{chunk-KQSUSVMF.js → chunk-VSAI5TH7.js} +21 -21
- package/dist/{chunk-YQB5OYDC.js → chunk-VVVWVOG7.js} +1 -1
- package/dist/{chunk-O4NPQ23Q.js → chunk-VXP5L6DI.js} +1 -1
- package/dist/{chunk-D7JY2KHG.js → chunk-W244OMOU.js} +6 -6
- package/dist/{chunk-NBKQADMY.js → chunk-WFANOFHG.js} +5 -5
- package/dist/{chunk-IZQ3XTD2.js → chunk-WUMHSI4U.js} +1 -1
- package/dist/chunk-X2PZMXDP.js +1 -0
- package/dist/{chunk-X4BKHXU5.js → chunk-X6TJR6M2.js} +7 -7
- package/dist/{chunk-R7JTTKG2.js → chunk-XILZGSMX.js} +3 -3
- package/dist/chunk-XOKANFQD.js +22 -0
- package/dist/{chunk-7YZJLFAK.js → chunk-XSJJPACH.js} +10 -10
- package/dist/{chunk-XI45TSEK.js → chunk-YFUMK2E7.js} +1 -1
- package/dist/{chunk-JVYSRH6U.js → chunk-YJSX6JAC.js} +1 -1
- package/dist/{chunk-2SJDTKQA.js → chunk-YL6LLHJA.js} +21 -21
- package/dist/{chunk-N3CTLEJS.js → chunk-YVTKTWZX.js} +6 -6
- package/dist/{chunk-QLOKT22X.js → chunk-ZCV377AG.js} +1 -1
- package/dist/{chunk-UZGVIHFI.js → chunk-ZF545DXX.js} +15 -15
- package/dist/{chunk-FEPBXJUR.js → chunk-ZG2HMC7S.js} +1 -1
- package/dist/{chunk-G6LOKIFC.js → chunk-ZMVCN4OA.js} +9 -9
- package/dist/{chunk-CB6ROWOC.js → chunk-ZOBLEXIU.js} +1 -1
- package/dist/{chunk-O426Q7KC.js → chunk-ZPCADTM5.js} +1 -1
- package/dist/{chunk-5VYBPDZ2.js → chunk-ZREDCRTL.js} +1 -1
- package/dist/data/DataTable.js +1 -1
- package/dist/data/Kanban.js +1 -1
- package/dist/data/ListFooter.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/Pagination.js +1 -1
- package/dist/file-intake/index.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Calendar.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DatePicker.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DateTimePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/FormErrorSummary.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/ImageFocusPoint.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.js +1 -1
- package/dist/forms/NumericKeypad.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/Select.js +1 -1
- package/dist/forms/SidesInput.js +1 -1
- package/dist/forms/Slider.js +1 -1
- package/dist/forms/Snippet.js +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.d.ts +8 -2
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/TimePicker.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/mediaLibraryMenu.js +1 -1
- package/dist/forms/mediaMoveItems.js +1 -1
- package/dist/forms/textAlign.js +1 -1
- package/dist/forms/useFileIntake.js +1 -1
- package/dist/hooks/useTheme.d.ts +1 -1
- package/dist/index.d.ts +10 -2
- package/dist/index.js +111 -111
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +7 -7
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/shell/Accordion.js +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/Avatar.js +1 -1
- package/dist/shell/Banner.js +1 -1
- package/dist/shell/Breadcrumbs.js +1 -1
- package/dist/shell/BudgetBar.js +1 -1
- package/dist/shell/Card.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContainerFillChart.js +1 -1
- package/dist/shell/CountBadge.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/EditableGrid.js +1 -1
- package/dist/shell/EmptyState.js +1 -1
- package/dist/shell/GlobalSearch.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/IconRail.js +1 -1
- package/dist/shell/ImageLightbox.js +1 -1
- package/dist/shell/ItemCount.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/MetricBar.js +1 -1
- package/dist/shell/MetricBarLegend.js +1 -1
- package/dist/shell/MilestoneTimeline.js +1 -1
- package/dist/shell/PageHeader.js +1 -1
- package/dist/shell/ProductionTimeline.js +1 -1
- package/dist/shell/ResizeHandle.js +1 -1
- package/dist/shell/Result.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SettingRow.js +1 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/SidebarNav.js +1 -1
- package/dist/shell/SortableList.js +1 -1
- package/dist/shell/Statistic.js +1 -1
- package/dist/shell/TimeAgo.js +1 -1
- package/dist/shell/TimelineTrack.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/language.js +1 -1
- package/dist/shell/strings.d.ts +2 -0
- package/dist/shell/strings.js +1 -1
- package/dist/shell/toast.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/AuthScreen.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DashboardTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/ErrorBoundary.d.ts +1 -1
- package/dist/templates/ErrorBoundary.js +1 -1
- package/dist/templates/ErrorPage.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-6NA35GFS.js +0 -29
- package/dist/Sidebar-LIP2DYTO.js +0 -44
- package/dist/chunk-3XRBVYTO.js +0 -2
- package/dist/chunk-4CPE5NBC.js +0 -8
- package/dist/chunk-4GPUKEYQ.js +0 -1
- package/dist/chunk-5R6RNUDB.js +0 -7
- package/dist/chunk-7BYBGPWU.js +0 -9
- package/dist/chunk-GCB5S2OI.js +0 -8
- package/dist/chunk-GVH3NG6G.js +0 -22
- package/dist/chunk-J7OKOVSL.js +0 -11
- package/dist/chunk-LFPJ263N.js +0 -6
- package/dist/chunk-PEM7UXQ3.js +0 -1
- package/dist/chunk-QYJQAY6C.js +0 -2
- package/dist/chunk-RSHNWBW2.js +0 -4
- package/dist/chunk-SC6HJBQA.js +0 -8
- package/dist/chunk-SYH7EPLF.js +0 -29
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{LoadingSpinner as e}from"./chunk-R2VKEMZH.js";import{useBrowserLayoutEffect as n}from"./chunk-D65T4H6J.js";import{useShellStrings as t,useShellLocale as r}from"./chunk-
|
|
2
|
-
return u("div",{className:"group flex flex-col w-72 shrink-0 rounded-xl bg-gray-50 border transition-colors "+(t?"border-blue-400 ring-2 ring-blue-300/60":"border-gray-200"),onDragOver:e=>{e.preventDefault();try{e.dataTransfer.dropEffect="move"}catch{}},onDrop:n=>{n.preventDefault(),(e=>{if(H&&$&&$.col===e){const n=(
|
|
1
|
+
import{LoadingSpinner as e}from"./chunk-R2VKEMZH.js";import{useBrowserLayoutEffect as n}from"./chunk-D65T4H6J.js";import{useShellStrings as t,useShellLocale as r}from"./chunk-X2PZMXDP.js";import{formatPlain as a}from"./chunk-C3QOHMR6.js";import{useState as o,useMemo as l,useRef as i,Fragment as s}from"react";import{jsx as d,Fragment as c,jsxs as u}from"react/jsx-runtime";function m({items:m,columns:f,columnOf:p,getId:g,onMove:h,renderCard:x,onCardClick:b,sortInColumn:y,isLoading:v=!1,loadingText:N,emptyState:k,showColumnsWhenEmpty:w=!1,columnEmptyText:C,onAddItem:D,addItemText:E}){const j=t().kanban,I=r(),M=N??j.loading,T=C??j.dropHere,A=E??j.addItem,[H,O]=o(null),[$,P]=o(null),R=l(()=>{const e={};for(const n of f)e[n.value]=[];for(const n of m)(e[p(n)]??=[]).push(n);if(y)for(const n of Object.keys(e))e[n].sort(y);return e},[m,f,p,y]),S=()=>{O(null),P(null)},q=i(null),z=i(/* @__PURE__ */new Map);n(()=>{if(null!==H)return;const e=q.current;if(!e)return;const n=/* @__PURE__ */new Map,t=[];if(e.querySelectorAll("[data-kanban-card]").forEach(e=>{const r=e.dataset.kanbanCard,a=e.getBoundingClientRect();n.set(r,a);const o=z.current.get(r);if(o){const n=o.left-a.left,r=o.top-a.top;(n||r)&&t.push([e,n,r])}}),z.current=n,t.length){for(const[e,n,r]of t)e.style.transition="none",e.style.transform=`translate(${n}px, ${r}px)`;requestAnimationFrame(()=>{for(const[e]of t)e.style.transition="transform 200ms cubic-bezier(0.2, 0, 0, 1)",e.style.transform="",e.addEventListener("transitionend",()=>{e.style.transition="",e.style.transform=""},{once:!0})})}},[R,H]);return v?/* @__PURE__ */d(e,{size:"sm",padding:"p-4",label:M}):0!==m.length||w?/* @__PURE__ */d("div",{ref:q,className:"flex-1 overflow-x-auto grid-scroll",children:/* @__PURE__ */d("div",{className:"flex gap-3 h-full min-w-max pb-2",children:f.map(e=>{const n=R[e.value]??[],t=null!==$&&$.col===e.value,r=null!==H?n.findIndex(e=>g(e)===H):-1,o=t&&(-1===r||$.index!==r&&$.index!==r+1)?$.index:-1;/* @__PURE__ */
|
|
2
|
+
return u("div",{className:"group flex flex-col w-72 shrink-0 rounded-xl bg-gray-50 border transition-colors "+(t?"border-blue-400 ring-2 ring-blue-300/60":"border-gray-200"),onDragOver:e=>{e.preventDefault();try{e.dataTransfer.dropEffect="move"}catch{}},onDrop:n=>{n.preventDefault(),(e=>{if(H&&$&&$.col===e){const n=(R[e]??[]).findIndex(e=>g(e)===H),t=-1!==n;if(!t||$.index!==n&&$.index!==n+1){const r=t&&$.index>n?$.index-1:$.index;h(H,e,r)}}S()})(e.value)},children:[
|
|
3
3
|
/* @__PURE__ */u("div",{className:`flex items-center justify-between px-3 py-2 rounded-t-xl text-sm font-medium ${e.accent??"text-gray-700 bg-gray-100"}`,children:[
|
|
4
4
|
/* @__PURE__ */u("span",{className:"flex items-center gap-2",children:[
|
|
5
5
|
/* @__PURE__ */d("span",{className:`h-2 w-2 rounded-full ${e.dot??"bg-gray-400"}`}),e.label]}),
|
|
6
6
|
/* @__PURE__ */d("span",{className:"text-xs opacity-70",children:a(n.length,I)})]}),
|
|
7
|
-
/* @__PURE__ */u("div",{className:"flex-1 overflow-y-auto p-2 space-y-2 min-h-[120px]",onDragEnter:()=>
|
|
7
|
+
/* @__PURE__ */u("div",{className:"flex-1 overflow-y-auto p-2 space-y-2 min-h-[120px]",onDragEnter:()=>P(t=>t&&t.col===e.value&&t.index===n.length?t:{col:e.value,index:n.length}),children:[n.map((t,r)=>{const a=g(t),l=a===H;/* @__PURE__ */
|
|
8
8
|
return u(s,{children:[o===r&&/* @__PURE__ */d("div",{className:"h-0.5 rounded-full bg-blue-500","aria-hidden":!0}),
|
|
9
|
-
/* @__PURE__ */d("div",{"data-kanban-card":a,draggable:!0,onDragStart:e=>{O(a);try{e.dataTransfer.effectAllowed="move"}catch{}},onDragEnter:t=>{t.stopPropagation();const a=null!==H?n.findIndex(e=>g(e)===H):-1,o=-1!==a&&a<r?r+1:r;
|
|
9
|
+
/* @__PURE__ */d("div",{"data-kanban-card":a,draggable:!0,onDragStart:e=>{O(a);try{e.dataTransfer.effectAllowed="move"}catch{}},onDragEnter:t=>{t.stopPropagation();const a=null!==H?n.findIndex(e=>g(e)===H):-1,o=-1!==a&&a<r?r+1:r;P(n=>n&&n.col===e.value&&n.index===o?n:{col:e.value,index:o})},onDragEnd:S,onClick:b?()=>b(t):void 0,style:null===H?void 0:{opacity:l?.4:1,transition:"opacity 120ms ease"},className:"rounded-lg bg-white border border-gray-200 p-3 shadow-sm hover:border-blue-400 hover:shadow transition "+(b?"cursor-pointer":""),children:x(t)})]},a)}),n.length>0&&o===n.length&&/* @__PURE__ */d("div",{className:"h-0.5 rounded-full bg-blue-500","aria-hidden":!0}),0===n.length&&/* @__PURE__ */d("div",{className:"text-2xs text-center rounded-lg transition-all duration-150 "+(t?"border-2 border-dashed border-blue-300 bg-blue-50/50 text-blue-400 py-8":"text-gray-400 py-6"),children:T})]}),D&&/* @__PURE__ */d("div",{className:"p-2 pt-0",children:/* @__PURE__ */u("button",{type:"button",onClick:()=>D(e.value),className:"flex w-full items-center justify-center gap-1 rounded-lg px-2 min-h-8 py-1 text-xs font-medium text-ink-faint opacity-0 transition hover:bg-gray-100 hover:text-ink focus-visible:opacity-100 group-hover:opacity-100",children:[
|
|
10
10
|
/* @__PURE__ */d("span",{"aria-hidden":!0,className:"text-sm leading-none",children:"+"}),A]})})]},e.value)})})}):/* @__PURE__ */d(c,{children:k??/* @__PURE__ */d("div",{className:"text-sm text-gray-500 p-4",children:j.empty})})}export{m as Kanban};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{AccessibleTable as t}from"./chunk-TBPHW42V.js";import{arcPath as e}from"./chunk-VFC6QUEN.js";import{useHighlight as o}from"./chunk-CNYAHYE6.js";import{ChartTooltip as n}from"./chunk-TLRCTNUF.js";import{CHART_INK as r,resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as l,useShellLocale as i}from"./chunk-X2PZMXDP.js";import{formatPlain as s}from"./chunk-C3QOHMR6.js";import{useState as c}from"react";import{jsx as d,jsxs as m}from"react/jsx-runtime";function h(t,e,o,n){const r=(t,o)=>{const n=e[t]?.[o];return"number"==typeof n&&Number.isFinite(n)?n:0},a=t.map((e,o)=>t.reduce((t,e,n)=>t+r(o,n)+r(n,o),0)),l=Math.max(2,o),i=t.length>l,s=i?t.map((t,e)=>e).sort((t,e)=>a[e]-a[t]).slice(0,l-1).sort((t,e)=>t-e):t.map((t,e)=>e),c=new Map(s.map((t,e)=>[t,e])),d=i?s.length:-1,m=i?[...s.map(e=>t[e]),n]:[...t],h=m.map(()=>m.map(()=>0));let u=0;t.forEach((e,o)=>t.forEach((t,e)=>{const n=c.get(o)??d,a=c.get(e)??d;n!==d||a!==d?h[n][a]+=r(o,e):u+=r(o,e)}));const f=m.map((t,e)=>m.reduce((t,o,n)=>t+h[e][n]+h[n][e],0));return d>=0&&(f[d]+=u),{labels:m,matrix:h,totals:f,otherIndex:d,foldedCount:i?t.length-s.length:0}}function u({labels:u,matrix:f,size:p=340,maxNodes:x=8,padAngle:g=.04,arcWidth:b=12,formatValue:k,className:v,emptyLabel:M}){const $=l().charts,w=i(),N=k??(t=>s(t,w)),j=M??$.noFlows,[y,F]=c(null),{highlighted:C}=o(),E=h(u,f,x,$.other),{labels:P,matrix:T,otherIndex:z,foldedCount:A}=E,I=(t,e)=>T[t]?.[e]??0,L=t=>t===z?r.muted:a(t),H=E.totals,O=P.map((t,e)=>e).sort((t,e)=>H[e]-H[t]),Q=O.reduce((t,e)=>t+H[e],0);if(Q<=0)/* @__PURE__ */return d("p",{className:`text-sm text-gray-500 ${v??""}`,children:j});const R=p/2,U=p/2,V=p/2-44,W=V-b,B=g*O.length,X=/* @__PURE__ */new Map;let Y=-Math.PI/2;O.forEach((t,e)=>{const o=H[t]/Q*(2*Math.PI-B);X.set(t,{start:Y,end:Y+o,slot:e}),Y+=o+g});const Z=/* @__PURE__ */new Map,D=[];for(const t of O)for(const e of O){const o=I(t,e);if(o<=0)continue;const n=X.get(t),r=o/Math.max(1,H[t])*(n.end-n.start),a=Z.get(t)??0;Z.set(t,a+r),D.push({from:t,to:e,value:o,a:n.start+a+r/2,b:X.get(e).start+(X.get(e).end-X.get(e).start)/2})}const S=(t,e)=>[R+e*Math.cos(t),U+e*Math.sin(t)],q="arc"===y?.kind?y.index:void 0,G="ribbon"===y?.kind?D[y.index]:void 0;/* @__PURE__ */
|
|
2
|
+
return m("div",{className:`relative ${v??""}`,children:[
|
|
3
|
+
/* @__PURE__ */m("svg",{width:"100%",height:p,viewBox:`0 0 ${p} ${p}`,role:"img","aria-label":$.chord(O.length),onMouseLeave:()=>F(null),children:[D.map((t,e)=>{const[o,n]=S(t.a,W),[r,a]=S(t.b,W),l=L(t.from),i=((t,e)=>y?"ribbon"===y.kind?y.index===e:y.index===t.from||y.index===t.to:null!==C?P[t.from]===C||P[t.to]===C:null)(t,e);/* @__PURE__ */
|
|
4
|
+
return d("path",{d:`M${o},${n} Q${R},${U} ${r},${a}`,fill:"none",stroke:l,strokeWidth:Math.max(1,t.value/Q*p*.9),strokeOpacity:null===i||i?.34:.07,strokeLinecap:"round",onMouseEnter:()=>F({kind:"ribbon",index:e})},`${P[t.from]}→${P[t.to]}`)}),O.map(t=>{const o=X.get(t),n=(o.start+o.end)/2,[a,l]=S(n,V+16),i=(t=>y?"arc"===y.kind?y.index===t:D[y.index].from===t||D[y.index].to===t:null!==C?P[t]===C:null)(t);/* @__PURE__ */
|
|
5
|
+
return m("g",{onMouseEnter:()=>F({kind:"arc",index:t}),children:[
|
|
6
|
+
/* @__PURE__ */d("path",{d:e(R,U,W,V,o.start,o.end),fill:L(t),fillOpacity:null===i||i?1:.45}),
|
|
7
|
+
/* @__PURE__ */d("text",{x:a,y:l+4,fontSize:11,fill:r.label,textAnchor:Math.cos(n)>.15?"start":Math.cos(n)<-.15?"end":"middle",children:P[t]})]},t)})]}),A>0&&/* @__PURE__ */d("p",{className:"mt-1 text-xs text-ink-faint",children:$.chordFolded(A)}),void 0!==q&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:P[q],rows:[{key:"total",label:$.totalFlow,color:L(q),value:N(H[q])}]})}),G&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:`${P[G.from]} → ${P[G.to]}`,rows:[{key:"value",label:$.flow,color:L(G.from),value:N(G.value)}]})}),
|
|
8
|
+
/* @__PURE__ */d(t,{caption:$.chord(O.length),head:[$.tableFrom,$.tableTo,$.value],rows:D.map(t=>[P[t.from],P[t.to],N(t.value)])})]})}export{u as ChordChart,h as foldChord};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import{useCopyText as e,CopyGlyph as t}from"./chunk-
|
|
1
|
+
import{useCopyText as e,CopyGlyph as t}from"./chunk-NDEIZUMG.js";import{ItemCount as n}from"./chunk-GMRZX2ET.js";import{PopupMenu as r,PopupMenuItem as i,PopupMenuDivider as l}from"./chunk-HAFB45DT.js";import{Icon as o}from"./chunk-FSPFV4MI.js";import{useShellStrings as a}from"./chunk-X2PZMXDP.js";import{useState as s,useMemo as d,useRef as c,useEffect as u,Fragment as m,useLayoutEffect as f}from"react";import{jsxs as p,jsx as y,Fragment as h}from"react/jsx-runtime";function g(e){const t=[];let n=0;for(;n<e.length;){const r=e[n].group;let i=n;for(;void 0!==r&&i+1<e.length&&e[i+1].group===r;)i++;t.push(i>n?{group:r,start:n,end:i}:{start:n,end:n}),n=i+1}return t}function b(e,t){return e.find(e=>t>=e.start&&t<=e.end)}function k(e,t,n,r){const i=e.findIndex(e=>e.key===t.key);let l=e.findIndex(e=>e.key===n);if(i<0||l<0)return null;const o=g(e),a=b(o,i),s="group"===t.kind&&void 0!==a.group?e.slice(a.start,a.end+1).map(e=>e.key):[t.key];if(s.includes(n))return null;const d=b(o,l);if("tab"===t.kind&&void 0!==a.group){if(d!==a)return null}else void 0!==d.group&&(l="before"===r?d.start:d.end);return{key:e[l].key,side:r,moving:s}}function x(e,t,n,r){const i=k(e,t,n,r);if(!i)return null;const l=e.map(e=>e.key).filter(e=>!i.moving.includes(e)),o=l.indexOf(i.key)+("after"===i.side?1:0),a=[...l.slice(0,o),...i.moving,...l.slice(o)];return a.every((t,n)=>t===e[n].key)?null:a}var v="flex-[0_1_15rem]",w=v,N="outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-500";function C(){/* @__PURE__ */
|
|
2
2
|
return y(o,{name:"close",look:"mini","aria-hidden":"true",className:"size-3.5"})}function $({text:n,label:r,copiedLabel:i}){const{copied:l,copy:o}=e(n);/* @__PURE__ */
|
|
3
|
-
return y("button",{type:"button",tabIndex:-1,"aria-label":l?i:r,title:l?i:r,onClick:o,className:"flex size-5 shrink-0 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 @max-[10rem]:hidden",children:/* @__PURE__ */y(t,{copied:l,className:"size-3.5"})})}function
|
|
3
|
+
return y("button",{type:"button",tabIndex:-1,"aria-label":l?i:r,title:l?i:r,onClick:o,className:"flex size-5 shrink-0 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 @max-[10rem]:hidden",children:/* @__PURE__ */y(t,{copied:l,className:"size-3.5"})})}function I({node:e}){const t=c(null);return f(()=>{const n=t.current;if(n)return n.appendChild(e),()=>{e.parentNode===n&&n.removeChild(e)}},[e]),/* @__PURE__ */y("span",{ref:t,className:"ml-1 flex shrink-0 items-center"})}function z({tabs:e,activeKey:t,idFor:f,panelMounted:b,onActivate:z,onClose:D,onCloseMany:j,label:M,className:T,activeClassName:A,end:E,afterPinned:_,onIconMenu:B,menuItems:R,sizing:S="even",tall:F=!1,onReorder:K,groupInfo:O}){const X=a().pageTabs,L=a().count,[P,Z]=s(null),G=F?"h-[34px]":"h-8",H=d(()=>e.map(e=>({key:e.key,group:O?e.group:void 0})),[e,O]),V=d(()=>g(H),[H]),[W,U]=s(()=>/* @__PURE__ */new Set),Y=e=>U(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),q=d(()=>{const n=[];for(const r of V)for(let i=r.start;i<=r.end;i++)void 0!==r.group&&W.has(r.group)&&e[i].key!==t||n.push(e[i]);return n},[V,W,e,t]),J=c(null),[Q,ee]=s(null),te=(t,n)=>K?{draggable:!0,onDragStart:n=>{J.current=t,n.dataTransfer.effectAllowed="move",n.dataTransfer.setData("text/plain",e.find(e=>e.key===t.key)?.title??"")},onDragOver:e=>{const r=J.current;if(!r)return;const i=e.currentTarget.getBoundingClientRect(),l=n!==t.key||"tab"===t.kind?e.clientX<i.left+i.width/2?"before":"after":"before",o=x(H,r,n,l)?k(H,r,n,l):null;o?(e.preventDefault(),e.dataTransfer.dropEffect="move",Q?.key===o.key&&Q.side===o.side||ee({key:o.key,side:o.side})):Q&&ee(null)},onDrop:e=>{const t=J.current;if(!t||!Q)return;e.preventDefault();const n=x(H,t,Q.key,Q.side);J.current=null,ee(null),n&&K(n)},onDragEnd:()=>{J.current=null,ee(null)}}:{},ne=d(()=>new Set(V.filter(e=>void 0!==e.group&&O).map(t=>e[t.start].key)),[V,e,O]),re=e=>"pointer-events-none absolute inset-y-1 z-[3] w-0.5 rounded-full bg-blue-500 "+("before"===e?"-left-px":"-right-px"),ie=e=>Q?.key===e&&!("before"===Q.side&&ne.has(e))&&/* @__PURE__ */y("span",{"aria-hidden":"true",className:re(Q.side)}),le=e.length;u(()=>{if(!t)return;const e=document.getElementById(f(t,"tab"));e?.scrollIntoView?.({block:"nearest",inline:"nearest"})},[f,t,le]);const oe=_?q.findIndex(e=>!e.pinned):-1,ae=q.some(e=>e.key===t)?t:q[0]?.key,se=e=>{const t=q[(e+q.length)%q.length];t&&document.getElementById(f(t.key,"tab"))?.focus()},de=(e,t)=>{const n=q[e+t];if(!K||!n)return;const r=x(H,{kind:"tab",key:q[e].key},n.key,t<0?"before":"after");r&&(K(r),setTimeout(()=>document.getElementById(f(q[e].key,"tab"))?.focus(),0))},ce=P?e.find(e=>e.key===P.key):void 0,ue=ce&&R?R(ce.key):[],me=ce?e.indexOf(ce):-1,fe=e=>e.some(e=>!e.pinned),pe=e=>()=>{Z(null),e()},ye=(e,n)=>{const r=e.key===t,i=!!e.dirty,l=e.icon,a=r?A??"z-[1] border-gray-200 bg-gray-50 text-gray-900":"border-transparent text-gray-600 hover:bg-gray-200/70 hover:text-gray-900",s=!!n&&!r&&n.key!==t,d={type:"button",role:"tab",id:f(e.key,"tab"),"aria-selected":r,"aria-controls":b?.(e.key)?f(e.key,"panel"):void 0,tabIndex:e.key===ae?0:-1,title:e.title,onClick:()=>z(e.key)},c={onContextMenu:t=>((e,t)=>{e.preventDefault(),Z({x:e.clientX,y:e.clientY,key:t.key})})(t,e),onAuxClick:t=>((e,t)=>{1!==e.button||t.pinned||(e.preventDefault(),D(t.key))})(t,e),onMouseDown:e=>{1===e.button&&e.preventDefault()}},u=l&&
|
|
4
4
|
/* @__PURE__ */p("span",{className:"relative flex size-4 shrink-0 items-center justify-center text-gray-500 [&>svg]:size-4","aria-hidden":"true",children:[l,i&&!r&&!e.pinned&&
|
|
5
|
-
/* @__PURE__ */y("span",{className:"absolute -right-1 -top-1 hidden size-2 rounded-full bg-gray-500 ring-2 ring-gray-100 @max-[6.5rem]:block @max-[6.5rem]:group-hover:hidden"})]}),h=r&&!!
|
|
5
|
+
/* @__PURE__ */y("span",{className:"absolute -right-1 -top-1 hidden size-2 rounded-full bg-gray-500 ring-2 ring-gray-100 @max-[6.5rem]:block @max-[6.5rem]:group-hover:hidden"})]}),h=r&&!!B&&!!l;return e.pinned?/* @__PURE__ */p("div",{role:"presentation",className:`group relative flex flex-none items-center justify-center rounded-t-md border border-b-0 transition-colors ${G} ${l?"w-10":""} ${a}`,...c,...te({kind:"tab",key:e.key},e.key),children:[ie(e.key),
|
|
6
6
|
/* @__PURE__ */p("button",{...d,className:`flex h-full items-center justify-center rounded-t-md ${l?"w-full":"px-3"} ${N}`,children:[u,
|
|
7
7
|
/* @__PURE__ */y("span",{className:l?"sr-only":"whitespace-nowrap text-sm",children:e.title})]})]},e.key):/* @__PURE__ */p(m,{children:[s&&/* @__PURE__ */y("span",{"aria-hidden":"true",className:"mb-3 h-4 w-px shrink-0 self-end border-l border-gray-300"}),
|
|
8
|
-
/* @__PURE__ */p("div",{role:"presentation",className:`group relative flex items-center rounded-t-md border border-b-0 text-sm transition-colors ${
|
|
9
|
-
/* @__PURE__ */y("button",{type:"button",tabIndex:-1,"aria-haspopup":"menu","aria-label":
|
|
8
|
+
/* @__PURE__ */p("div",{role:"presentation",className:`group relative flex items-center rounded-t-md border border-b-0 text-sm transition-colors ${G} ${"active-full"===S&&r?"":"@container"} ${"active-full"===S?r?"flex-[0_0_15rem] min-w-0":w:r&&(e.copy||h)?"flex-[0_1_20rem]":v} ${r?"active-full"===S?"":"min-w-[4.25rem]":"min-w-[4rem]"} ${a}`,...c,...te({kind:"tab",key:e.key},e.key),children:[ie(e.key),h&&
|
|
9
|
+
/* @__PURE__ */y("button",{type:"button",tabIndex:-1,"aria-haspopup":"menu","aria-label":X.tabMenu,title:X.tabMenu,onClick:t=>{const n=t.currentTarget.getBoundingClientRect();B?.(e.key,n.left,n.bottom+4)},className:`ml-2 flex size-6 shrink-0 items-center justify-center rounded hover:bg-gray-200 @max-[5rem]:ml-2 ${N}`,children:u}),
|
|
10
10
|
/* @__PURE__ */p("button",{...d,className:`flex h-full min-w-0 flex-1 items-center gap-2 rounded-t-md pr-1 text-left ${h?"pl-2":"pl-3"} ${N} ${r?h?"":"@max-[5rem]:pl-3":"@max-[6.5rem]:pr-3 @max-[4.5rem]:justify-center @max-[4.5rem]:px-0 @max-[4.5rem]:group-hover:pl-2 @max-[4.5rem]:group-hover:pr-3"}`,children:[!h&&u,
|
|
11
|
-
/* @__PURE__ */p("span",{className:`min-w-0 flex-1 overflow-hidden whitespace-nowrap [mask-image:linear-gradient(to_right,#000_calc(100%-1rem),transparent)] ${"active-full"===
|
|
12
|
-
/* @__PURE__ */y("span",{role:"img","aria-label":
|
|
13
|
-
/* @__PURE__ */p("span",{className:"mr-2 flex size-5 shrink-0 items-center justify-center "+(r?"":"@max-[6.5rem]:hidden @max-[6.5rem]:group-hover:flex"),children:[i&&/* @__PURE__ */y("span",{role:"img","aria-label":
|
|
14
|
-
/* @__PURE__ */y("button",{type:"button",tabIndex:-1,"aria-label":
|
|
11
|
+
/* @__PURE__ */p("span",{className:`min-w-0 flex-1 overflow-hidden whitespace-nowrap [mask-image:linear-gradient(to_right,#000_calc(100%-1rem),transparent)] ${"active-full"===S&&r?"pr-4":""} ${l?r?"@max-[5rem]:sr-only":"@max-[4.5rem]:sr-only":""}`,children:[e.title,e.favorite&&
|
|
12
|
+
/* @__PURE__ */y("span",{role:"img","aria-label":X.favorite,title:X.favorite,className:"ml-1 inline-flex align-[-0.125em] text-yellow-500",children:/* @__PURE__ */y(o,{name:"star","aria-hidden":"true",className:"size-3.5",fill:"currentColor",strokeWidth:1.5})})]})]}),r&&e.actions&&/* @__PURE__ */y(I,{node:e.actions}),r&&e.copy&&/* @__PURE__ */y($,{text:e.copy,label:X.copy(e.copy),copiedLabel:X.copied}),
|
|
13
|
+
/* @__PURE__ */p("span",{className:"mr-2 flex size-5 shrink-0 items-center justify-center "+(r?"":"@max-[6.5rem]:hidden @max-[6.5rem]:group-hover:flex"),children:[i&&/* @__PURE__ */y("span",{role:"img","aria-label":X.unsaved,className:"size-2 rounded-full bg-gray-500 group-hover:hidden"}),
|
|
14
|
+
/* @__PURE__ */y("button",{type:"button",tabIndex:-1,"aria-label":X.closeTab?.(e.title)??`${X.close} ${e.title}`,onClick:()=>D(e.key),className:"size-5 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 "+(i?"hidden group-hover:flex":r?"flex":"flex opacity-0 group-hover:opacity-100 focus-visible:opacity-100"),children:/* @__PURE__ */y(C,{})})]})]})]},e.key)},he=[];let ge,be=0,ke=!_;for(const t of V){const r=q.filter(n=>{const r=e.indexOf(n);return r>=t.start&&r<=t.end});if(ke||be!==oe||(ke=!0,he.push(/* @__PURE__ */y(m,{children:_},"rosh-after-pinned")),ge=void 0),be+=r.length,void 0===t.group||!O){for(const e of r)he.push(ye(e,ge)),ge=e;continue}ge=void 0;const i=t.group,l=O(i),a=t.end-t.start+1,s=!W.has(i),d=e[t.start].key;he.push(
|
|
15
15
|
/* @__PURE__ */p("div",{role:"group","aria-label":l.label,"data-tab-group":i,className:"relative mx-1 flex shrink-0 items-end first:ml-0 min-w-0",children:[
|
|
16
|
-
/* @__PURE__ */p("button",{type:"button",tabIndex:-1,"aria-expanded":s,title:
|
|
16
|
+
/* @__PURE__ */p("button",{type:"button",tabIndex:-1,"aria-expanded":s,title:X.groupToggle(l.label,a),onClick:()=>Y(i),...te({kind:"group",key:d},d),className:`relative mb-1 mr-1 flex h-6 shrink-0 items-center gap-1 rounded-full bg-blue-100 px-2 text-xs font-medium text-blue-700 hover:bg-blue-200 ${N}`,children:[
|
|
17
17
|
/* @__PURE__ */y(o,{name:s?"chevron-down":"chevron-right","aria-hidden":"true",className:"size-3",strokeWidth:2}),l.icon&&/* @__PURE__ */y("span",{className:"flex size-3.5 items-center justify-center [&>svg]:size-3.5","aria-hidden":"true",children:l.icon}),
|
|
18
18
|
/* @__PURE__ */y("span",{className:"max-w-[8rem] truncate",children:l.label}),
|
|
19
|
-
/* @__PURE__ */y(n,{count:a,label:
|
|
20
|
-
/* @__PURE__ */y("span",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 z-[2] h-0.5 bg-blue-500"})]},`rosh-group-${d}`))}return ke||he.push(/* @__PURE__ */y(m,{children:
|
|
19
|
+
/* @__PURE__ */y(n,{count:a,label:L.tabs(a),active:!0})]}),Q?.key===d&&"before"===Q.side&&/* @__PURE__ */y("span",{"aria-hidden":"true",className:re("before")}),r.map((e,t)=>ye(e,t>0?r[t-1]:void 0)),
|
|
20
|
+
/* @__PURE__ */y("span",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 z-[2] h-0.5 bg-blue-500"})]},`rosh-group-${d}`))}return ke||he.push(/* @__PURE__ */y(m,{children:_},"rosh-after-pinned")),/* @__PURE__ */p("div",{className:T??"relative flex h-10 shrink-0 items-end gap-3 bg-gray-100 px-3",children:[
|
|
21
21
|
/* @__PURE__ */y("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 h-px bg-gray-200"}),
|
|
22
|
-
/* @__PURE__ */y("div",{role:"tablist","aria-label":
|
|
22
|
+
/* @__PURE__ */y("div",{role:"tablist","aria-label":M,onKeyDown:e=>{const t=q.findIndex(t=>document.getElementById(f(t.key,"tab"))===e.target);if(t<0)return;const n=e.shiftKey&&(e.ctrlKey||e.metaKey);if(n&&"ArrowRight"===e.key)de(t,1);else if(n&&"ArrowLeft"===e.key)de(t,-1);else if("ArrowRight"===e.key)se(t+1);else if("ArrowLeft"===e.key)se(t-1);else if("Home"===e.key)se(0);else if("End"===e.key)se(q.length-1);else{if("Delete"!==e.key||q[t].pinned)return;D(q[t].key)}e.preventDefault()},className:"flex min-w-0 flex-1 items-end overflow-x-auto overflow-y-hidden [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:he}),E&&/* @__PURE__ */y("div",{className:"flex shrink-0 items-center gap-2 self-center",children:E}),P&&ce&&/* @__PURE__ */p(r,{portal:!0,style:{left:P.x,top:P.y},onClose:()=>Z(null),children:[ue.length>0&&/* @__PURE__ */p(h,{children:[ue.map((e,t)=>/* @__PURE__ */p(i,{onClick:pe(e.onSelect),children:[e.icon,e.label]},t)),
|
|
23
23
|
/* @__PURE__ */y(l,{})]}),
|
|
24
|
-
/* @__PURE__ */y(i,{disabled:ce.pinned,onClick:pe(()=>D(ce.key)),children:
|
|
24
|
+
/* @__PURE__ */y(i,{disabled:ce.pinned,onClick:pe(()=>D(ce.key)),children:X.close}),
|
|
25
25
|
/* @__PURE__ */y(l,{}),
|
|
26
|
-
/* @__PURE__ */y(i,{disabled:!fe(e.filter(e=>e.key!==ce.key)),onClick:pe(()=>j("others",ce.key)),children:
|
|
27
|
-
/* @__PURE__ */y(i,{disabled:!fe(e.slice(me+1)),onClick:pe(()=>j("right",ce.key)),children:
|
|
28
|
-
/* @__PURE__ */y(i,{disabled:!fe(e),onClick:pe(()=>j("all",null)),children:
|
|
26
|
+
/* @__PURE__ */y(i,{disabled:!fe(e.filter(e=>e.key!==ce.key)),onClick:pe(()=>j("others",ce.key)),children:X.closeOthers}),
|
|
27
|
+
/* @__PURE__ */y(i,{disabled:!fe(e.slice(me+1)),onClick:pe(()=>j("right",ce.key)),children:X.closeRight}),
|
|
28
|
+
/* @__PURE__ */y(i,{disabled:!fe(e),onClick:pe(()=>j("all",null)),children:X.closeAll})]})]})}export{z as TabStrip};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Markdown as e}from"./chunk-
|
|
1
|
+
import{Markdown as e}from"./chunk-DPDRFLBY.js";import{PLACEHOLDER_INK as t}from"./chunk-AYZY3YNC.js";import{Icon as l}from"./chunk-FSPFV4MI.js";import{LoadingSpinner as r}from"./chunk-R2VKEMZH.js";import{useShellStrings as s}from"./chunk-X2PZMXDP.js";import{useState as a,useMemo as n}from"react";import{jsxs as i,jsx as o,Fragment as c}from"react/jsx-runtime";var d=({open:e})=>/* @__PURE__ */o(l,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 transition-transform "+(e?"rotate-90":""),"aria-hidden":"true"});function h({docs:h,loading:m=!1,categoryOrder:p,canEdit:u=!1,onNew:g,onEdit:x,renderBody:f,emptyMessage:b}){const y=s(),[v,N]=a(""),[w,k]=a(null),[C,j]=a({}),M=v.trim().toLowerCase(),L=n(()=>{const e=/* @__PURE__ */new Map;for(const t of h){let l=e.get(t.category);l||(l={key:t.category,label:t.category_label||t.category,docs:[]},e.set(t.category,l)),l.docs.push(t)}if(!p?.length)return[...e.values()];const t=new Map(p.map((e,t)=>[e,t]));return[...e.values()].sort((e,l)=>(t.get(e.key)??1/0)-(t.get(l.key)??1/0))},[h,p]),P=e=>!M||e.title.toLowerCase().includes(M)||e.body.toLowerCase().includes(M)||e.category_label.toLowerCase().includes(M),_=n(()=>L.map(e=>({...e,docs:e.docs.filter(P)})).filter(e=>e.docs.length>0),[L,M]),Y=n(()=>_.flatMap(e=>e.docs),[_]),A=(w?Y.find(e=>e.slug===w):void 0)??Y[0]??null,B=e=>!!M||(C[e]??e===A?.category);/* @__PURE__ */
|
|
2
2
|
return i("div",{className:"flex h-full gap-4 px-4 py-3 min-h-0",children:[
|
|
3
3
|
/* @__PURE__ */i("aside",{className:"w-64 shrink-0 flex flex-col bg-white rounded-lg shadow overflow-hidden",children:[
|
|
4
4
|
/* @__PURE__ */i("div",{className:"flex items-center justify-between gap-2 px-3 py-2 border-b border-gray-200 bg-gray-50 shrink-0",children:[
|
|
@@ -6,16 +6,16 @@ return i("div",{className:"flex h-full gap-4 px-4 py-3 min-h-0",children:[
|
|
|
6
6
|
/* @__PURE__ */o("div",{className:"px-3 py-2 border-b border-line-subtle shrink-0",children:/* @__PURE__ */i("div",{className:"relative",children:[
|
|
7
7
|
/* @__PURE__ */o(l,{name:"search",look:"mini",className:`pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 ${t}`,"aria-hidden":"true"}),
|
|
8
8
|
/* @__PURE__ */o("input",{type:"text",value:v,onChange:e=>N(e.target.value),placeholder:y.help.searchPlaceholder,className:"w-full rounded-md border border-line-strong bg-surface h-8 pl-8 pr-2 text-sm shadow-sm focus:border-blue-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-accent)]"})]})}),
|
|
9
|
-
/* @__PURE__ */o("div",{className:"flex-1 overflow-y-auto py-1",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"py-6",label:y.help.loading}):0===
|
|
9
|
+
/* @__PURE__ */o("div",{className:"flex-1 overflow-y-auto py-1",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"py-6",label:y.help.loading}):0===_.length?/* @__PURE__ */o("p",{className:"px-3 py-6 text-center text-xs text-gray-500",children:M?y.help.noResults:b??y.help.empty}):_.map(e=>{const t=B(e.key);/* @__PURE__ */
|
|
10
10
|
return i("div",{className:"py-0.5",children:[
|
|
11
|
-
/* @__PURE__ */i("button",{type:"button",onClick:()=>{return t=e.key,j(e=>({...e,[t]:!
|
|
11
|
+
/* @__PURE__ */i("button",{type:"button",onClick:()=>{return t=e.key,j(e=>({...e,[t]:!B(t)}));var t},className:"w-full flex items-center gap-2 h-8 px-3 text-left text-3xs font-semibold uppercase tracking-wide text-ink-faintest hover:text-gray-600",children:[
|
|
12
12
|
/* @__PURE__ */o(d,{open:t}),
|
|
13
|
-
/* @__PURE__ */o("span",{className:"truncate",children:e.label})]}),t&&e.docs.map(e=>{const t=
|
|
13
|
+
/* @__PURE__ */o("span",{className:"truncate",children:e.label})]}),t&&e.docs.map(e=>{const t=A?.slug===e.slug;/* @__PURE__ */
|
|
14
14
|
return i("button",{type:"button",onClick:()=>k(e.slug),className:"w-full text-left pl-8 pr-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 transition-colors "+(t?"bg-blue-50 text-blue-700 font-medium":"text-gray-700 hover:bg-gray-50"),children:[
|
|
15
15
|
/* @__PURE__ */o("span",{className:"truncate",children:e.title}),!1===e.is_published&&/* @__PURE__ */o("span",{className:"ml-auto shrink-0 text-2xs text-amber-600",children:y.help.draft})]},e.slug)})]},e.key)})})]}),
|
|
16
|
-
/* @__PURE__ */o("main",{className:"flex-1 min-w-0 bg-white rounded-lg shadow overflow-hidden flex flex-col",children:
|
|
16
|
+
/* @__PURE__ */o("main",{className:"flex-1 min-w-0 bg-white rounded-lg shadow overflow-hidden flex flex-col",children:A?/* @__PURE__ */i(c,{children:[
|
|
17
17
|
/* @__PURE__ */i("div",{className:"flex items-start justify-between gap-4 px-5 py-3 border-b border-gray-200 bg-gray-50 shrink-0",children:[
|
|
18
18
|
/* @__PURE__ */i("div",{className:"min-w-0",children:[
|
|
19
|
-
/* @__PURE__ */o("h1",{className:"text-lg font-semibold text-gray-900 truncate",children:
|
|
20
|
-
/* @__PURE__ */i("p",{className:"text-xs text-gray-500 mt-0.5",children:[
|
|
21
|
-
/* @__PURE__ */o("div",{className:"flex-1 overflow-auto px-5 py-4",children:f?f(
|
|
19
|
+
/* @__PURE__ */o("h1",{className:"text-lg font-semibold text-gray-900 truncate",children:A.title}),
|
|
20
|
+
/* @__PURE__ */i("p",{className:"text-xs text-gray-500 mt-0.5",children:[A.category_label,!1===A.is_published&&/* @__PURE__ */i("span",{className:"ml-2 text-amber-600",children:["· ",y.help.draft]})]})]}),u&&x&&/* @__PURE__ */o("button",{type:"button",onClick:()=>x(A),className:"shrink-0 text-sm text-blue-600 hover:underline",children:y.help.edit})]}),
|
|
21
|
+
/* @__PURE__ */o("div",{className:"flex-1 overflow-auto px-5 py-4",children:f?f(A):A.body?/* @__PURE__ */o(e,{children:A.body}):/* @__PURE__ */o("p",{className:"text-sm text-gray-500 italic",children:y.help.noBody})})]}):/* @__PURE__ */o("div",{className:"flex-1 flex items-center justify-center px-6 text-center",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"",label:y.help.loading}):/* @__PURE__ */o("p",{className:"text-sm text-ink-faint",children:y.help.pickArticle})})})]})}export{h as HelpCenter};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{parseFocal as e,formatFocal as t,nudgeFocal as n,focalFromRect as a}from"./chunk-25RR3GQW.js";import{useShellStrings as r}from"./chunk-
|
|
2
|
-
return i("div",{"data-image-focus":"",className:y||void 0,children:/* @__PURE__ */i("p",{className:"text-xs text-ink-faint",children:x??N.noImage})});const
|
|
1
|
+
import{parseFocal as e,formatFocal as t,nudgeFocal as n,focalFromRect as a}from"./chunk-25RR3GQW.js";import{useShellStrings as r}from"./chunk-X2PZMXDP.js";import{useId as o,useRef as s}from"react";import{jsx as i,jsxs as l}from"react/jsx-runtime";var c={background:"color-mix(in srgb, var(--status-on-solid) 45%, transparent)"},u={borderColor:"var(--status-on-solid)",boxShadow:"0 0 0 1px var(--rosh-media-scrim-button), 0 1px 4px var(--rosh-media-scrim-button)"};function d({value:d,onChange:m,label:f,image:p,hint:h,emptyText:x,actions:b,disabled:g=!1,id:v,className:y=""}){const N=r().imageFocus,w=o(),k=s(null),P=s(!1),{x:j,y:C}=e(d),K=t(j,C),$=e=>{e!==d&&m(e)},D=(e,n)=>{const r=k.current?.getBoundingClientRect();if(!r)return;const o=a(r,e,n);$(t(o.x,o.y))},X=()=>{P.current=!1};if(!p)/* @__PURE__ */
|
|
2
|
+
return i("div",{"data-image-focus":"",className:y||void 0,children:/* @__PURE__ */i("p",{className:"text-xs text-ink-faint",children:x??N.noImage})});const R=void 0===h,T=null!==h;/* @__PURE__ */
|
|
3
3
|
return l("div",{"data-image-focus":"",className:`flex flex-col gap-2 ${y}`.trim(),children:[
|
|
4
|
-
/* @__PURE__ */i("button",{id:v,type:"button","data-image-focus-picture":"",disabled:g,"aria-label":N.picture(f,K),"aria-describedby":w,onKeyDown:e=>{if(g||e.altKey||e.ctrlKey||e.metaKey)return;const t=n(d,e.key,e.shiftKey);null!==t&&(e.preventDefault(),$(t))},onPointerDown:e=>{g||0!==e.button||(e.currentTarget.setPointerCapture?.(e.pointerId),e.currentTarget.focus({preventScroll:!0}),P.current=!0,D(e.clientX,e.clientY))},onPointerMove:e=>{P.current&&!g&&D(e.clientX,e.clientY)},onPointerUp:
|
|
4
|
+
/* @__PURE__ */i("button",{id:v,type:"button","data-image-focus-picture":"",disabled:g,"aria-label":N.picture(f,K),"aria-describedby":w,onKeyDown:e=>{if(g||e.altKey||e.ctrlKey||e.metaKey)return;const t=n(d,e.key,e.shiftKey);null!==t&&(e.preventDefault(),$(t))},onPointerDown:e=>{g||0!==e.button||(e.currentTarget.setPointerCapture?.(e.pointerId),e.currentTarget.focus({preventScroll:!0}),P.current=!0,D(e.clientX,e.clientY))},onPointerMove:e=>{P.current&&!g&&D(e.clientX,e.clientY)},onPointerUp:X,onPointerCancel:X,onLostPointerCapture:X,className:["flex min-h-36 w-full touch-none items-center justify-center overflow-hidden rounded-md border border-line bg-surface-sunken p-0","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",g?"cursor-not-allowed opacity-60":"cursor-crosshair"].join(" "),children:/* @__PURE__ */l("span",{ref:k,"data-image-focus-pane":"",className:"relative block max-w-full",children:[
|
|
5
5
|
/* @__PURE__ */i("img",{src:p,alt:"",draggable:!1,className:"block h-auto max-h-36 w-auto max-w-full select-none object-contain"}),
|
|
6
6
|
/* @__PURE__ */i("span",{"aria-hidden":"true","data-image-focus-cross":"h",className:"pointer-events-none absolute inset-x-0 h-px",style:{top:`${C}%`,...c}}),
|
|
7
7
|
/* @__PURE__ */i("span",{"aria-hidden":"true","data-image-focus-cross":"v",className:"pointer-events-none absolute inset-y-0 w-px",style:{left:`${j}%`,...c}}),
|
|
8
|
-
/* @__PURE__ */i("span",{"aria-hidden":"true","data-image-focus-dot":"",className:"pointer-events-none absolute h-4 w-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2",style:{left:`${j}%`,top:`${C}%`,...u}})]})}),
|
|
8
|
+
/* @__PURE__ */i("span",{"aria-hidden":"true","data-image-focus-dot":"",className:"pointer-events-none absolute h-4 w-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2",style:{left:`${j}%`,top:`${C}%`,...u}})]})}),T||b?/* @__PURE__ */l("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */i("span",T?{id:R?w:void 0,className:"min-w-0 flex-1 text-xs text-ink-faint",children:R?N.hint:h}:{className:"min-w-0 flex-1"}),b]}):null,!R&&/* @__PURE__ */i("span",{id:w,className:"sr-only",children:N.hint})]})}export{d as ImageFocusPoint};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useOverlayTarget as e,OverlayLayerProvider as r}from"./chunk-4AJRHTTB.js";import{dialogA11y as i}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as t}from"./chunk-PKXQDCNR.js";import{useFocusTrap as a,useScrollLock as o}from"./chunk-CDAJKLGL.js";import{Icon as l}from"./chunk-FSPFV4MI.js";import{Z_LAYERS as s}from"./chunk-62LW225J.js";import{useHydrated as n}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as d}from"./chunk-TWVUQUUD.js";import{useShellStrings as c}from"./chunk-
|
|
2
|
-
/* @__PURE__ */x(r,{value:H,children:/* @__PURE__ */b("div",{ref:K,className:"fixed inset-0"+(
|
|
1
|
+
import{useOverlayTarget as e,OverlayLayerProvider as r}from"./chunk-4AJRHTTB.js";import{dialogA11y as i}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as t}from"./chunk-PKXQDCNR.js";import{useFocusTrap as a,useScrollLock as o}from"./chunk-CDAJKLGL.js";import{Icon as l}from"./chunk-FSPFV4MI.js";import{Z_LAYERS as s}from"./chunk-62LW225J.js";import{useHydrated as n}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as d}from"./chunk-TWVUQUUD.js";import{useShellStrings as c}from"./chunk-X2PZMXDP.js";import{useRef as m,useId as u,useState as f,useEffect as h}from"react";import{createPortal as p}from"react-dom";import{jsx as x,jsxs as b}from"react/jsx-runtime";var g={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-4xl","2xl":"max-w-6xl"};function v({open:v,onClose:y,title:k,description:j,role:N="dialog",children:w,footer:C,blocking:D=!1,size:T="md",aside:W=!1,initialFocus:J,"aria-label":L,"aria-labelledby":P,"aria-describedby":A,className:F=""}){const I=m(null),U=u(),V=u(),X=!D,z=u(),B=c().dialog,G=e(n()),[H,K]=f(null);return t(v),a(I,v&&null!==G,J),o(v),h(()=>{if(v)return d(()=>(D||y(),!0),()=>I.current)},[v,D,y]),v&&G?p(
|
|
2
|
+
/* @__PURE__ */x(r,{value:H,children:/* @__PURE__ */b("div",{ref:K,className:"fixed inset-0"+(W?" pointer-events-none opacity-0":""),style:{zIndex:s.overlay},role:"presentation","data-aside":W?"":void 0,children:[
|
|
3
3
|
/* @__PURE__ */x("div",{className:"fixed inset-0 bg-black/30","aria-hidden":"true"}),
|
|
4
|
-
/* @__PURE__ */x("div",{className:"fixed inset-0 flex items-center justify-center p-4",onClick:
|
|
4
|
+
/* @__PURE__ */x("div",{className:"fixed inset-0 flex items-center justify-center p-4",onClick:D?void 0:e=>{e.target===e.currentTarget&&y()},children:/* @__PURE__ */b("div",{ref:I,...i({role:N,modal:!0,titleId:k?z:void 0,labelledBy:P,label:L}),"aria-describedby":A??(j?V:w?U:void 0),className:`relative max-h-full w-full ${g[T]} overflow-y-auto overscroll-contain rounded-(--radius-card) bg-white p-6 shadow-xl ${F}`.trim(),children:[k&&/* @__PURE__ */x("h2",{id:z,className:(X?"pr-8 ":"")+"text-base font-semibold text-gray-900",children:k}),j&&/* @__PURE__ */x("p",{id:V,className:((k?"mt-1":X?"pr-8":"")+" text-sm text-gray-500").trim(),children:j}),w&&/* @__PURE__ */x("div",{id:U,className:"mt-2 text-sm text-gray-600",children:w}),C&&/* @__PURE__ */x("div",{className:"mt-6 flex flex-wrap justify-end gap-3",children:C}),X&&/* @__PURE__ */x("button",{type:"button",onClick:y,"aria-label":B.close,className:"absolute right-3 top-3 rounded-(--radius-control) p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */x(l,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})]})})]})}),G):null}export{v as Dialog};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Tabs as e}from"./chunk-A6RB4PIX.js";import{Card as a}from"./chunk-
|
|
1
|
+
import{Tabs as e}from"./chunk-A6RB4PIX.js";import{Card as a}from"./chunk-CBGKLHPB.js";import{StatusBadgeProvider as r,StatusBadge as t}from"./chunk-LNARMEEZ.js";import{Button_default as l}from"./chunk-NHH2MXFU.js";import{useState as i}from"react";import{jsx as d,jsxs as s}from"react/jsx-runtime";var n={featured:"success",new:"active",draft:"draft"},c=["linear-gradient(135deg,#60a5fa,#a78bfa)","linear-gradient(135deg,#34d399,#10b981)","linear-gradient(135deg,#fbbf24,#f59e0b)","linear-gradient(135deg,#f472b6,#ec4899)","linear-gradient(135deg,#38bdf8,#6366f1)","linear-gradient(135deg,#fb7185,#ef4444)","linear-gradient(135deg,#4ade80,#22c55e)","linear-gradient(135deg,#c084fc,#8b5cf6)"].map((e,a)=>({id:a,title:["Sunrise","Forest","Desert","Bloom","Ocean","Ember","Meadow","Dusk"][a],tag:["featured","new","draft"][a%3],bg:e}));function m(){const[m,g]=i("all"),f="all"===m?c:c.filter(e=>e.tag===m);/* @__PURE__ */
|
|
2
2
|
return d(r,{groups:n,children:/* @__PURE__ */d("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */s("div",{className:"mx-auto max-w-5xl space-y-4",children:[
|
|
3
3
|
/* @__PURE__ */s("div",{className:"flex items-center justify-between gap-4",children:[
|
|
4
4
|
/* @__PURE__ */d("h1",{className:"text-xl font-semibold text-gray-900",children:"Gallery"}),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Tooltip as e}from"./chunk-BCDG4N6L.js";import{useBrowserLayoutEffect as r}from"./chunk-D65T4H6J.js";import{useShellStrings as t}from"./chunk-
|
|
1
|
+
import{Tooltip as e}from"./chunk-BCDG4N6L.js";import{useBrowserLayoutEffect as r}from"./chunk-D65T4H6J.js";import{useShellStrings as t}from"./chunk-X2PZMXDP.js";import{useRef as o,useEffect as n,useCallback as i}from"react";import{jsx as s}from"react/jsx-runtime";var a=(e,r,t)=>Math.min(t,Math.max(r,e));function l(e,r,t,o,n){return Math.round(a("left"===t||"top"===t?e+r:e-r,o,n))}function u(e,r,t){let o=null;try{o=window.localStorage.getItem(e)}catch{return null}const n=o?parseInt(o,10):NaN;return Number.isNaN(n)?null:a(n,r,t)}function c({width:c,onResize:d,orientation:h="vertical",side:m,min:f,max:p,defaultWidth:v=f,step:g=16,storageKey:b,label:w,hint:z,controls:y,className:x=""}){const P="horizontal"===h,N=t().resizeHandle,k=o(null),D=o({onResize:d,min:f,max:p,side:m});D.current={onResize:d,min:f,max:p,side:m},r(()=>{if(!b)return;const e=u(b,f,p);null!==e&&e!==c&&d(e)},[b]),n(()=>{if(!b)return;const e=window.setTimeout(()=>{try{window.localStorage.setItem(b,String(Math.round(c)))}catch{}},200);return()=>window.clearTimeout(e)},[c,b]);const M=i(()=>{k.current=null,document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")},[]);n(()=>M,[M]);const C=e=>{k.current&&(e.currentTarget.hasPointerCapture?.(k.current.pointer)&&e.currentTarget.releasePointerCapture(k.current.pointer),M())},I="left"===m?"right-0":"right"===m?"left-0":"top"===m?"bottom-0":"top-0",T="left"===m?"right":"right"===m?"left":"top"===m?"bottom":"top",$=P?`absolute inset-x-0 ${I} z-10 flex h-2`:`absolute inset-y-0 ${I} z-10 flex w-2`;/* @__PURE__ */
|
|
2
2
|
return s(e,{content:z??N.hint,side:T,delay:600,className:`${$} ${x}`.trim(),children:/* @__PURE__ */s("div",{role:"separator",tabIndex:0,"aria-orientation":h,"aria-label":w??N.label,"aria-valuenow":Math.round(c),"aria-valuemin":f,"aria-valuemax":p,"aria-controls":y,"data-resize-handle":m,onPointerDown:e=>{0===e.button&&(e.preventDefault(),k.current={x:P?e.clientY:e.clientX,width:c,moved:!1,pointer:e.pointerId},e.currentTarget.setPointerCapture?.(e.pointerId),document.body.style.cursor=P?"row-resize":"col-resize",document.body.style.userSelect="none")},onPointerMove:e=>{const r=k.current;if(!r)return;if(0===e.buttons)return void M();const t=(P?e.clientY:e.clientX)-r.x;if(!r.moved){if(Math.abs(t)<3)return;r.moved=!0}const{onResize:o,min:n,max:i,side:s}=D.current;o(l(r.width,t,s,n,i))},onPointerUp:C,onPointerCancel:C,onLostPointerCapture:()=>{k.current&&M()},onDoubleClick:()=>d(a(v,f,p)),onKeyDown:e=>{const r=P?"ArrowDown":"ArrowRight",t=P?"ArrowUp":"ArrowLeft",o=e.key===r?g:e.key===t?-g:null,n=null!==o?l(c,o,m,f,p):"Home"===e.key?f:"End"===e.key?p:"Enter"===e.key?a(v,f,p):null;null!==n&&(e.preventDefault(),n!==c&&d(n))},className:P?"group/resize relative h-full w-full cursor-row-resize touch-none rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"group/resize relative h-full w-full cursor-col-resize touch-none rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */s("div",{"aria-hidden":"true",className:P?`absolute inset-x-0 ${I} h-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))] group-focus-visible/resize:h-0.5 group-focus-visible/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`:`absolute inset-y-0 ${I} w-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))] group-focus-visible/resize:w-0.5 group-focus-visible/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`})})})}export{c as ResizeHandle,u as readStoredWidth,l as resizedWidth};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{useShellStrings as l,useShellLocale as e,DEFAULT_SHELL_STRINGS as t}from"./chunk-
|
|
1
|
+
import{useShellStrings as l,useShellLocale as e,DEFAULT_SHELL_STRINGS as t}from"./chunk-X2PZMXDP.js";import{formatPercent as n}from"./chunk-C3QOHMR6.js";import{jsxs as a,jsx as u}from"react/jsx-runtime";function s(l){return null!=l&&Number.isFinite(l)&&l>=0?l:null}function i(l,e){const t=s(l);if(null==t)return"no-reading";const n=s(e);return null==n||0===n?"no-budget":t>n?"over":"within"}var r=l=>Math.min(100,Math.max(0,l));function m({label:m,elapsed:o,budget:d,grace:c,detail:f,formatDuration:h,formatValue:x,pace:b,emptyLabel:g,noBudgetLabel:p,size:v="sm",ariaLabel:N,className:y=""}){const w=l().meter,M=e(),$=x??h??(l=>function(l,e=t.meter){const n=Math.round(l),a=Math.floor(n/3600),u=Math.floor(n%3600/60),s=n%60;return a>0?e.hoursMinutes(a,u):u>0?e.minutesSeconds(u,s):e.seconds(s)}(l,w)),k=g??w.noReading,j=p??w.noBudget,B=s(o),L=s(d),D=null!=L&&L>0?L:null,P=s(c)??0,R="over"===i(o,d),X=null!=D?D+P:null,z=null!=D&&null!=X?r(D/X*100):null,C=R&&P>0,F=null==X||null==B?0:R?C?z??0:0:r(B/X*100),H=C?z??0:0,O=R?C&&null!=X&&null!=B?r(B/X*100):100:0,Q=Math.max(0,O-H),S=s(b),V=null!=S&&null!=X?r(S/X*100):null,Z=null!=B&&null!=D?B/D*100:null,q=null!=Z?n(Math.round(Z),0,M):null!=B?$(B):"—",A=f??(null==B?k:null==D?j:`${$(B)} / ${$(D)}`),E="md"===v?"h-2":"h-1.5",G=R?"text-red-600":null!=B?"text-gray-900":"text-gray-400",I=null!=B&&null!=D&&null!=X?/* @__PURE__ */a("div",{role:"meter","aria-label":N??("string"==typeof m?m:void 0),"aria-valuemin":0,"aria-valuemax":X,"aria-valuenow":Math.min(X,B),"aria-valuetext":w.ofBudget(q),className:`relative mt-2 ${E} overflow-hidden rounded-full bg-gray-200`,children:[(!R||C)&&/* @__PURE__ */u("div",{className:"absolute inset-y-0 left-0 rounded-full bg-blue-600",style:{width:`${F}%`}}),Q>0&&/* @__PURE__ */u("div",{className:"rosh-budget-overrun absolute inset-y-0",style:{left:`${H}%`,width:`${Q}%`}}),P>0&&null!=z&&/* @__PURE__ */u("div",{title:w.budget,className:"absolute inset-y-0 w-0.5 bg-gray-700",style:{left:`${z}%`}}),null!=V&&/* @__PURE__ */u("div",{title:w.pace,"data-pace":"true",className:"absolute inset-y-0 w-0.5 -translate-x-1/2 bg-gray-700",style:{left:`${V}%`}})]}):null;/* @__PURE__ */
|
|
2
2
|
return a("div","md"===v?{className:y,children:[null!=m&&/* @__PURE__ */u("div",{className:"text-3xs font-medium uppercase tracking-wide text-ink-faint",children:m}),
|
|
3
3
|
/* @__PURE__ */a("div",{className:"mt-1 flex items-baseline gap-2",children:[
|
|
4
|
-
/* @__PURE__ */u("span",{className:`text-2xl font-semibold leading-[30px] tabular-nums ${G}`,children:
|
|
5
|
-
/* @__PURE__ */u("span",{className:"min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:
|
|
4
|
+
/* @__PURE__ */u("span",{className:`text-2xl font-semibold leading-[30px] tabular-nums ${G}`,children:q}),
|
|
5
|
+
/* @__PURE__ */u("span",{className:"min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:A})]}),I]}:{className:y,children:[
|
|
6
6
|
/* @__PURE__ */a("div",{className:"flex items-baseline gap-2",children:[null!=m&&/* @__PURE__ */u("span",{className:"w-14 shrink-0 truncate text-3xs font-medium uppercase tracking-wide text-ink-faint",children:m}),
|
|
7
|
-
/* @__PURE__ */u("span",{className:`text-sm font-semibold tabular-nums ${G}`,children:
|
|
8
|
-
/* @__PURE__ */u("span",{className:"ml-auto min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:
|
|
7
|
+
/* @__PURE__ */u("span",{className:`text-sm font-semibold tabular-nums ${G}`,children:q}),
|
|
8
|
+
/* @__PURE__ */u("span",{className:"ml-auto min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:A})]}),I]})}export{m as BudgetBar,i as budgetState};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{resolveSeriesColor as t,CHART_INK as e}from"./chunk-TZFACUMR.js";import{useShellStrings as r}from"./chunk-
|
|
2
|
-
return n("rect",{x:y(e)-4.5,y:0,width:9,height:u,rx:3,fill:v,className:"cursor-ew-resize rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",tabIndex:0,role:"slider","aria-label":"from"===t?d.windowStart:d.windowEnd,"aria-valuemin":0,"aria-valuemax":p,"aria-valuenow":e,"aria-valuetext":a[e],style:{touchAction:"none"},onKeyDown:j(t),onPointerDown:A(t),onPointerMove:
|
|
1
|
+
import{resolveSeriesColor as t,CHART_INK as e}from"./chunk-TZFACUMR.js";import{useShellStrings as r}from"./chunk-X2PZMXDP.js";import{useRef as o}from"react";import{jsx as n,jsxs as i}from"react/jsx-runtime";function a({labels:a,data:l,range:h,onRangeChange:c,height:u=46,width:s=720,color:f,className:m}){const d=r().charts,g=o(null),p=a.length-1,[w,x]=h,v=f??t(0),y=t=>0===p?0:t/p*s,M=t=>"number"==typeof t&&Number.isFinite(t),$=l.filter(M),b=Math.max(...$,1),k=t=>u-t/b*(u-6),D=[];a.forEach((t,e)=>{if(!M(l[e]))return;const r=D[D.length-1];r&&r.to===e-1?r.to=e:D.push({from:e,to:e})});const P=D.map(t=>{const e=[];for(let r=t.from;r<=t.to;r+=1)e.push(`${r===t.from?"M":"L"}${y(r).toFixed(2)},${k(l[r]).toFixed(2)}`);return`${e.join(" ")} L${y(t.to).toFixed(2)},${u} L${y(t.from).toFixed(2)},${u} Z`}).join(" "),F=(t,e)=>{const r=Math.max(0,Math.min(p,e));c("from"===t?[Math.min(r,x-1),x]:[w,Math.max(r,w+1)])},j=t=>e=>{const r=e.shiftKey?5:1,o="from"===t?w:x;"ArrowLeft"===e.key&&(e.preventDefault(),F(t,o-r)),"ArrowRight"===e.key&&(e.preventDefault(),F(t,o+r)),"Home"===e.key&&(e.preventDefault(),F(t,0)),"End"===e.key&&(e.preventDefault(),F(t,p))},C=o(null),A=t=>e=>{C.current=t,e.currentTarget.setPointerCapture(e.pointerId)},L=t=>e=>{C.current===t&&F(t,(t=>{const e=g.current?.getBoundingClientRect();if(!e||0===e.width)return w;const r=Math.max(0,Math.min(1,(t-e.left)/e.width));return Math.round(r*p)})(e.clientX))},N=t=>()=>{C.current===t&&(C.current=null)},R=t=>{const e="from"===t?w:x;/* @__PURE__ */
|
|
2
|
+
return n("rect",{x:y(e)-4.5,y:0,width:9,height:u,rx:3,fill:v,className:"cursor-ew-resize rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",tabIndex:0,role:"slider","aria-label":"from"===t?d.windowStart:d.windowEnd,"aria-valuemin":0,"aria-valuemax":p,"aria-valuenow":e,"aria-valuetext":a[e],style:{touchAction:"none"},onKeyDown:j(t),onPointerDown:A(t),onPointerMove:L(t),onPointerUp:N(t),onPointerCancel:N(t)},t)};/* @__PURE__ */
|
|
3
3
|
return n("div",{className:m,children:/* @__PURE__ */i("svg",{ref:g,width:"100%",height:u,viewBox:`0 0 ${s} ${u}`,role:"group","aria-label":d.window(a[w],a[x],a.length),children:[
|
|
4
|
-
/* @__PURE__ */n("path",{d:
|
|
4
|
+
/* @__PURE__ */n("path",{d:P,fill:e.grid}),
|
|
5
5
|
/* @__PURE__ */n("rect",{x:0,y:0,width:y(w),height:u,fill:e.surface,fillOpacity:.72}),
|
|
6
6
|
/* @__PURE__ */n("rect",{x:y(x),y:0,width:Math.max(0,s-y(x)),height:u,fill:e.surface,fillOpacity:.72}),
|
|
7
|
-
/* @__PURE__ */n("rect",{x:y(w),y:0,width:Math.max(1,y(x)-y(w)),height:u,fill:"none",stroke:v,strokeWidth:1}),
|
|
7
|
+
/* @__PURE__ */n("rect",{x:y(w),y:0,width:Math.max(1,y(x)-y(w)),height:u,fill:"none",stroke:v,strokeWidth:1}),R("from"),R("to")]})})}export{a as ChartBrush};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{nextEnabledIndex as e}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as t,filterOptionItems as n,optionMatches as r,groupedRows as l,OptionCheck as o,OptionSublabel as i}from"./chunk-5F7HMNCX.js";import{INPUT_BASE_ON as a,INPUT_BASE as s}from"./chunk-AYZY3YNC.js";import{Button_default as u}from"./chunk-NHH2MXFU.js";import{LoadingSpinner as c}from"./chunk-R2VKEMZH.js";import{Tooltip as d}from"./chunk-BCDG4N6L.js";import{onOverlayOpen as h}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as p}from"./chunk-62LW225J.js";import{useDropdownPosition as m,MENU_MAX_HEIGHT as f}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as b}from"./chunk-D65T4H6J.js";import{GLASS_DIVIDER as g,glassStyle as v}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{useShellStrings as w}from"./chunk-
|
|
2
|
-
return S("button",{type:"button","aria-label":t,onMouseDown:t=>{t.preventDefault(),t.stopPropagation(),e()},className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity text-base leading-none",children:"×"})}function R(R){const{options:F,placeholder:L,emptyOptionLabel:E,className:T="",disabled:z,id:H,filter:
|
|
3
|
-
return C("div",{ref:ye,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&(ye.current?.contains(t)||xe.current?.contains(t))||Ne.current||document.activeElement!==we.current&&je(!0)},children:[(Ve=/* @__PURE__ */S("input",{id:de,ref:we,type:"text",autoComplete:"off",role:"combobox","aria-expanded":ie,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-controls":ie?he:void 0,"aria-activedescendant":ie&&se>=0&&se<
|
|
4
|
-
/* @__PURE__ */S("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */S("span",{ref:He,className:"whitespace-pre"})}),Ee&&/* @__PURE__ */S(M,{ariaLabel:be.select.clear,onClear:()=>{ee([]),je(!1)}}),
|
|
5
|
-
/* @__PURE__ */C("div",{ref:xe,onMouseDownCapture:()=>{Ne.current=!0,setTimeout(()=>{Ne.current=!1},0)},className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:p.popup,left:We?.left,right:We?.right,top:We?.top,bottom:We?.bottom,minWidth:We?.minWidth,width:We?.width,...re&&{maxWidth:We?.maxWidth},visibility:We?void 0:"hidden",...v()},children:[
|
|
1
|
+
import{nextEnabledIndex as e}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as t,filterOptionItems as n,optionMatches as r,groupedRows as l,OptionCheck as o,OptionSublabel as i}from"./chunk-5F7HMNCX.js";import{INPUT_BASE_ON as a,INPUT_BASE as s}from"./chunk-AYZY3YNC.js";import{Button_default as u}from"./chunk-NHH2MXFU.js";import{LoadingSpinner as c}from"./chunk-R2VKEMZH.js";import{Tooltip as d}from"./chunk-BCDG4N6L.js";import{onOverlayOpen as h}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as p}from"./chunk-62LW225J.js";import{useDropdownPosition as m,MENU_MAX_HEIGHT as f}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as b}from"./chunk-D65T4H6J.js";import{GLASS_DIVIDER as g,glassStyle as v}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{useShellStrings as w}from"./chunk-X2PZMXDP.js";import{useState as x,useId as k,useRef as $,useMemo as N,useEffect as j}from"react";import{createPortal as D}from"react-dom";import{jsxs as C,jsx as S}from"react/jsx-runtime";function W(e,t){const n=e.length;if(0===n||t(e.join(", ")))return{shown:n,cut:!1};if(1===n)return{shown:1,cut:!0};let r=0;for(let l=1;l<n&&t(`${e.slice(0,l).join(", ")} +${n-l}`);l+=1)r=l;return{shown:r,cut:!1}}function M({onClear:e,ariaLabel:t}){/* @__PURE__ */
|
|
2
|
+
return S("button",{type:"button","aria-label":t,onMouseDown:t=>{t.preventDefault(),t.stopPropagation(),e()},className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity text-base leading-none",children:"×"})}function R(R){const{options:F,placeholder:L,emptyOptionLabel:E,className:T="",disabled:z,id:H,filter:A=!1,allowFreeText:O=!1,freeTextOption:U,onSearchChange:B,loading:I=!1,error:X,onRetry:J,rightAdornment:P,renderOption:G,clearable:Y=!0,"aria-label":Z,"aria-labelledby":K,"aria-describedby":V}=R,Q=!0===R.multiple,q=R.multiple?R.value:R.value?[R.value]:[],_=R.multiple?"":R.value,ee=e=>{R.multiple?R.onChange(e):R.onChange(e[0]??"")},te=q.length>0,ne=A&&te&&!z,re=Q||A,le=null!=U,oe=O||le,[ie,ae]=x(!1),[se,ue]=x(-1),ce=k(),de=H??`${ce}-input`,he=`${ce}-listbox`,pe=e=>`${ce}-opt-${e}`,[me,fe]=x(""),be=w(),ge=E??be.select.none,ve=e=>{fe(e),ue(-1),B?.(e)},ye=$(null),we=$(null),xe=$(null),ke=$(null),$e=$(ie);$e.current=ie;const Ne=$(!1),je=e=>{$e.current&&($e.current=!1,e&&O&&!le&&Ye&&(Q?q.includes(Ye)||ee([...q,Ye]):Ye!==_&&ee([Ye])),ae(!1),ve(""))},De=(e,t)=>{if(!e.disabled){if(Q)return ee(q.includes(e.value)?q.filter(t=>t!==e.value):[...q,e.value]),void(e===Ze?ve(""):ue(t));ee([e.value]),je(!1)}},[Ce,Se]=x(null);b(()=>{if(!P||ie)return void Se(null);const e=ke.current?.offsetWidth??0;Se(e?e+(Ee?32:8)+6:null)});const We=m(we,ie,re?{popupRef:xe}:{matchTriggerWidth:!0}),Me=N(()=>t(F),[F]),Re=q.join("\0"),Fe=N(()=>{const e=[],t=/* @__PURE__ */new Set;for(const n of Me)q.includes(n.value)&&!t.has(n.value)&&(t.add(n.value),e.push(n.label));if(oe)for(const n of q)t.has(n)||e.push(n);return e},[Me,Re,oe]),Le=Fe.join(", "),Ee=Y&&te&&!z,[Te,ze]=x(null),He=$(null),Ae=$(""),Oe=$(()=>{});Oe.current=()=>{const e=we.current,t=He.current;if(!Q||!e||!t)return;const n=getComputedStyle(e),r=e.clientWidth-(parseFloat(n.paddingLeft)||0)-(parseFloat(n.paddingRight)||0),l=[n.fontStyle,n.fontWeight,n.fontSize,n.fontFamily,n.letterSpacing].join("|"),o=`${r}|${l}|${Fe.join("\0")}`;if(o===Ae.current)return;Ae.current=o;let i=null;r>0&&Fe.length>0&&(t.style.fontStyle=n.fontStyle,t.style.fontWeight=n.fontWeight,t.style.fontSize=n.fontSize,t.style.fontFamily=n.fontFamily,t.style.letterSpacing=n.letterSpacing,i=W(Fe,e=>(t.textContent=e,t.getBoundingClientRect().width<=r)),t.textContent=""),ze(e=>e?.shown===i?.shown&&e?.cut===i?.cut?e:i)},b(()=>{Oe.current()}),j(()=>{const e=we.current;if(!Q||!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Oe.current());return t.observe(e),()=>t.disconnect()},[Q]);const Ue=Fe.length,Be=!Q||!Te||Te.shown>=Ue?Le:0===Te.shown?be.select.selectedCount(Ue):`${Fe.slice(0,Te.shown).join(", ")} +${Ue-Te.shown}`,Ie=Q&&null!==Te&&(Te.shown<Ue||Te.cut),Xe=ie&&te&&re;j(()=>{if(!ie)return;const e=e=>{const t=e.target;ye.current?.contains(t)||xe.current?.contains(t)||je(!0)};document.addEventListener("mousedown",e);const t=h(()=>je(!0));return()=>{document.removeEventListener("mousedown",e),t()}},[ie,O,me,Re,R.onChange]),j(()=>{if(ie)return y(e=>!("Escape"!==e.key||!$e.current)&&(je(!1),we.current?.blur(),!0),()=>xe.current)},[ie]);const Je=N(()=>{const e=/* @__PURE__ */new Set;return n(F,t=>!e.has(t.value)&&(e.add(t.value),!0))},[F]),Pe=N(()=>{if(B)return Je;const e=me.trim().toLowerCase();return e?n(Je,t=>r(t,e)):Je},[Je,me,B]),Ge=N(()=>t(Pe),[Pe]),Ye=me.trim(),Ze=N(()=>le&&Ye?Me.some(e=>e.label===Ye)||q.includes(Ye)?null:{value:Ye,label:Ye}:null,[le,Ye,Me,Re]),Ke=N(()=>Ze?[...Ge,Ze]:Ge,[Ge,Ze]);/* @__PURE__ */
|
|
3
|
+
return C("div",{ref:ye,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&(ye.current?.contains(t)||xe.current?.contains(t))||Ne.current||document.activeElement!==we.current&&je(!0)},children:[(Ve=/* @__PURE__ */S("input",{id:de,ref:we,type:"text",autoComplete:"off",role:"combobox","aria-expanded":ie,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-controls":ie?he:void 0,"aria-activedescendant":ie&&se>=0&&se<Ke.length?pe(se):void 0,"aria-label":K?void 0:Z,"aria-labelledby":K,"aria-describedby":V,value:ie?me:Be,onChange:e=>{ve(e.target.value),ae(!0)},onFocus:()=>{z||(ve(""),ae(!0))},onKeyDown:t=>{if("ArrowDown"===t.key||"ArrowUp"===t.key){if(z)return;if(t.preventDefault(),!ie)return void ae(!0);if(0===Ke.length)return;const n="ArrowDown"===t.key?1:-1;return void ue(t=>e(Ke,t,n))}"Enter"===t.key?(t.preventDefault(),ie&&se>=0&&se<Ke.length?De(Ke[se],se):1!==Ge.length||Ge[0].disabled?O&&!le&&Ye&&(Q?(q.includes(Ye)||ee([...q,Ye]),ve("")):(ee([Ye]),je(!1),we.current?.blur())):De(Ge[0],0)):"Escape"===t.key?(je(!1),we.current?.blur()):"Tab"===t.key&&je(!0)},placeholder:Xe?Be:L||ge,className:`${ne?a:s} ${T} ${Ee?"pr-8":""} ${z?"bg-surface-sunken text-ink-faintest cursor-not-allowed":""} truncate${Xe?" rosh-field-shows-choice":""}`,style:Ce?{paddingRight:Ce}:void 0,disabled:z}),Q?/* @__PURE__ */S(d,{content:!ie&&Ie?Le:null,className:"block",children:Ve}):Ve),Q&&
|
|
4
|
+
/* @__PURE__ */S("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */S("span",{ref:He,className:"whitespace-pre"})}),Ee&&/* @__PURE__ */S(M,{ariaLabel:be.select.clear,onClear:()=>{ee([]),je(!1)}}),P&&!ie&&/* @__PURE__ */S("div",{ref:ke,className:`absolute top-1/2 -translate-y-1/2 ${Ee?"right-8":"right-2"} flex items-center gap-1 flex-nowrap justify-end pointer-events-none`,children:P}),ie&&D(
|
|
5
|
+
/* @__PURE__ */C("div",{ref:xe,onMouseDownCapture:()=>{Ne.current=!0,setTimeout(()=>{Ne.current=!1},0)},className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:p.popup,left:We?.left,right:We?.right,top:We?.top,bottom:We?.bottom,minWidth:We?.minWidth,width:We?.width,...re&&{maxWidth:We?.maxWidth},visibility:We?void 0:"hidden",...v()},children:[Q&&te&&Y&&!z&&
|
|
6
6
|
/* @__PURE__ */S("button",{type:"button",tabIndex:-1,onMouseDown:e=>{e.preventDefault(),ee([])},className:`block w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm text-gray-600 hover:bg-row-hover border-b ${g}`,children:be.select.clearAll}),I?
|
|
7
|
-
/* @__PURE__ */S(c,{size:"sm",padding:"py-2",label:be.search.searching}):
|
|
8
|
-
/* @__PURE__ */S("span",{className:"min-w-0 flex-1",children:
|
|
9
|
-
/* @__PURE__ */C("div",{id:he,role:
|
|
10
|
-
return C("button",{id:pe(t),type:"button",role:"option","aria-selected":n,"aria-disabled":e.disabled||void 0,tabIndex:-1,onMouseDown:n=>{(e.disabled||
|
|
11
|
-
/* @__PURE__ */S("span",{className:`min-w-0 ${re?"flex-auto":"flex-1"} truncate`,children:
|
|
12
|
-
/* @__PURE__ */S("button",{id:pe(
|
|
7
|
+
/* @__PURE__ */S(c,{size:"sm",padding:"py-2",label:be.search.searching}):X?/* @__PURE__ */C("div",{role:"alert",className:"flex items-center gap-2 px-3 py-2 text-sm text-red-600",children:[
|
|
8
|
+
/* @__PURE__ */S("span",{className:"min-w-0 flex-1",children:X}),J&&/* @__PURE__ */S(u,{variant:"link",size:"sm",onMouseDown:e=>e.preventDefault(),onClick:J,className:"shrink-0",children:be.list.retry})]}):null,
|
|
9
|
+
/* @__PURE__ */C("div",{id:he,role:Ke.length?"listbox":void 0,"aria-labelledby":Ke.length?K??(Z?void 0:de):void 0,"aria-label":Ke.length&&!K?Z:void 0,"aria-multiselectable":!(!Ke.length||!Q)||void 0,className:"overflow-y-auto",style:{maxHeight:We?.maxHeight??f},children:[0===Ke.length?I||X?null:/* @__PURE__ */S("p",{className:"px-3 py-3 text-sm text-ink-faintest text-center",children:be.select.noMatches}):0===Ge.length?null:l(Pe,(e,t)=>{const n=q.includes(e.value);/* @__PURE__ */
|
|
10
|
+
return C("button",{id:pe(t),type:"button",role:"option","aria-selected":n,"aria-disabled":e.disabled||void 0,tabIndex:-1,onMouseDown:n=>{(e.disabled||Q)&&n.preventDefault(),De(e,t)},className:"w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center justify-between gap-2 whitespace-nowrap "+(e.disabled?"cursor-not-allowed text-gray-400":`hover:bg-gray-50 ${n?"text-blue-600 font-medium":"text-gray-700"} ${t===se?"bg-gray-100":n?"bg-blue-50/50":""}`),children:[Q&&/* @__PURE__ */S(o,{selected:n}),
|
|
11
|
+
/* @__PURE__ */S("span",{className:`min-w-0 ${re?"flex-auto":"flex-1"} truncate`,children:G?G(e,{selected:n,active:t===se}):e.label}),e.sublabel&&/* @__PURE__ */S(i,{grows:re,children:e.sublabel})]},e.value)},ce),Ze&&U&&
|
|
12
|
+
/* @__PURE__ */S("button",{id:pe(Ge.length),type:"button",role:"option","aria-selected":!1,tabIndex:-1,onMouseDown:e=>{Q&&e.preventDefault(),De(Ze,Ge.length)},className:`w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 whitespace-nowrap text-ink hover:bg-row-hover ${Ge.length?`border-t ${g}`:""} ${se===Ge.length?"bg-gray-100":""}`,children:/* @__PURE__ */S("span",{className:"min-w-0 flex-1 truncate",children:U(Ze.value)})},`${ce}-typed`)]})]}),document.body)]});var Ve}export{R as SearchableSelect,W as fitChoice};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{TimelineCard as e}from"./chunk-S4Z657L6.js";import{TimelineTrack as n,TimelineMilestoneIcon as s}from"./chunk-YL6LLHJA.js";import{toDayMs as i,fmtSliderDate as t,DAY_MS as a}from"./chunk-YDEIXM2A.js";import{useBrowserValueOnce as l}from"./chunk-D65T4H6J.js";import{useShellStrings as o,useShellLocale as r}from"./chunk-X2PZMXDP.js";import{jsx as h}from"react/jsx-runtime";function m({title:m,heading:d,subject:c,milestones:p,summary:u,endDate:g,phaseLabels:k,variant:v="card",edgeCaptions:f,highlightKeys:y=null,onHoverChange:b}){const M=l(Date.now,null),j=[],x=[],C=o().timeline,L=r();for(const e of p){const n=i(e.date??null);null===n?x.push({key:e.key,label:e.label,kind:e.kind}):j.push({...e,ms:n})}j.sort((e,n)=>e.ms-n.ms);const D=i(g??null);let H,w,N=!0;0===j.length?(w=D??M??0,H=w-30*a,N=null!==D||null!==M):(H=j[0].ms,w=D??j[j.length-1].ms,w-H<a&&(w=H+a));const O=j.length>0?Math.max(0,Math.round((w-H)/a)):0,X=u??(O>0?C.duration(O):void 0),A=[j.length>0?C.started(t(j[0].ms,L)):void 0,X,x.length>0?C.reached(j.length,p.length):void 0],J=j.map(e=>{return{key:e.key,ms:e.ms,kind:e.kind,label:e.label,detail:e.detail,preview:e.preview,glyph:e.glyph,onClick:e.onClick,onOpen:e.onOpen,priority:(n=e.kind,"dfm"===n?1:0),caption:e.caption,provisional:e.provisional};var n}),K={};for(const e of j)e.phase&&(K[e.phase]=K[e.phase]||[]).push(e.ms);const P=Object.entries(K).filter(([,e])=>e.length>=2).map(([e,n])=>({key:e,label:k?.[e]??e,minMs:Math.min(...n),maxMs:Math.max(...n)})),Y="rail"===v,Z=N&&/* @__PURE__ */h("div",{className:"select-none",children:/* @__PURE__ */h(n,{axis:Y?"spread":"compressed",labels:Y?"none":"lanes",items:J,pending:x,phases:P,startMs:H,endMs:w,todayMs:M??void 0,edgeCaptions:f,highlightKeys:y,onHoverChange:b,ariaLabel:C.milestones(m)})});/* @__PURE__ */
|
|
2
|
+
return h("div",Y?{className:"shrink-0","data-timeline-variant":"rail",children:Z}:{className:"shrink-0",children:/* @__PURE__ */h(e,{icon:/* @__PURE__ */h(s,{}),heading:d??m,subject:c,meta:A,children:Z})})}export{m as MilestoneTimeline};
|
|
@@ -1,6 +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-
|
|
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-6TCJOVFX.js";import{Tooltip as i}from"./chunk-BCDG4N6L.js";import{useShellStrings as l}from"./chunk-X2PZMXDP.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:j=""}){const R=l().widths,z=a(),B=m(Math.round(x)||1,1,n),D=e($,B),A=D??[...t[B]??[]],O=[...A,100-p(A)],S=P||M,T=s(null),K=s({onChange:k,shown:A,locked:S,n:B,stored:D});K.current={onChange:k,shown:A,locked:S,n:B,stored:D};const X=t=>{const{onChange:r,shown:n,locked:o,n:i}=K.current;if(o)return!1;const l=e(t,i);return!(!l||v(l,n))&&(r(l),!0)},E=(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],X(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=O[e]+O[e+1],i="ArrowRight"===t.key?O[e]+n:"ArrowLeft"===t.key?O[e]-n:"PageUp"===t.key?O[e]+10:"PageDown"===t.key?O[e]-10:"Home"===t.key?r:"End"===t.key?o-r:null;null!==i&&(t.preventDefault(),E(O,e,i))},F=s(null),[G,H]=c(null),I=()=>{F.current=null,H(null),document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")};u(()=>I,[]);const J=e=>t=>{if(0!==t.button||S)return;t.preventDefault();const r=T.current?.getBoundingClientRect().width??0;r<=0||(F.current={i:e,x:t.clientX,width:r,from:O,moved:!1,pointer:t.pointerId},H(e),t.currentTarget.setPointerCapture?.(t.pointerId),document.body.style.cursor="col-resize",document.body.style.userSelect="none")},U=e=>{const t=F.current;if(!t)return;if(0===e.buttons)return void I();const r=e.clientX-t.x;if(!t.moved){if(Math.abs(r)<3)return;t.moved=!0}E(t.from,t.i,t.from[t.i]+r/t.width*100)},V=e=>{const t=F.current;t&&(e.currentTarget.hasPointerCapture?.(t.pointer)&&e.currentTarget.releasePointerCapture(t.pointer),I())},W=(e,t)=>{const{shown:n}=K.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 X(o.slice(0,-1))?o:null},[q,Z]=c(0);u(()=>{const e=T.current;if(!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Z(e.getBoundingClientRect().width));return t.observe(e),()=>t.disconnect()},[]);const Q=s(null),[Y,_]=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}=K.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=O.join(",");u(()=>{const e=null===Y?[]: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]:[]})}(Q.current,Y);te(t=>v(t,e)?t:e)},[Y,ie,q]);const le=R.hint(B,r),ae=O.slice(0,-1).map((e,t)=>p(O.slice(0,t+1)));/* @__PURE__ */
|
|
2
2
|
return h("div",{role:"group","aria-label":N?void 0:C,"aria-labelledby":N,"aria-describedby":B>1?z:void 0,className:`flex w-full min-w-0 flex-col gap-2 ${M?"opacity-60":""} ${j}`.trim(),children:[
|
|
3
|
-
/* @__PURE__ */h("div",{ref:
|
|
4
|
-
/* @__PURE__ */f("div",{ref:
|
|
5
|
-
/* @__PURE__ */f("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 rounded-(--radius-control) border border-line-strong"}),B>1&&
|
|
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-(B-1)*r,step:1,shiftStep:10,precision:0,allowEmpty:!1,reportWhileTyping:!1,readOnly:P,disabled:M,"aria-label":R.column(t+1),"aria-describedby":z,"data-widths-label":"",onChange:e=>{null===e||oe(t,e)||W(t,e)},onRevert:e=>((e,t)=>{
|
|
3
|
+
/* @__PURE__ */h("div",{ref:Q,"data-widths-bar":"",className:"relative h-8",children:[
|
|
4
|
+
/* @__PURE__ */f("div",{ref:T,"data-widths-track":"",className:"flex h-full w-full overflow-hidden rounded-(--radius-control) bg-surface",children:O.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===B&&/* @__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"}),B>1&&O.map((e,t)=>/* @__PURE__ */h(d,{children:[(()=>{const n=Y===t,l=p(O.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-(B-1)*r,step:1,shiftStep:10,precision:0,allowEmpty:!1,reportWhileTyping:!1,readOnly:P,disabled:M,"aria-label":R.column(t+1),"aria-describedby":z,"data-widths-label":"",onChange:e=>{null===e||oe(t,e)||W(t,e)},onRevert:e=>((e,t)=>{K.current.locked||null===t||oe(e,t)||W(e,t)})(t,e),onFocus:()=>{ne.current={column:t,share:e,stored:K.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<B-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:R.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":R.divider(t+1,t+2),"aria-valuenow":O[t],"aria-valuemin":r,"aria-valuemax":O[t]+O[t+1]-r,"aria-valuetext":R.dividerValue(t+1,O[t],t+2,O[t+1]),"aria-disabled":S||void 0,onKeyDown:S?void 0:L(t),onPointerDown:J(t),onPointerMove:U,onPointerUp:V,onPointerCancel:V,onLostPointerCapture:()=>{F.current&&I()},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)] "+(S?"cursor-default":"cursor-col-resize"),children:/* @__PURE__ */f("span",{"aria-hidden":"true","data-widths-line":"",className:"h-full rounded-full "+(S?`${b} bg-gray-300`:`bg-accent-fill transition-[width,background-color] duration-(--motion-fast) group-hover/widths:bg-blue-700 ${G===t?"w-1":y}`)})})})})]},t))]}),B>1&&/* @__PURE__ */f("span",{id:z,className:"sr-only",children:le})]})}export{x as WidthsBar};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{appendKey as r,backspace as a}from"./chunk-VEPVOHCV.js";import{Button_default as e}from"./chunk-NHH2MXFU.js";import{useShellStrings as n}from"./chunk-
|
|
1
|
+
import{appendKey as r,backspace as a}from"./chunk-VEPVOHCV.js";import{Button_default as e}from"./chunk-NHH2MXFU.js";import{useShellStrings as n}from"./chunk-X2PZMXDP.js";import{jsxs as i,jsx as c}from"react/jsx-runtime";var o=["1","2","3","4","5","6","7","8","9",".","0"];function l({value:l,onChange:s,onEnter:t,enterLabel:m,enterDisabled:d,className:h=""}){const p=n().keypad,u=r=>{r!==l&&s(r)};/* @__PURE__ */
|
|
2
2
|
return i("div",{className:`grid grid-cols-3 gap-3 ${h}`.trim(),children:[o.map(a=>/* @__PURE__ */c(e,{size:"touch-xl",variant:"secondary",onClick:()=>u(r(l,a)),children:a},a)),
|
|
3
3
|
/* @__PURE__ */c(e,{size:"touch-xl",variant:"secondary","aria-label":p.backspace,onClick:()=>u(a(l)),children:"⌫"}),t&&/* @__PURE__ */c(e,{size:"touch-xl",variant:"primary",className:"col-span-3",disabled:d,onClick:t,children:m??p.enter})]})}export{l as NumericKeypad};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{ImageFocusPoint as e}from"./chunk-QSW3YHPK.js";import{FormField as a}from"./chunk-6KBDNYRW.js";import{Segmented as i}from"./chunk-CKPVXDKX.js";import{isVideoUrl as t,mediaPromptLine as o,mediaFileName as r,FilenameBadge as n,BusyOverlay as l,UploadGlyph as s,dropzoneClass as c,zoneFocusClass as d}from"./chunk-7BDZZANS.js";import{TransferProgress as u}from"./chunk-EQN65XOO.js";import{useFileIntake as m,FileIntakeAlert as h}from"./chunk-P6LB3I3D.js";import{Icon as p}from"./chunk-FSPFV4MI.js";import{useShellStrings as b}from"./chunk-X2PZMXDP.js";import{useState as g,useRef as v,useEffect as f,useId as y}from"react";import{jsxs as k,jsx as N,Fragment as j}from"react/jsx-runtime";var x=["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:P,onFile:R,label:F,hint:C,error:U,required:O,className:$,accept:z="image/*",maxSizeBytes:B,fit:D="cover",height:K=112,placeholder:S,cta:X,acceptHint:H,showFilename:I=!0,allowReplace:q=!0,allowRemove:V=!0,replaceLabel:W,removeLabel:Z,busy:A=!1,busyLabel:M,choosingLabel:Q,pickFailedLabel:Y,progress:_,disabled:E=!1,kind:G,onKindChange:J,focus:T,onFocusChange:ee,focusLabel:ae}){const ie=b().media,te=X??ie.cta,oe=G??(/video/.test(z)&&!/image/.test(z)?"video":"image"),re="string"==typeof Z&&Z?Z:ie.remove,[ne,le]=g(!1),[se,ce]=g(!1),de=v(!0);f(()=>()=>{de.current=!1},[]);const ue=A||ne,me=ne&&!A?Q??ie.choosing:M??ie.uploading,he=U??(se?Y??ie.pickFailed:void 0),pe=e=>{if(!P)return;ce(!1);const a=P(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=E||ue,ke=!!w&&(t(w,z)||w===ve),Ne=S??o(z,ie),je=W??(ke||"video"===oe?ie.changeVideo:ie.changeImage),xe=e=>{P?pe(e):R?R(e):(e=>{ge.current&&URL.revokeObjectURL(ge.current);const a=URL.createObjectURL(e);ge.current=a,fe(e.type.startsWith("video/")?a:null),L(a)})(e)},we=m({accept:z,maxSizeBytes:B,acceptHint:H,multiple:!1,disabled:ye,onAccept:([e])=>xe(e)}),{dragOver:Le}=we,Pe=()=>{ye||(P?pe():we.open())},Re=w?r(w):"",Fe=!ke&&!!ee,Ce=E||!q&&!V?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:[q&&/* @__PURE__ */k("button",{id:Fe?void 0:be,type:"button","aria-labelledby":`${be}-change`,onClick:()=>Pe(),disabled:ue,className:`min-w-0 flex-1 gap-1 px-2 text-sm font-medium ${x}`,children:[
|
|
2
|
+
/* @__PURE__ */N(p,{name:"swap","aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
|
|
3
|
+
/* @__PURE__ */N("span",{id:`${be}-change`,className:"truncate",children:je})]}),V&&/* @__PURE__ */N("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 ${x}`,children:/* @__PURE__ */N(p,{name:"trash","aria-hidden":"true",className:"h-4 w-4"})})]}),Ue=/* @__PURE__ */k("div",{...we.zoneProps,"data-media-frame":"",className:["group/media relative overflow-hidden rounded-(--radius-control) border transition-colors",Fe?"":"bg-gray-100",Le?"border-blue-500":"border-line"].join(" "),style:Fe?void 0:{height:K},children:[Fe?
|
|
4
|
+
/* @__PURE__ */N(e,{value:T??"",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__ */N("video",{src:w??void 0,muted:!0,playsInline:!0,preload:"metadata","aria-label":Re||void 0,className:"h-full w-full",style:{objectFit:D}}):/* @__PURE__ */N("img",{src:w??void 0,alt:Re,className:"h-full w-full",style:{objectFit:D,objectPosition:T||void 0}}),I&&w&&/* @__PURE__ */N(n,{children:Re}),Ce,ue&&/* @__PURE__ */N(l,{label:me,progress:_,rounded:"rounded-md"})]}),Oe=/* @__PURE__ */N("button",{type:"button",id:be,onClick:()=>Pe(),disabled:ye,"aria-label":"string"==typeof Ne?Ne:ie.upload,"aria-busy":ue||void 0,"aria-invalid":!!he||void 0,"aria-required":O||void 0,"aria-describedby":he?`${be}-error`:C?`${be}-hint`:void 0,...we.zoneProps,className:c(Le,ye,d(ye)),style:{minHeight:K},children:ue?/* @__PURE__ */N(u,{state:"busy",verb:me,pct:_}):/* @__PURE__ */k(j,{children:[
|
|
5
|
+
/* @__PURE__ */N("span",{className:"text-ink-faintest",children:/* @__PURE__ */N(s,{})}),
|
|
6
|
+
/* @__PURE__ */N("span",{className:"px-3 text-xs text-ink-faint",children:Ne}),
|
|
7
|
+
/* @__PURE__ */N("span",{className:"text-sm font-medium text-blue-600",children:te}),H&&/* @__PURE__ */N("span",{className:"text-xs text-ink-faintest",children:H})]})});/* @__PURE__ */
|
|
8
|
+
return k(a,{label:F,htmlFor:be,hint:C,error:he,required:O,className:$,children:[J&&/* @__PURE__ */N("div",{"data-media-kind":"",className:"mb-2",children:/* @__PURE__ */N(i,{value:oe,onChange:e=>J(e),options:[{value:"image",label:ie.image,icon:/* @__PURE__ */N(p,{name:"image","aria-hidden":"true",className:"h-4 w-4"}),disabled:ye},{value:"video",label:ie.video,icon:/* @__PURE__ */N(p,{name:"play","aria-hidden":"true",className:"h-4 w-4"}),disabled:ye}],block:!0,size:"md",label:"string"==typeof F&&F?F:ie.upload})}),w?Ue:Oe,!P&&/* @__PURE__ */N("input",{...we.inputProps}),
|
|
9
|
+
/* @__PURE__ */N(h,{rejections:we.rejections})]})}export{w as MediaUploadField};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{ColoredBadge as e}from"./chunk-
|
|
1
|
+
import{ColoredBadge as e}from"./chunk-DXHLUB36.js";import{Button_default as n}from"./chunk-NHH2MXFU.js";import{useShellStrings as i}from"./chunk-X2PZMXDP.js";import{useId as t}from"react";import{jsx as m,jsxs as a}from"react/jsx-runtime";function s({items:s,heading:l,emptyText:r,className:c=""}){const o=i().media,d=t();return s.length?/* @__PURE__ */a("div",{className:c||void 0,children:[
|
|
2
2
|
/* @__PURE__ */m("p",{id:d,className:"text-xs font-medium text-ink-faint",children:l??o.usedIn(s.length)}),
|
|
3
3
|
/* @__PURE__ */m("ul",{"aria-labelledby":d,className:"mt-2 flex flex-col gap-1",children:s.map(i=>/* @__PURE__ */a("li",{className:"flex min-w-0 items-center gap-2 text-sm",children:[null!=i.kind&&/* @__PURE__ */m(e,{size:"xs",className:"flex-none",children:i.kind}),i.onOpen?/* @__PURE__ */m(n,{variant:"link",size:"sm",onClick:i.onOpen,className:"min-w-0 text-left",children:i.name}):/* @__PURE__ */m("span",{className:"min-w-0 break-words text-ink",children:i.name})]},i.key))})]}):/* @__PURE__ */m("p",{className:`text-sm text-ink-faint ${c}`.trim(),children:r??o.notUsed})}export{s as MediaUsedInList};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{inputClasses as e}from"./chunk-AYZY3YNC.js";import{useShellLocale as t}from"./chunk-
|
|
1
|
+
import{inputClasses as e}from"./chunk-AYZY3YNC.js";import{useShellLocale as t}from"./chunk-X2PZMXDP.js";import{forwardRef as n}from"react";import{jsx as r}from"react/jsx-runtime";var a=/^\d{2}:\d{2}(:\d{2})?$/,i=e=>String(e).padStart(2,"0");function s(e,t){if(null==e||""===e)return"";if(e instanceof Date){if(Number.isNaN(e.getTime()))return"";const n=`${i(e.getHours())}:${i(e.getMinutes())}`;return t?`${n}:${i(e.getSeconds())}`:n}return a.test(e)?e:""}var u=n(function({value:n,onChange:i,min:u,max:o,invalid:m,size:l,className:c="",step:v,...d},f){const g=null!=v&&Number(v)<60,p=t();/* @__PURE__ */
|
|
2
2
|
return r("input",{ref:f,type:"time",lang:p,step:v,"aria-invalid":m||void 0,value:s(n,g),min:s(u,g)||void 0,max:s(o,g)||void 0,onChange:e=>i?.(a.test(e.target.value)?e.target.value:null),className:e({invalid:m,size:l,className:c}),...d})});export{u as TimePicker_default};
|