efficient-shell 10.15.0 → 10.16.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 +14 -0
- package/dist/{Browser-WR4GMYE7.js → Browser-RI5X7GMK.js} +14 -14
- package/dist/Calculator-Y566OMJZ.js +29 -0
- package/dist/{CurrencyConverter-HEAAQX23.js → CurrencyConverter-2GUEE7ZR.js} +6 -6
- package/dist/{Documents-NSPKXCTF.js → Documents-GI346UL5.js} +12 -12
- package/dist/{Files-5HAUE2PR.js → Files-UA23KXN7.js} +54 -54
- package/dist/{Notepad-5LSFAYXO.js → Notepad-HRZKLHO3.js} +9 -9
- package/dist/{PomodoroTimer-5V32QOCZ.js → PomodoroTimer-QYCTTTPZ.js} +68 -68
- package/dist/{Preview-PDVZZRSK.js → Preview-LSGN5GN7.js} +29 -29
- package/dist/Sidebar-2P26444H.js +44 -0
- package/dist/{Spreadsheet-K4IAI3A2.js → Spreadsheet-7JBZY6KJ.js} +9 -9
- package/dist/{Stock-AOCHAKUF.js → Stock-ZVQT25IE.js} +3 -3
- package/dist/{Weather-F2QHTG32.js → Weather-RAUDLLVU.js} +17 -17
- package/dist/{WorldClock-G72577HU.js → WorldClock-2XBWZ6SZ.js} +6 -6
- package/dist/ai/index.d.ts +76 -1
- package/dist/ai/index.js +70 -52
- package/dist/ai.css +1 -1
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/ChartTooltip.js +1 -1
- package/dist/charts/ChordChart.js +1 -1
- package/dist/charts/ColumnChart.js +1 -1
- package/dist/charts/FunnelChart.js +1 -1
- package/dist/charts/HeatmapChart.js +1 -1
- package/dist/charts/HistogramChart.js +1 -1
- package/dist/charts/PieChart.js +1 -1
- package/dist/charts/RadarChart.js +1 -1
- package/dist/charts/RadialBarChart.js +1 -1
- package/dist/charts/RangeChart.js +1 -1
- package/dist/charts/SankeyChart.js +1 -1
- package/dist/charts/ScatterChart.js +1 -1
- package/dist/charts/SpecChart.js +1 -1
- package/dist/charts/SunburstChart.js +1 -1
- package/dist/charts/TimeSeriesChart.js +1 -1
- package/dist/charts/TreemapChart.js +1 -1
- package/dist/charts/WaterfallChart.js +1 -1
- package/dist/{chunk-4U57ANZF.js → chunk-2SY76NFO.js} +1 -1
- package/dist/{chunk-N2RHM432.js → chunk-2VGQS6CW.js} +1 -1
- package/dist/{chunk-SQCUN2DX.js → chunk-34URULVW.js} +1 -1
- package/dist/{chunk-5LCDCO46.js → chunk-3ELLBQPS.js} +1 -1
- package/dist/{chunk-NZCSLS4O.js → chunk-3LDXURVU.js} +3 -3
- package/dist/{chunk-NZQCDFDG.js → chunk-3NW5LD7D.js} +3 -3
- package/dist/{chunk-N3YBOXOF.js → chunk-4G2C6J4I.js} +1 -1
- package/dist/{chunk-FQIA5BTN.js → chunk-4QJOEHM6.js} +7 -7
- package/dist/{chunk-V2MIQ4GJ.js → chunk-4UKGVLFP.js} +2 -2
- package/dist/{chunk-FRVNDEV2.js → chunk-4WEFGKJL.js} +8 -8
- package/dist/{chunk-LVBO2OMQ.js → chunk-57HN6MPC.js} +2 -2
- package/dist/{chunk-2RAOWHHM.js → chunk-5UYZ75F3.js} +12 -12
- package/dist/{chunk-ZL5OSF26.js → chunk-6AS5PHHK.js} +18 -18
- package/dist/{chunk-Q3IR5SKD.js → chunk-6XBWM453.js} +1 -1
- package/dist/{chunk-CDA2VXBN.js → chunk-74OUAR6L.js} +6 -6
- package/dist/{chunk-ARCQYF7G.js → chunk-7HLC352T.js} +2 -2
- package/dist/{chunk-B25RVAVS.js → chunk-7HTRLRVO.js} +64 -64
- package/dist/{chunk-G4JTO5PB.js → chunk-7JGR7WPD.js} +1 -1
- package/dist/{chunk-RFEET2LS.js → chunk-7NBSBGLX.js} +1 -1
- package/dist/{chunk-S52GQQVB.js → chunk-7TNAOZZ2.js} +1 -1
- package/dist/{chunk-AJFR35CO.js → chunk-7UTPXU6K.js} +4 -4
- package/dist/{chunk-NBB2RKDH.js → chunk-7X5FABQS.js} +5 -5
- package/dist/chunk-7XYTJPWW.js +29 -0
- package/dist/{chunk-IC7BEFE3.js → chunk-7ZP64SC7.js} +1 -1
- package/dist/{chunk-YLGQ6ACR.js → chunk-AJO72CPB.js} +1 -1
- package/dist/{chunk-4XS32UWF.js → chunk-AOK3BHRT.js} +4 -4
- package/dist/{chunk-SSM3EN7G.js → chunk-B7UCXROE.js} +1 -1
- package/dist/chunk-BNJWZAQE.js +12 -0
- package/dist/{chunk-HL3DJTIC.js → chunk-CBEKJTXU.js} +7 -7
- package/dist/{chunk-NWURIQI3.js → chunk-CKKUFDZ3.js} +3 -3
- package/dist/chunk-COJYPNKF.js +2 -0
- package/dist/{chunk-ZLSUQAD3.js → chunk-CPZ42W2B.js} +1 -1
- package/dist/{chunk-ZL7O4KGQ.js → chunk-CQV3VSI2.js} +1 -1
- package/dist/{chunk-5LXT3IUL.js → chunk-D4I3U7UE.js} +1 -1
- package/dist/{chunk-7PSIPTOE.js → chunk-D7F442OZ.js} +1 -1
- package/dist/chunk-DESWIPOZ.js +3 -0
- package/dist/{chunk-KJCTXWF7.js → chunk-DRDYZ633.js} +2 -2
- package/dist/{chunk-FJYTYW6M.js → chunk-DWR7MYQU.js} +5 -5
- package/dist/{chunk-EYEB3J77.js → chunk-E3753CWP.js} +5 -5
- package/dist/chunk-EU3JZGV2.js +14 -0
- package/dist/{chunk-55W5TTKS.js → chunk-FEQDZTZ7.js} +6 -6
- package/dist/{chunk-LWEWURFT.js → chunk-FWVC4A2O.js} +13 -13
- package/dist/{chunk-WZ5QSSUM.js → chunk-G4GVLK44.js} +6 -6
- package/dist/{chunk-5N5AAYQV.js → chunk-GISDIVFK.js} +1 -1
- package/dist/{chunk-N4REWGMM.js → chunk-GPJO34QP.js} +8 -8
- package/dist/{chunk-FFZREKEF.js → chunk-H32EQG5Z.js} +9 -9
- package/dist/{chunk-PUBJ5YHQ.js → chunk-I2XGPTCN.js} +1 -1
- package/dist/chunk-I4VIEGCX.js +2 -0
- package/dist/{chunk-ZZTCYEQ4.js → chunk-IKNG7EFQ.js} +7 -7
- package/dist/{chunk-OSVY6SUO.js → chunk-ISJPW2FZ.js} +5 -5
- package/dist/{chunk-POQ4ETLL.js → chunk-JGTGQGHY.js} +1 -1
- package/dist/{chunk-RSS2ALHH.js → chunk-JJW43QPS.js} +5 -5
- package/dist/chunk-JSGQWVYH.js +7 -0
- package/dist/{chunk-HRPXJ4EI.js → chunk-K4ANB6AF.js} +1 -1
- package/dist/{chunk-CHAWFMV4.js → chunk-KTA77U3P.js} +4 -4
- package/dist/{chunk-OAT7OEWP.js → chunk-KTVXPGGB.js} +8 -8
- package/dist/{chunk-CFAELIKH.js → chunk-L4IW77TD.js} +6 -6
- package/dist/{chunk-ZHPHNQKM.js → chunk-LCJRTJXT.js} +7 -7
- package/dist/{chunk-FUVVO6YP.js → chunk-LDE5IV2M.js} +1 -1
- package/dist/{chunk-TXNCDDB4.js → chunk-LO5T2K4B.js} +3 -3
- package/dist/chunk-LU6NA4RU.js +5 -0
- package/dist/{chunk-ZI6SMZJ4.js → chunk-MHB52H2Y.js} +11 -11
- package/dist/{chunk-FGJOGBGZ.js → chunk-MNSKGMVZ.js} +8 -8
- package/dist/{chunk-AJFWBEIG.js → chunk-MTEFYFUO.js} +9 -9
- package/dist/{chunk-S5SRXI4V.js → chunk-MVZRZTQP.js} +1 -1
- package/dist/{chunk-MMQ6ETRD.js → chunk-N67QX3WW.js} +2 -2
- package/dist/{chunk-M5LR7ZZX.js → chunk-O6JJIR4H.js} +1 -1
- package/dist/{chunk-G7QK7WAK.js → chunk-PCFBDXLN.js} +1 -1
- package/dist/chunk-PJQGYKN6.js +11 -0
- package/dist/chunk-PN5FQVMB.js +7 -0
- package/dist/chunk-PN65IIYN.js +8 -0
- package/dist/chunk-PUF75SMJ.js +1 -0
- package/dist/{chunk-AJVUND5A.js → chunk-PVZGSCCB.js} +6 -6
- package/dist/{chunk-B37JVKW5.js → chunk-PYAJCN2Q.js} +1 -1
- package/dist/chunk-Q6YNMNUH.js +6 -0
- package/dist/{chunk-YFMZKTJC.js → chunk-QDQ347RL.js} +1 -1
- package/dist/{chunk-4VTJEKHX.js → chunk-QHOBK35Y.js} +1 -1
- package/dist/{chunk-66XPG5G3.js → chunk-QYSEYYV7.js} +1 -1
- package/dist/chunk-RCPFUDPS.js +4 -0
- package/dist/{chunk-25M7CYCR.js → chunk-RLJHRDDW.js} +8 -8
- package/dist/{chunk-6BB6A5OB.js → chunk-RPYFOQM2.js} +5 -5
- package/dist/chunk-RRUHQLUY.js +14 -0
- package/dist/{chunk-ESYYKGN4.js → chunk-S6FBMSFU.js} +2 -2
- package/dist/{chunk-5FRFSPQ2.js → chunk-SDQIXE5M.js} +8 -8
- package/dist/{chunk-PB3OC4BO.js → chunk-SG4LO2AN.js} +8 -8
- package/dist/{chunk-U2WCV56F.js → chunk-SHKBDFSE.js} +1 -1
- package/dist/{chunk-ZMRGHVKS.js → chunk-TKJBZIHT.js} +1 -1
- package/dist/{chunk-EHGGSUXA.js → chunk-TM33D3CE.js} +1 -1
- package/dist/chunk-TMNAHOJ7.js +9 -0
- package/dist/{chunk-GKIU55T5.js → chunk-TVH7IZQ4.js} +2 -2
- package/dist/{chunk-EQZZ4V5X.js → chunk-TXDA7TTP.js} +1 -1
- package/dist/{chunk-SOGQZVPJ.js → chunk-UBMY23AG.js} +5 -5
- package/dist/{chunk-KKOADH55.js → chunk-UDRMZ22J.js} +1 -1
- package/dist/{chunk-36R3R3IB.js → chunk-ULXCDM7Y.js} +4 -4
- package/dist/{chunk-MCYFUIXH.js → chunk-UWIZX3RK.js} +1 -1
- package/dist/{chunk-SP2AUVIU.js → chunk-UYRITNQW.js} +3 -3
- package/dist/{chunk-OET2Q7P6.js → chunk-VNACNNCJ.js} +3 -3
- package/dist/{chunk-UWIFXNH6.js → chunk-VTFZ6W2D.js} +3 -3
- package/dist/chunk-W35N7SL3.js +8 -0
- package/dist/{chunk-UPCLAEKC.js → chunk-W3OWPBQL.js} +2 -2
- package/dist/chunk-W4OBVKN4.js +1 -0
- package/dist/chunk-W6URVLQF.js +20 -0
- package/dist/{chunk-EK5WJQTR.js → chunk-WB4P4QE2.js} +1 -1
- package/dist/{chunk-XPPLCLYK.js → chunk-WINNA7LS.js} +1 -1
- package/dist/chunk-WMEYNKXZ.js +22 -0
- package/dist/{chunk-A267MPGS.js → chunk-X6BFVDB4.js} +2 -2
- package/dist/{chunk-5JU53T3U.js → chunk-XZGGJHJC.js} +8 -8
- package/dist/chunk-Y3R267FV.js +15 -0
- package/dist/{chunk-XJUREXYW.js → chunk-YOSUCCHG.js} +3 -3
- package/dist/chunk-ZZVE64OI.js +2 -0
- package/dist/data/DataTable.js +1 -1
- package/dist/data/Kanban.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/format/index.js +1 -1
- package/dist/forms/AlignmentGrid.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Button.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DatePicker.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/IconButton.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.js +1 -1
- package/dist/forms/NumericKeypad.js +1 -1
- package/dist/forms/PictureTiles.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/Segmented.js +1 -1
- package/dist/forms/Select.js +1 -1
- package/dist/forms/SidesInput.js +1 -1
- package/dist/forms/Slider.js +1 -1
- package/dist/forms/Snippet.js +1 -1
- package/dist/forms/SplitButton.js +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/hooks/useTheme.d.ts +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +247 -247
- package/dist/map/index.js +7 -7
- package/dist/page-tabs/index.js +5 -5
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContextMenu.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/DropdownMenu.js +1 -1
- package/dist/shell/EditableGrid.js +1 -1
- package/dist/shell/FloatingBar.js +1 -1
- package/dist/shell/GlobalSearch.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/IconRail.js +1 -1
- package/dist/shell/ImageLightbox.js +1 -1
- package/dist/shell/ItemCount.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/MilestoneTimeline.js +1 -1
- package/dist/shell/Popover.js +1 -1
- package/dist/shell/PopupMenu.js +1 -1
- package/dist/shell/ProductionTimeline.js +1 -1
- package/dist/shell/ResizeHandle.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SettingRow.js +1 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/SidebarNav.js +1 -1
- package/dist/shell/SortableList.js +1 -1
- package/dist/shell/StatusBadge.js +1 -1
- package/dist/shell/Tabs.js +1 -1
- package/dist/shell/TimelineTrack.js +1 -1
- package/dist/shell/Tooltip.js +1 -1
- package/dist/shell/TopNav.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/discardGuard.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/AuthScreen.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DashboardTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/ErrorBoundary.d.ts +1 -1
- package/dist/templates/ErrorBoundary.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-MV5JVQBS.js +0 -29
- package/dist/Sidebar-E3VDFBF6.js +0 -44
- package/dist/chunk-3GHTOSJP.js +0 -14
- package/dist/chunk-4AQ67NP2.js +0 -15
- package/dist/chunk-6WSH6D5N.js +0 -29
- package/dist/chunk-7LQGPMRP.js +0 -3
- package/dist/chunk-CNLYFW47.js +0 -9
- package/dist/chunk-EFU4Z66K.js +0 -8
- package/dist/chunk-FX6DBXXD.js +0 -1
- package/dist/chunk-HXNMRJQ4.js +0 -2
- package/dist/chunk-IFA2EOAF.js +0 -4
- package/dist/chunk-KMEERBZV.js +0 -2
- package/dist/chunk-KORKSPHQ.js +0 -6
- package/dist/chunk-LWWMRL2Y.js +0 -5
- package/dist/chunk-NLGMJGD6.js +0 -14
- package/dist/chunk-SCYL5V5X.js +0 -20
- package/dist/chunk-SM7IDX7Y.js +0 -1
- package/dist/chunk-TIPU74XW.js +0 -22
- package/dist/chunk-UUKTYAWY.js +0 -7
- package/dist/chunk-V6F42DX3.js +0 -11
- package/dist/chunk-VWEG2WM4.js +0 -12
- package/dist/chunk-XIB72X74.js +0 -2
- package/dist/chunk-ZE5TNYWX.js +0 -7
- package/dist/chunk-ZO244TWH.js +0 -8
- /package/dist/{chunk-ID6WFAXW.js → chunk-N3TOHWFF.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{InputNumber_default as e}from"./chunk-
|
|
2
|
-
return t("div",{id:
|
|
3
|
-
/* @__PURE__ */s("div",{className:"w-30 shrink-0",children:/* @__PURE__ */s(e,{value:h,onChange:v,min:k,max:g,step:x,precision:0,placeholder:w,prefix:/* @__PURE__ */s("span",{"data-radius-mark":"","aria-hidden":"true",children:
|
|
4
|
-
/* @__PURE__ */s("div",{ref:
|
|
1
|
+
import{InputNumber_default as e}from"./chunk-57HN6MPC.js";import{IconButton_default as r}from"./chunk-PUF75SMJ.js";import{Icon as a}from"./chunk-2UO47XB4.js";import{Tooltip as i}from"./chunk-6XBWM453.js";import{useShellStrings as n}from"./chunk-4PAWQEXM.js";import{useState as l,useRef as o}from"react";import{jsxs as t,jsx as s}from"react/jsx-runtime";var d={tl:"",tr:"rotate-90",br:"rotate-180",bl:"-rotate-90"},c=["tl","tr","bl","br"];function u({label:u,value:m,corners:f,onChange:p,radius:h=null,onRadiusChange:v,radiusLabel:b,radiusMin:k=0,radiusMax:g,radiusStep:x=1,radiusPlaceholder:w,disabled:y=!1,disabledReason:M,id:j,className:A=""}){const N=n(),C=function(e){const r=c.map(r=>e.find(e=>e.value===r));for(const a of e){if(c.includes(a.value))continue;const e=r.findIndex(e=>void 0===e);-1===e?r.push(a):r[e]=a}return r.filter(e=>void 0!==e)}(f),[K,P]=l(0),R=o(null);/* @__PURE__ */
|
|
2
|
+
return t("div",{id:j,role:"group","aria-label":u,className:`flex min-w-0 flex-wrap items-center gap-2 ${A}`.trim(),children:[v&&
|
|
3
|
+
/* @__PURE__ */s("div",{className:"w-30 shrink-0",children:/* @__PURE__ */s(e,{value:h,onChange:v,min:k,max:g,step:x,precision:0,placeholder:w,prefix:/* @__PURE__ */s("span",{"data-radius-mark":"","aria-hidden":"true",children:N.corners.radiusMark}),suffix:N.corners.unit,steppers:"compact",disabled:y,"aria-label":b??N.corners.radius})}),
|
|
4
|
+
/* @__PURE__ */s("div",{ref:R,"data-corners-grid":"",className:"grid shrink-0 grid-cols-2 gap-1",onKeyDown:e=>{if(e.altKey||e.ctrlKey||e.metaKey)return;const r=Array.from(R.current?.querySelectorAll("button[data-corner]")??[]),a=r.indexOf(document.activeElement);if(-1===a)return;const i=a%2,n=Math.floor(a/2),l="ArrowRight"===e.key?2*n+1:"ArrowLeft"===e.key?2*n:"ArrowDown"===e.key?2+i:"ArrowUp"===e.key?i:null;null!==l&&(e.preventDefault(),l<r.length&&r[l].focus())},children:C.map((e,n)=>{const l=m.includes(e.value),o=y||!0===e.disabled,t=o&&(!0===e.disabled&&e.title||(y?M:void 0))||void 0,c=/* @__PURE__ */s(r,{"aria-pressed":l,"aria-label":e.label,"aria-disabled":o||void 0,disabledReason:t,"data-corner":e.value,size:"sm",tabIndex:n===K?0:-1,onFocus:()=>P(n),onClick:()=>{o||p(l?m.filter(r=>r!==e.value):[...m,e.value])},children:/* @__PURE__ */s(a,{name:"corner",strokeWidth:2,className:["h-4 w-4",d[e.value]??""].filter(Boolean).join(" ")})},e.value);return t?c:/* @__PURE__ */s(i,{content:e.title??e.label,children:c},e.value)})})]})}export{u as CornersInput};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{LIGHTBOX_PICTURE_FIT as e,ZoomableImage as t}from"./chunk-CGUMJZUB.js";import{isVideoUrl as r,mediaFileName as n}from"./chunk-
|
|
1
|
+
import{LIGHTBOX_PICTURE_FIT as e,ZoomableImage as t}from"./chunk-CGUMJZUB.js";import{isVideoUrl as r,mediaFileName as n}from"./chunk-B7UCXROE.js";import{dialogA11y as o}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as a}from"./chunk-7QSDPSXP.js";import{useFocusTrap as l,useScrollLock as i}from"./chunk-CDAJKLGL.js";import{Button_default as c}from"./chunk-I4VIEGCX.js";import{buttonClasses as s}from"./chunk-UQYNPYF4.js";import{Icon as m}from"./chunk-2UO47XB4.js";import{Z_LAYERS as u}from"./chunk-62LW225J.js";import{useHydrated as d}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as f}from"./chunk-TWVUQUUD.js";import{useShellStrings as h}from"./chunk-4PAWQEXM.js";import{useRef as p,useState as x,useCallback as b,useEffect as k}from"react";import{createPortal as g}from"react-dom";import{jsx as v,jsxs as w,Fragment as N}from"react/jsx-runtime";var y=/\.(pdf|docx?|xlsx?|pptx?|csv|txt|zip|rar|7z|dwg|dxf|stp|step|igs|iges)(?:[?#]|$)/i;function j(e){return e.kind?e.kind:r(e.url)?"video":y.test(e.url)?"file":"image"}var C="flex items-center justify-center rounded-full bg-black/60 text-on-accent hover:bg-black/80 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",U=e=>e.stopPropagation();function A({images:r,startIndex:y=0,onClose:A,onIndexChange:I,onOpenFile:L}){const $=h().lightbox,z=d(),D=p(null),E=p(null),[P,W]=x(y),X=r.length,F=z&&X>0,G=b(e=>{if(X<2)return;const t=((P+e)%X+X)%X;W(t),I?.(t)},[P,X,I]);if(a(F),l(D,F,E),i(F),k(()=>{if(F)return f(()=>(A(),!0),()=>D.current)},[F,A]),k(()=>{if(!F)return;const e=e=>{"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||e.target?.closest?.("video")||(e.preventDefault(),G("ArrowRight"===e.key?1:-1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[F,G]),!F)return null;const J=r[Math.min(P,X-1)],O=j(J),Q=J.caption||n(J.url);let B;return B="video"===O?/* @__PURE__ */v("video",{src:J.url,controls:!0,playsInline:!0,"aria-label":Q,onClick:U,className:`${e} rounded-lg bg-black`}):"file"===O?/* @__PURE__ */w("div",{onClick:U,className:"flex max-w-[calc(100vw-144px)] flex-col items-center gap-3 rounded-lg bg-surface px-10 py-8 text-center text-ink-faint",children:[
|
|
2
2
|
/* @__PURE__ */v(m,{name:"document","aria-hidden":"true",className:"h-10 w-10"}),
|
|
3
|
-
/* @__PURE__ */v("span",{className:"max-w-[60ch] break-all text-sm font-medium text-ink",children:
|
|
4
|
-
/* @__PURE__ */w("div",{ref:
|
|
3
|
+
/* @__PURE__ */v("span",{className:"max-w-[60ch] break-all text-sm font-medium text-ink",children:Q}),L?/* @__PURE__ */v(c,{size:"sm",onClick:()=>L(J),children:$.openFile}):/* @__PURE__ */v("a",{href:J.url,target:"_blank",rel:"noopener noreferrer",className:s({size:"sm"}),children:$.openFile})]}):/* @__PURE__ */v(t,{src:J.url,alt:Q,className:`${e} object-contain`,frameClassName:"rounded-lg"}),g(
|
|
4
|
+
/* @__PURE__ */w("div",{ref:D,...o({role:"dialog",modal:!0,label:$.label}),"data-lightbox-backdrop":"",className:"fixed inset-0 flex items-center justify-center bg-black/80",style:{zIndex:u.overlay},onClick:A,children:[B,
|
|
5
5
|
/* @__PURE__ */w("div",{className:"absolute right-4 top-4 flex items-center gap-2",onClick:U,children:[
|
|
6
|
-
/* @__PURE__ */v("span",{className:"rounded bg-black/60 px-2 py-1 text-xs text-on-accent tabular-nums",children
|
|
7
|
-
/* @__PURE__ */v("button",{ref:
|
|
8
|
-
/* @__PURE__ */v("button",{type:"button",onClick:e=>{U(e),
|
|
9
|
-
/* @__PURE__ */v("button",{type:"button",onClick:e=>{U(e),
|
|
6
|
+
/* @__PURE__ */v("span",{className:"rounded bg-black/60 px-2 py-1 text-xs text-on-accent tabular-nums",children:$.counter(P+1,X)}),
|
|
7
|
+
/* @__PURE__ */v("button",{ref:E,type:"button",onClick:A,"aria-label":$.close,className:`${C} h-8 w-8`,children:/* @__PURE__ */v(m,{name:"close","aria-hidden":"true",className:"h-4 w-4"})})]}),X>1&&/* @__PURE__ */w(N,{children:[
|
|
8
|
+
/* @__PURE__ */v("button",{type:"button",onClick:e=>{U(e),G(-1)},"aria-label":$.previous,className:`${C} absolute left-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(m,{name:"chevron-left","aria-hidden":"true",className:"h-5 w-5"})}),
|
|
9
|
+
/* @__PURE__ */v("button",{type:"button",onClick:e=>{U(e),G(1)},"aria-label":$.next,className:`${C} absolute right-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(m,{name:"chevron-right","aria-hidden":"true",className:"h-5 w-5"})})]}),
|
|
10
10
|
/* @__PURE__ */w("div",{className:"absolute inset-x-18 bottom-4 flex items-center justify-center gap-3",onClick:U,children:[
|
|
11
|
-
/* @__PURE__ */v("span",{className:"min-w-0 break-words text-center text-sm text-on-accent/85",children:
|
|
11
|
+
/* @__PURE__ */v("span",{className:"min-w-0 break-words text-center text-sm text-on-accent/85",children:Q}),"file"!==O&&/* @__PURE__ */v("a",{href:J.url,target:"_blank",rel:"noopener noreferrer",className:"flex-none text-xs font-medium text-on-accent/70 underline decoration-on-accent/30 underline-offset-2 hover:text-on-accent",children:$.openOriginal})]})]}),document.body)}export{A as ImageLightbox,j as lightboxKind};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{MediaUploadField as e}from"./chunk-
|
|
2
|
-
return n("section",{"aria-label":
|
|
1
|
+
import{MediaUploadField as e}from"./chunk-JJW43QPS.js";import{BrandMark as r}from"./chunk-MI67DI3H.js";import{Button_default as a}from"./chunk-I4VIEGCX.js";import{useShellStrings as t}from"./chunk-4PAWQEXM.js";import{useRef as i,useState as l,useEffect as s}from"react";import{jsxs as n,jsx as c}from"react/jsx-runtime";function d({committedUrl:d,committedHasAlpha:o=null,committedIsLight:m=null,fallbackUrl:g,fallbackHasAlpha:h=null,fallbackIsLight:u=null,subjectName:b,assetName:p,onSave:x,onRemove:f,accept:v="image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",acceptHint:y="PNG · ICO · SVG · JPG · WEBP",maxBytes:N=5242880,previews:w=[],disabled:k=!1}){const j=i(null),[L,R]=l(null),[U,I]=l(""),[C,A]=l(""),[E,H]=l(!1),[P,F]=l(!1),G=function(e){return e.trim().toLocaleLowerCase().split(/\s+/).at(-1)||"image"}(p),O=t().brandAsset,S=U||d||g||"",B=L?null:d?o:h,J=L?null:d?m:u;s(()=>()=>{j.current&&URL.revokeObjectURL(j.current)},[]);const W=()=>{j.current&&(URL.revokeObjectURL(j.current),j.current=null)};/* @__PURE__ */
|
|
2
|
+
return n("section",{"aria-label":O.region(p,b),className:"grid gap-4 lg:grid-cols-2",children:[
|
|
3
3
|
/* @__PURE__ */n("div",{className:"rounded-lg border border-gray-200 bg-white p-4",children:[
|
|
4
|
-
/* @__PURE__ */c(e,{value:
|
|
4
|
+
/* @__PURE__ */c(e,{value:S,onChange:()=>{},onFile:e=>{if(k)return;W();const r=URL.createObjectURL(e);j.current=r,R(e),I(r),A("")},label:p,hint:C||O.usedFor(b),error:C||void 0,accept:v,acceptHint:y,maxSizeBytes:N,fit:"contain",height:180,allowRemove:!1,busy:E||P,disabled:k}),
|
|
5
5
|
/* @__PURE__ */n("div",{className:"mt-3 flex flex-wrap gap-2",children:[
|
|
6
|
-
/* @__PURE__ */c(a,{onClick:async()=>{if(L&&!k&&!
|
|
7
|
-
/* @__PURE__ */c("h3",{className:"text-sm font-semibold text-gray-900",children:
|
|
8
|
-
/* @__PURE__ */c("div",{className:"mt-3 grid gap-3",children:w.map(e=>{const a=/* @__PURE__ */c(r,{src:
|
|
6
|
+
/* @__PURE__ */c(a,{onClick:async()=>{if(L&&!k&&!E){H(!0),A("");try{await x(L),W(),R(null),I("")}catch(e){A(e instanceof Error?e.message:O.saveFailed(G,p))}finally{H(!1)}}},disabled:!L||k,loading:E,children:O.save(G,p)}),(L||d)&&/* @__PURE__ */c(a,{variant:"ghost-danger",onClick:async()=>{if(!k&&!P){if(L)return W(),R(null),I(""),void A("");if(d){F(!0),A("");try{await f()}catch(e){A(e instanceof Error?e.message:O.removeFailed(G,p))}finally{F(!1)}}}},disabled:k,loading:P,children:L?O.discard:O.remove(G,p)})]})]}),w.length>0&&/* @__PURE__ */n("div",{className:"rounded-lg border border-gray-200 bg-white p-4","aria-label":O.previews(p),children:[
|
|
7
|
+
/* @__PURE__ */c("h3",{className:"text-sm font-semibold text-gray-900",children:O.preview}),
|
|
8
|
+
/* @__PURE__ */c("div",{className:"mt-3 grid gap-3",children:w.map(e=>{const a=/* @__PURE__ */c(r,{src:S,alt:O.alt(b,p),slot:e.slot,surface:e.surface,adaptive:!0,hasAlpha:B,isLight:J,size:"browser-tab"===e.kind?16:void 0});/* @__PURE__ */
|
|
9
9
|
return n("div",{"data-brand-preview":!0,className:"dark"===e.surface?"text-white":"text-gray-900",children:[
|
|
10
10
|
/* @__PURE__ */c("div",{className:"mb-2 text-xs font-medium text-gray-500",children:e.label}),"browser-tab"===e.kind?/* @__PURE__ */n("div",{className:"flex items-end gap-1 border-b border-gray-200",children:[
|
|
11
11
|
/* @__PURE__ */n("div",{className:"flex max-w-[220px] items-center gap-2 rounded-t-lg border border-b-0 border-gray-200 bg-white px-3 py-2",children:[a,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{arcPath as e}from"./chunk-VFC6QUEN.js";import{MOTION as t,stagger as l}from"./chunk-465RRWBY.js";import{useHighlight as a}from"./chunk-CNYAHYE6.js";import{ChartTooltip as r}from"./chunk-
|
|
2
|
-
return g("div",{className:`relative ${
|
|
3
|
-
/* @__PURE__ */g("svg",{width:"100%",height:K,viewBox:`0 0 ${ee} ${K}`,role:"img","aria-labelledby":
|
|
4
|
-
/* @__PURE__ */p("title",{id:
|
|
5
|
-
return p("path",{d:e(te,le,re,c,o,h),fill:n,fillOpacity:ce(r,a.key)?.4:1,stroke:s.surface,strokeWidth:1,className:
|
|
1
|
+
import{arcPath as e}from"./chunk-VFC6QUEN.js";import{MOTION as t,stagger as l}from"./chunk-465RRWBY.js";import{useHighlight as a}from"./chunk-CNYAHYE6.js";import{ChartTooltip as r}from"./chunk-G4GVLK44.js";import{angleScale as n}from"./chunk-2JWPNR2U.js";import{usePlotWidth as o}from"./chunk-MAFUXCPZ.js";import{CHART_INK as s,resolveSeriesColor as i}from"./chunk-TZFACUMR.js";import{useShellStrings as h,useShellLocale as c}from"./chunk-4PAWQEXM.js";import{formatPercent as m,formatPlain as u}from"./chunk-C3QOHMR6.js";import{useId as d,useState as f,useRef as y}from"react";import{jsx as p,jsxs as g}from"react/jsx-runtime";function x({segments:x,variant:v="pie",size:k=280,innerRadius:M,padAngle:b=.012,maxSegments:N=6,otherLabel:$,formatValue:j,centerLabel:I,animate:P=!0,labels:w="none",labelMinShare:A=.04,className:F,emptyLabel:S}){const C=h().charts,W=c(),E=j??(e=>u(e,W)),R=$??C.other,z=S??C.nothingToBreakDown,L=d(),[T,V]=f(null),{highlighted:_}=a(),U=y(null),Y=o(U,Number.POSITIVE_INFINITY),B=x.map((e,t)=>({...e,slot:t})).filter(e=>e.value>0);if(0===B.length)/* @__PURE__ */return p("p",{className:`text-sm text-gray-500 ${F??""}`,children:z});const O=[...B].sort((e,t)=>t.value-e.value),Q=O.slice(0,N),G=O.slice(N),H=G.length>0?[...Q,{key:"__other__",label:R,value:G.reduce((e,t)=>e+t.value,0),slot:-1,color:s.muted}]:Q,X=e=>i(e.slot,e.color,e.tone),Z=H.reduce((e,t)=>e+t.value,0),q=Math.ceil(.62*Math.max(...H.map(e=>String(e.label).length),4)*11)+24,D="outside"===w&&Y>=120+2*q,J=D?q:0,K=D?Math.max(120,Math.min(k,Y-2*J)):k,ee=K+2*J,te=J+K/2,le=K/2,ae=K/2-12,re=M??("ring"===v?.58*ae:0),ne=n(H.length,b),oe=Math.max(...H.map(e=>e.value)),se=e=>re+(ae-re)*Math.sqrt(Math.max(0,e)/oe);let ie=-Math.PI/2;const he=(()=>{if(!D)return[];let e=-Math.PI/2;const t=H.map((t,l)=>{const a="rose"===v?n(H.length,b).step:t.value/Z*Math.PI*2,r="rose"===v?n(H.length,b).center(l):e+a/2;e+=a;const o="rose"===v?se(t.value):ae;return{key:t.key,label:t.label,share:t.value/Z,right:Math.cos(r)>=0,anchor:[te+o*Math.cos(r),le+o*Math.sin(r)],y:le+(o+14)*Math.sin(r),index:l}}).filter(e=>e.share>=A),l=Math.max(1,Math.floor((K-11-13)/26)+1),a=/* @__PURE__ */new Set;for(const e of[!0,!1]){const r=t.filter(t=>t.right===e).sort((e,t)=>t.share-e.share).slice(0,l).sort((e,t)=>e.y-t.y);for(let e=1;e<r.length;e+=1)r[e].y-r[e-1].y<26&&(r[e].y=r[e-1].y+26);for(let e=r.length-1;e>=0;e-=1){const t=e===r.length-1?K-13:r[e+1].y-26;r[e].y=Math.min(r[e].y,t)}r.forEach((e,t)=>{e.y=Math.max(e.y,0===t?11:r[t-1].y+26),a.add(e.key)})}return t.filter(e=>a.has(e.key))})(),ce=(e,t)=>null!==T?T!==e:null!==_&&_!==t,me=null!==T?H[T]:void 0;/* @__PURE__ */
|
|
2
|
+
return g("div",{className:`relative ${F??""}`,ref:U,children:[
|
|
3
|
+
/* @__PURE__ */g("svg",{width:"100%",height:K,viewBox:`0 0 ${ee} ${K}`,role:"img","aria-labelledby":L,onMouseLeave:()=>V(null),children:[
|
|
4
|
+
/* @__PURE__ */p("title",{id:L,children:C.breakdown(E(Z),H.length)}),H.map((a,r)=>{const n=X(a),o="rose"===v?ne(r):ie,i="rose"===v?ne.step:a.value/Z*Math.PI*2-b;"rose"!==v&&(ie+=a.value/Z*Math.PI*2);const h=o+Math.max(.001,i),c="rose"===v?se(a.value):ae;/* @__PURE__ */
|
|
5
|
+
return p("path",{d:e(te,le,re,c,o,h),fill:n,fillOpacity:ce(r,a.key)?.4:1,stroke:s.surface,strokeWidth:1,className:P?t.sweep:void 0,style:P?l(r,55):void 0,onMouseEnter:()=>V(r)},a.key)}),he.map(e=>{const t=e.right?ee-6:6,l=e.right?te+ae+14:te-ae-14;/* @__PURE__ */
|
|
6
6
|
return g("g",{children:[
|
|
7
7
|
/* @__PURE__ */p("polyline",{points:`${e.anchor[0].toFixed(1)},${e.anchor[1].toFixed(1)} ${l},${e.y.toFixed(1)} ${t},${e.y.toFixed(1)}`,fill:"none",stroke:s.grid,strokeWidth:1}),
|
|
8
8
|
/* @__PURE__ */p("text",{x:t,y:e.y-2,fontSize:11,fill:s.label,textAnchor:e.right?"end":"start",children:e.label}),
|
|
9
|
-
/* @__PURE__ */p("text",{x:t,y:e.y+10,fontSize:11,fontWeight:600,fill:s.label,textAnchor:e.right?"end":"start",style:{fontVariantNumeric:"tabular-nums"},children:m(100*e.share,1,
|
|
9
|
+
/* @__PURE__ */p("text",{x:t,y:e.y+10,fontSize:11,fontWeight:600,fill:s.label,textAnchor:e.right?"end":"start",style:{fontVariantNumeric:"tabular-nums"},children:m(100*e.share,1,W)})]},`lbl-${e.key}`)}),I&&re>0&&/* @__PURE__ */p("text",{x:te,y:le+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:s.label,children:I})]}),me&&null!==T&&/* @__PURE__ */p("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */p(r,{title:me.label,rows:[{key:"value",label:C.value,color:X(me),value:E(me.value)},{key:"share",label:C.share,color:s.muted,value:m(me.value/Z*100,1,W)}]})}),
|
|
10
10
|
/* @__PURE__ */p("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:H.map((e,t)=>/* @__PURE__ */g("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
|
|
11
11
|
/* @__PURE__ */p("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:X(e)}}),
|
|
12
12
|
/* @__PURE__ */p("span",{className:"flex-1 truncate",children:e.label}),
|
|
13
|
-
/* @__PURE__ */p("span",{className:"tabular-nums text-gray-800",children:m(e.value/
|
|
13
|
+
/* @__PURE__ */p("span",{className:"tabular-nums text-gray-800",children:m(e.value/Z*100,1,W)})]},e.key))})]})}export{x as PieChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
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-4PAWQEXM.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:E,addItemText:D}){const j=t().kanban,I=r(),M=N??j.loading,T=C??j.dropHere,A=D??j.addItem,[H,O]=o(null),[$,R]=o(null),S=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]),q=()=>{O(null),R(null)},z=i(null),F=i(/* @__PURE__ */new Map);n(()=>{if(null!==H)return;const e=z.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=F.current.get(r);if(o){const n=o.left-a.left,r=o.top-a.top;(n||r)&&t.push([e,n,r])}}),F.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})})}},[S,H]);return v?/* @__PURE__ */d(e,{size:"sm",padding:"p-4",label:M}):0!==m.length||w?/* @__PURE__ */d("div",{ref:z,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=S[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
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=(S[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)}}q()})(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:[
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{useSidebarSheet as e}from"./chunk-QWK6DRSN.js";import{resolveSeverity as t,severityWord as n}from"./chunk-TZFNWAED.js";import{ItemCount as r}from"./chunk-
|
|
1
|
+
import{useSidebarSheet as e}from"./chunk-QWK6DRSN.js";import{resolveSeverity as t,severityWord as n}from"./chunk-TZFNWAED.js";import{ItemCount as r}from"./chunk-QHOBK35Y.js";import{Icon as l}from"./chunk-2UO47XB4.js";import{useBrowserState as a}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-4PAWQEXM.js";import{useId as o,useRef as c,useEffect as s,Children as u,isValidElement as d}from"react";import{jsx as m,jsxs as h,Fragment as p}from"react/jsx-runtime";function f({children:e,count:t,countLabel:n}){return null==t?/* @__PURE__ */m("p",{className:"px-3 pb-1 pt-1 text-xs font-semibold uppercase tracking-wide text-gray-500",children:e}):/* @__PURE__ */h("p",{className:"flex items-center justify-between gap-2 px-3 pb-1 pt-1 text-xs font-semibold uppercase tracking-wide text-gray-500",children:[
|
|
2
2
|
/* @__PURE__ */m("span",{className:"min-w-0 truncate",children:e}),
|
|
3
|
-
/* @__PURE__ */m(r,{count:t,label:n,showZero:!0})]})}function b(e){return"flex min-w-0 flex-1 items-center justify-between gap-2 rounded-r-lg border-l-2 h-8 px-3 text-sm "+(e?"border-blue-500 bg-accent-tint font-medium text-blue-700":"border-line text-ink hover:bg-gray-100")}function x({label:l,count:a,countLabel:u,active:d,onClick:f,icon:x,trailing:g,severity:w,depth:k=0}){const y=t(w,"SidebarNavItem"),v=i().severity,N=y?n(y,v):void 0,j=e(),S=o(),C=c(null),
|
|
3
|
+
/* @__PURE__ */m(r,{count:t,label:n,showZero:!0})]})}function b(e){return"flex min-w-0 flex-1 items-center justify-between gap-2 rounded-r-lg border-l-2 h-8 px-3 text-sm "+(e?"border-blue-500 bg-accent-tint font-medium text-blue-700":"border-line text-ink hover:bg-gray-100")}function x({label:l,count:a,countLabel:u,active:d,onClick:f,icon:x,trailing:g,severity:w,depth:k=0}){const y=t(w,"SidebarNavItem"),v=i().severity,N=y?n(y,v):void 0,j=e(),S=o(),C=c(null),I=c(l);I.current=l,s(()=>{if(j&&d)return j.report(S,()=>I.current,C.current)},[j,d,S]);const W=/* @__PURE__ */h(p,{children:[null!=x&&/* @__PURE__ */m("span",{"aria-hidden":"true",className:"shrink-0 h-4 w-4",children:x}),y&&
|
|
4
4
|
/* @__PURE__ */m("span",{"aria-hidden":"true",title:N,className:`shrink-0 h-1.5 w-1.5 rounded-full ${y.fill}`}),
|
|
5
5
|
/* @__PURE__ */m("span",{className:"min-w-0 truncate mr-auto",title:"string"==typeof l?l:void 0,children:l}),y&&/* @__PURE__ */m("span",{className:"sr-only",children:N}),null!=a&&/* @__PURE__ */m(r,{count:a,label:u,active:d}),null!=g&&/* @__PURE__ */m("span",{className:"shrink-0",children:g})]});/* @__PURE__ */
|
|
6
|
-
return m("button",1===k?{ref:C,type:"button",onClick:f,className:"flex w-full pl-5 text-left",children:/* @__PURE__ */m("span",{className:b(d),children:
|
|
6
|
+
return m("button",1===k?{ref:C,type:"button",onClick:f,className:"flex w-full pl-5 text-left",children:/* @__PURE__ */m("span",{className:b(d),children:W})}:{ref:C,type:"button",onClick:f,className:"flex w-full items-center justify-between gap-2 rounded-lg h-8 px-3 text-sm text-left "+(d?"bg-accent-tint font-medium text-blue-700":"text-ink hover:bg-gray-100"),children:W})}function g({label:e,count:t,countLabel:n,children:i,defaultExpanded:c=!0,storageKey:s}){const p=o(),[f,b]=a(()=>{if(s){let e=null;try{e=window.localStorage.getItem(s)}catch{}if("1"===e||"0"===e)return"1"===e}return c},c),x=!f&&u.toArray(i).some(e=>d(e)&&!0===e.props.active);/* @__PURE__ */
|
|
7
7
|
return h("div",{children:[
|
|
8
8
|
/* @__PURE__ */h("button",{type:"button",onClick:()=>{const e=!f;if(b(e),s)try{window.localStorage.setItem(s,e?"1":"0")}catch{}},"aria-expanded":f,"aria-controls":p,className:"flex w-full items-center gap-2 rounded-lg h-8 px-3 text-sm font-medium text-left "+(x?"bg-accent-tint text-blue-700":"text-ink-strong hover:bg-gray-100"),children:[
|
|
9
9
|
/* @__PURE__ */m("span",{className:"min-w-0 truncate",title:e,children:e}),
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{useOverlayTarget as e,usePopupAnchor as r,usePanelPosition as i,OverlayLayerProvider as t}from"./chunk-3DVNXNTF.js";import{useDiscardGuard as l}from"./chunk-N3TOHWFF.js";import{dialogA11y as a}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as o}from"./chunk-7QSDPSXP.js";import{useFocusTrap as n,useScrollLock as s}from"./chunk-CDAJKLGL.js";import{Icon as d}from"./chunk-2UO47XB4.js";import{Z_LAYERS as c}from"./chunk-62LW225J.js";import{useHydrated as m}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as u}from"./chunk-TWVUQUUD.js";import{useShellStrings as p}from"./chunk-4PAWQEXM.js";import{useRef as f,useId as h,useState as x,useEffect as v}from"react";import{createPortal as b}from"react-dom";import{jsxs as y,Fragment as g,jsx as k}from"react/jsx-runtime";var N={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-4xl","2xl":"max-w-6xl"};function j({open:j,onClose:w,title:W,description:C,role:D="dialog",children:T,footer:F,blocking:L=!1,size:U="md",aside:X=!1,dirty:A=!1,initialFocus:J,"aria-label":P,"aria-labelledby":Q,"aria-describedby":V,className:$=""}){const z=f(null),B=h(),G=h(),H=!L,I=h(),O=p().dialog,S=e(m()),[E,K]=x(null),M=l({open:j,dirty:A,onClose:w,title:W,layer:E}),Y=f(null),Z=r(j&&null!==S,Y),q=i(Z,z);if(o(j),n(z,j&&null!==S,J),s(j),v(()=>{if(j)return u(()=>(L||M(),!0),()=>z.current)},[j,L,M]),!j||!S)return null;/* @__PURE__ */
|
|
2
|
+
return y(g,{children:[/* @__PURE__ */k("span",{ref:Y,hidden:!0,"data-popup-anchor":""}),b(
|
|
3
|
+
/* @__PURE__ */k(t,{value:E,children:/* @__PURE__ */y("div",{ref:K,className:"fixed inset-0"+(X?" pointer-events-none opacity-0":""),style:{zIndex:c.overlay},role:"presentation","data-overlay-layer":"","data-aside":X?"":void 0,children:[
|
|
4
|
+
/* @__PURE__ */k("div",{className:"fixed inset-0 bg-black/30","aria-hidden":"true"}),
|
|
5
|
+
/* @__PURE__ */k("div",{className:Z?"fixed inset-0":"fixed inset-0 flex items-center justify-center p-4",onClick:L?void 0:e=>{e.target===e.currentTarget&&M()},children:/* @__PURE__ */y("div",{ref:z,"data-popup-panel":"",style:Z?{left:q?.left??0,top:q?.top??0,visibility:q?void 0:"hidden"}:void 0,...a({role:D,modal:!0,titleId:W?I:void 0,labelledBy:Q,label:P}),"aria-describedby":V??(C?G:T?B:void 0),className:`${Z?"absolute max-h-[calc(100%-2rem)] w-[calc(100%-2rem)]":"relative max-h-full w-full"} ${N[U]} overflow-y-auto overscroll-contain rounded-(--radius-card) bg-white p-6 shadow-xl ${$}`.trim(),children:[W&&/* @__PURE__ */k("h2",{id:I,className:(H?"pr-8 ":"")+"text-base font-semibold text-gray-900",children:W}),C&&/* @__PURE__ */k("p",{id:G,className:((W?"mt-1":H?"pr-8":"")+" text-sm text-gray-500").trim(),children:C}),T&&/* @__PURE__ */k("div",{id:B,className:"mt-2 text-sm text-gray-600",children:T}),F&&/* @__PURE__ */k("div",{className:"mt-6 flex flex-wrap justify-end gap-3",children:F}),H&&/* @__PURE__ */k("button",{type:"button",onClick:M,"aria-label":O.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__ */k(d,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})]})})]})}),S)]})}export{j as Dialog};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import{TimelineCard as e}from"./chunk-S4Z657L6.js";import{TimelineGlyph as t,TimelineProgressIcon as r,TimelineTrack as n}from"./chunk-
|
|
2
|
-
return b("div",{className:"select-none",children:/* @__PURE__ */b(n,{axis:_?"spread":"linear",labels:_?"none":"active",endMark:_?v:null,items:x,markers:
|
|
1
|
+
import{TimelineCard as e}from"./chunk-S4Z657L6.js";import{TimelineGlyph as t,TimelineProgressIcon as r,TimelineTrack as n}from"./chunk-CKKUFDZ3.js";import{toDayMs as a,fmtSliderDate as o,DAY_MS as i}from"./chunk-7TC3LJQM.js";import{Icon as s}from"./chunk-2UO47XB4.js";import{useBrowserValueOnce as l}from"./chunk-D65T4H6J.js";import{useShellStrings as c,useShellLocale as d,splitAround as p}from"./chunk-4PAWQEXM.js";import{useState as u,useEffect as m,useRef as g}from"react";import{jsxs as h,jsx as b,Fragment as y}from"react/jsx-runtime";var k=/* @__PURE__ */new Set(["finished","partial_shipped","shipped","completed","cancelled"]),f=[{key:"casting",label:"Casting",weight:.2},{key:"cnc",label:"CNC",weight:.2},{key:"painting",label:"Painting",weight:.5},{key:"packing",label:"Packing",weight:.1},{key:"finished_goods",label:"FG",weight:0},{key:"stock_qty",label:"Stock",weight:0}];function _(e){if(e.order_qty<=0)return 0;let t=0;for(const r of f)if(r.weight>0){t+=Math.min((e[r.key]||0)/e.order_qty,1)*r.weight}return 100*t}function v(e){const t=e?.items??[];return 0===t.length?0:t.reduce((e,t)=>e+_(t),0)/t.length}function M(e){const{reports:t,poProductionStartDate:r,poEstCompletionDate:n,poStatus:o,poNumber:s="",currentReportId:d,currentReportDate:p,msPerDayOfPlayback:h=500,markers:b=[]}=e,[y,f]=u(null),_=c().production;m(()=>{p?f(new Date(p).getTime()):t.length>0&&f(new Date(t[0].date).getTime())},[d]);const[v,M]=u(!1),w=g(null),N=()=>{null!=w.current&&(cancelAnimationFrame(w.current),w.current=null),M(!1)};m(()=>()=>N(),[]),m(()=>{N()},[d]);const x=t.map(e=>a(e.date)).filter(e=>null!=e),S=l(Date.now,null)??Math.max(0,...x,...b.map(e=>a(e.date)??0),a(r??null)??0,a(n??null)??0),C=x.length?Math.min(...x):S,P=x.length?Math.max(...x):S,D=a(r??null)??C,R=a(n??null)??0,O=k.has((o||"").toLowerCase()),q=b.reduce((e,t)=>{const r=a(t.date);return null!=r&&r>e?r:e},0),T=(()=>{const e=[R,P,q,D+i];return O||e.push(S),Math.max(...e)})(),A=Math.max(1,Math.round((T-D)/i)),L=a(p??null)??P??D,I=Math.min(Math.max(y??L,D),T),j=t.find(e=>{const t=a(e.date);return null!=t&&t<=I})??null;let $=null;for(let e=t.length-1;e>=0;e--){const r=a(t[e].date);if(null!=r&&r>I){$=t[e];break}}const F=(()=>{if(j||!$||0===t.length)return null;const e=(t[t.length-1].items??[]).map((e,t)=>({id:`zero-${e.part_number}-${t}`,part_number:e.part_number,description:e.description??"",order_qty:Number(e.order_qty||0),casting:0,cnc:0,painting:0,packing:0,finished_goods:0,stock_qty:0}));return{id:`zero-${s}`,progress_number:_.start,date:r||new Date(D).toISOString().slice(0,10),items:e,est_completion_date:n??null,created_by_name:"",notes:""}})(),K=j??F,z=j?a(j.date):F?D:null,B=$?a($.date):null,E=!!(K&&$&&null!=z&&null!=B&&I>z&&I<B);let J,Q;if(E&&null!=z&&null!=B){const e=(I-z)/Math.max(B-z,1),t=(t,r)=>Math.round(t+(r-t)*e),r={};for(const e of K?.items??[])r[e.part_number]=e;const n={};for(const e of $?.items??[])n[e.part_number]=e;const o=Array.from(/* @__PURE__ */new Set([...Object.keys(r),...Object.keys(n)])).map((e,a)=>{const o=r[e]??{},i=n[e]??{},s=e=>Number(e)||0;return{id:`interp-${e}-${a}`,part_number:e,description:o.description??i.description??"",order_qty:s(o.order_qty??i.order_qty??0),casting:t(s(o.casting),s(i.casting)),cnc:t(s(o.cnc),s(i.cnc)),painting:t(s(o.painting),s(i.painting)),packing:t(s(o.packing),s(i.packing)),finished_goods:t(s(o.finished_goods),s(i.finished_goods)),stock_qty:t(s(o.stock_qty),s(i.stock_qty))}}),i=a(K?.est_completion_date),s=a($?.est_completion_date);let l;l=null!=i&&null!=s?new Date(Math.round(i+(s-i)*e)).toISOString().slice(0,10):K?.est_completion_date||$?.est_completion_date||null,J={id:`interp-${I}`,progress_number:_.estimated,date:new Date(I).toISOString().slice(0,10),created_by_name:"",est_completion_date:l,items:o,notes:""},Q=K}else if(J=K??t[t.length-1]??null,J){const e=t.findIndex(e=>e.id===J.id);Q=e>=0&&e<t.length-1?t[e+1]:null}else Q=null;const U={};for(const e of Q?.items??[])U[e.part_number]=e;const X=!(!d||J?.id===d),Z=d?Math.min(a(p??null)??T,T):T,G=d?t.find(e=>e.id===d)?.progress_number:void 0;return{startMs:D,endMs:T,totalLeadDays:A,scrubMs:I,setScrubMs:e=>{N(),f(e)},resetToCurrent:()=>{N(),p&&f(new Date(p).getTime())},scrubbedAway:X,beforeAnchor:K,nextAfter:$,displayed:J,prevReport:Q,prevByPN:U,isInterpolated:E,playing:v,startPlay:()=>{if(v)return void N();if(Z<=D)return void f(Z);M(!0),f(D);let e=performance.now(),t=D;const r=n=>{const a=n-e;if(e=n,t+=a/h*i,t>=Z)return f(Z),w.current=null,void M(!1);f(t),w.current=requestAnimationFrame(r)};w.current=requestAnimationFrame(r)},stopPlay:N,reports:t,markers:b,poNumber:s,currentReportId:d,currentReportProgressNumber:G,estCompletionMs:a(n??null)}}function w({startMs:e,endMs:t,reports:r,markers:a,valueMs:i,activeId:s,onChange:l,onPickReport:p,onOpenReport:u,onOpenMarker:m,onDragStart:g,renderReportPreview:h,reportLabel:y,playback:k,edgeCaptions:f,bare:_=!1,endMark:v=null}){const M=c().production,w=d(),N=r.map(e=>({report:e,ms:new Date(e.date).getTime()})).filter(({ms:e})=>Number.isFinite(e)).sort((e,t)=>e.ms-t.ms),x=N.map(({report:e,ms:t})=>({key:e.id,ms:t,kind:"report",label:y(e),preview:e.preview??h?.(e),onOpen:u?()=>u(e.id):void 0})),S=new Map(N.map(({report:e,ms:t})=>[e.id,t])),C=N.map(({ms:e})=>e),P=m?a.map(e=>({...e,onOpen:m})):a;/* @__PURE__ */
|
|
2
|
+
return b("div",{className:"select-none",children:/* @__PURE__ */b(n,{axis:_?"spread":"linear",labels:_?"none":"active",endMark:_?v:null,items:x,markers:P,startMs:e,endMs:t,activeKey:s,onActivate:e=>{const t=S.get(e);null!=t&&l(t),p(e)},playback:k,edgeCaptions:f,thumb:{valueMs:i,onChange:l,onDragStart:g,stops:C,ariaLabel:M.scrub,valueText:e=>{const t=(e=>N.find(t=>t.ms===e)?.report)(e);return t?`${y(t)} · ${o(e,w)}`:o(e,w)}},ariaLabel:M.label(o(e,w),o(t,w))})})}function N({snapshot:n,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,onScrubProgress:f,heading:_,edgeCaptions:M,reportLabel:N=e=>e.progress_number,resetLabel:x,variant:S="card",onPlayStart:C}){const{reports:P,markers:D,poNumber:R,startMs:O,endMs:q,totalLeadDays:T,scrubMs:A,setScrubMs:L,displayed:I,scrubbedAway:j,resetToCurrent:$,currentReportId:F,currentReportProgressNumber:K,estCompletionMs:z}=n,B=function(e,t,r){const[n,a]=u(!1),o=g(!1);return{playing:n,toggle:()=>{n?a(!1):0!==e.length&&(r?.(),o.current||(o.current=!0,t(e[0])),a(!0))},stop:()=>{o.current=!1,a(!1)}}}(P.map(e=>a(e.date)).filter(e=>null!=e).sort((e,t)=>e-t),L,C),E=c().production,J=d(),Q=_??E.heading,U=e=>o(e,J);if(0===P.length&&0===D.length)return null;const X=D.filter(e=>"shipment"===e.kind),Z=D.filter(e=>"inspection"===e.kind),G=D.filter(e=>"invoice"===e.kind),H=(I?.items??[]).reduce((e,t)=>e+(Number(t.stock_qty)||0),0),W=I?v(I):0,V=P.find(e=>e.id===F),Y=V?N(V):K,ee=
|
|
3
3
|
/* @__PURE__ */h("button",{type:"button",onClick:B.toggle,"aria-pressed":B.playing,title:B.playing?E.pause:E.playTitle,className:"rosh-tl-play text-gray-700 border-gray-300 hover:text-blue-600 hover:border-blue-600",children:[B.playing?/* @__PURE__ */b(s,{name:"pause","aria-hidden":"true"}):/* @__PURE__ */b(s,{name:"play","aria-hidden":"true"}),
|
|
4
|
-
/* @__PURE__ */b("span",{children:B.playing?E.pause:E.play})]}),te=j&&(x??Y)?/* @__PURE__ */b("button",{type:"button",onClick:()=>{B.stop(),$()},className:"text-xs text-blue-600 underline-offset-4 hover:underline font-medium",children:x??E.backTo(String(Y))}):null,[re,ne]=p(E.showing),ae=e=>/* @__PURE__ */b("p",{className:"rosh-tl-status text-gray-800",children:
|
|
5
|
-
/* @__PURE__ */b("b",{className:"font-medium",children:N(
|
|
6
|
-
/* @__PURE__ */h("span",{className:"text-gray-500",children:[" · ",
|
|
4
|
+
/* @__PURE__ */b("span",{children:B.playing?E.pause:E.play})]}),te=j&&(x??Y)?/* @__PURE__ */b("button",{type:"button",onClick:()=>{B.stop(),$()},className:"text-xs text-blue-600 underline-offset-4 hover:underline font-medium",children:x??E.backTo(String(Y))}):null,[re,ne]=p(E.showing),ae=e=>/* @__PURE__ */b("p",{className:"rosh-tl-status text-gray-800",children:I?/* @__PURE__ */h(y,{children:[e&&re,
|
|
5
|
+
/* @__PURE__ */b("b",{className:"font-medium",children:N(I)}),e&&ne,
|
|
6
|
+
/* @__PURE__ */h("span",{className:"text-gray-500",children:[" · ",U(new Date(I.date).getTime())," · ",E.overall(Math.round(W))," · ",E.inStock(H)]})]}):/* @__PURE__ */b("span",{className:"text-gray-500",children:E.noReport})});if("rail"===S){const e=null!=z&&z>=q&&q>O,t=e?{key:"__estimate__",label:E.estimatedCompletion,dateText:U(z)}:null;/* @__PURE__ */
|
|
7
7
|
return h("div",{className:"shrink-0","data-timeline-variant":"rail",children:[
|
|
8
|
-
/* @__PURE__ */b(w,{bare:!0,endMark:t,startMs:O,endMs:q,reports:
|
|
8
|
+
/* @__PURE__ */b(w,{bare:!0,endMark:t,startMs:O,endMs:q,reports:P,markers:D,valueMs:A,activeId:I?.id??"",onChange:L,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,reportLabel:N,edgeCaptions:{start:M?.start??E.start,end:M?.end??(e?E.estDone:void 0)},onDragStart:B.stop,playback:{playing:B.playing,onArrive:(e,t)=>L(t),onProgress:f,onStop:B.stop}}),
|
|
9
9
|
/* @__PURE__ */h("div",{className:"rosh-tl-railrow","data-timeline-part":"rail-row",children:[ee,te,ae(!1)]})]})}/* @__PURE__ */
|
|
10
|
-
return b("div",{className:"shrink-0",children:/* @__PURE__ */b(e,{icon:/* @__PURE__ */b(r,{}),heading:
|
|
11
|
-
/* @__PURE__ */h("div",{className:"rosh-tl-legend",children:[
|
|
10
|
+
return b("div",{className:"shrink-0",children:/* @__PURE__ */b(e,{icon:/* @__PURE__ */b(r,{}),heading:Q,subject:R,meta:[`${U(O)} → ${U(q)}`,E.leadTime(T)],actions:/* @__PURE__ */h(y,{children:[te,ee]}),footer:/* @__PURE__ */h(y,{children:[ae(!0),
|
|
11
|
+
/* @__PURE__ */h("div",{className:"rosh-tl-legend",children:[P.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
|
|
12
12
|
/* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-ring border-blue-600"}),E.report]}),X.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
|
|
13
|
-
/* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-diamond",style:{background:"var(--tl-shipment)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"truck"})}),E.shipment]}),
|
|
14
|
-
/* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-disc",style:{background:"var(--tl-inspection)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"flask"})}),E.inspection]}),
|
|
15
|
-
/* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-disc",style:{background:"var(--tl-invoice)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"receipt"})}),E.invoice]})]})]}),children:/* @__PURE__ */b(w,{startMs:O,endMs:q,reports:
|
|
13
|
+
/* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-diamond",style:{background:"var(--tl-shipment)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"truck"})}),E.shipment]}),Z.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
|
|
14
|
+
/* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-disc",style:{background:"var(--tl-inspection)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"flask"})}),E.inspection]}),G.length>0&&/* @__PURE__ */h("span",{className:"border-gray-200 text-gray-500",children:[
|
|
15
|
+
/* @__PURE__ */b("i",{"aria-hidden":"true",className:"rosh-tl-glyph is-disc",style:{background:"var(--tl-invoice)",color:"var(--tl-on-kind)"},children:/* @__PURE__ */b(t,{name:"receipt"})}),E.invoice]})]})]}),children:/* @__PURE__ */b(w,{startMs:O,endMs:q,reports:P,markers:D,valueMs:A,activeId:I?.id??"",onChange:L,onPickReport:i,onOpenReport:l,onOpenMarker:m,renderReportPreview:k,reportLabel:N,edgeCaptions:M,onDragStart:B.stop,playback:{playing:B.playing,onArrive:(e,t)=>L(t),onProgress:f,onStop:B.stop}})})})}export{k as POST_PRODUCTION_STATUSES,N as ProductionTimeline,f as STAGES,_ as calcOverall,v as calcReportOverall,M as useProductionTimeline};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{FormField as e}from"./chunk-6KBDNYRW.js";import{zoneFocusClass as t,mediaPromptLine as r,UploadGlyph as a,dropzoneClass as n,BusyOverlay as l,isVideoUrl as i,mediaFileName as o,FilenameBadge as s}from"./chunk-
|
|
2
|
-
return v("div",{...Te?{"data-grid-item":"","data-grid-id":e.id,role:"option"}:{},...ee?{[m]:""}:{},"aria-selected":Ke?Ke.has(e.id):void 0,onClick:Te?t=>{t.target.closest?.("button")||
|
|
1
|
+
import{FormField as e}from"./chunk-6KBDNYRW.js";import{zoneFocusClass as t,mediaPromptLine as r,UploadGlyph as a,dropzoneClass as n,BusyOverlay as l,isVideoUrl as i,mediaFileName as o,FilenameBadge as s}from"./chunk-B7UCXROE.js";import{useFileIntake as d,FileIntakeAlert as c}from"./chunk-6RX4PVBU.js";import{ColoredBadge as u}from"./chunk-7TNAOZZ2.js";import{MENU_ON_MEDIA_ATTR as m}from"./chunk-5QFPTDQF.js";import{Icon as p}from"./chunk-2UO47XB4.js";import{Tooltip as f}from"./chunk-6XBWM453.js";import{useShellStrings as h}from"./chunk-4PAWQEXM.js";import{useId as g,useState as b,useRef as y}from"react";import{jsxs as v,jsx as x}from"react/jsx-runtime";var k=112,D=/* @__PURE__ */x(p,{name:"close",strokeWidth:2,strokeLinecap:"round","aria-hidden":"true",className:"h-3 w-3"});function N({items:p,onPick:k,onFiles:N,onRemove:w,onReorder:j,dragType:K,onDragOutChange:T,dropType:C,onDropData:A,label:O,hint:P,error:E,required:F,className:I,accept:z="image/*",maxSizeBytes:B,maxFiles:L,fit:M="cover",thumbSize:S=96,placeholder:$,cta:R,acceptHint:W,showCover:X=!1,coverLabel:H,busy:U=!1,busyLabel:Q,progress:q,disabled:Z=!1,readOnly:V=!1,selected:Y,onItemClick:G,onItemDoubleClick:J,onItemContextMenu:_,menuOnMedia:ee=!1}){const te=h().media,re=R??te.cta,ae=H??te.cover,ne=Q??te.uploading,le=g(),[ie,oe]=b(null),se=Z||U,de=!(!k&&!N||se||V),ce=!!w&&!se&&!V,ue=!!j&&!se&&!V,me=!!K&&!Z&&!ue,pe=!(!C||!A||se||V),fe=t(se),he=$??r(z,te),ge=d({accept:z,maxSizeBytes:B,maxFiles:L,acceptHint:W,multiple:!0,disabled:!de,currentCount:p.length,onAccept:e=>{if(N)N(e);else for(const t of e)k(t)}}),[be,ye]=b(!1),ve=y(0),xe=e=>pe&&Array.from(e.dataTransfer?.types??[]).includes(C),ke=ge.zoneProps,De={onDragEnter:e=>{if(!xe(e))return ke.onDragEnter?.(e);e.preventDefault(),ve.current+=1,ye(!0)},onDragOver:e=>{if(!xe(e))return ke.onDragOver?.(e);e.preventDefault(),e.dataTransfer.dropEffect="link",be||ye(!0)},onDragLeave:e=>{if(!xe(e))return ke.onDragLeave?.(e);ve.current=Math.max(0,ve.current-1),0===ve.current&&ye(!1)},onDrop:e=>{if(!xe(e))return ke.onDrop?.(e);e.preventDefault(),ve.current=0,ye(!1);const t=e.dataTransfer.getData(C);t&&A(t)}},Ne=ge.dragOver||be,we=()=>{de&&(k?k():ge.open())},je={width:S,height:S},Ke=null==Y?null:new Set(Y),Te=!!G,Ce=S<112,Ae=(e,t)=>{const r=e.kind?"video"===e.kind:i(e.url,z),a=e.name??o(e.url),n=X&&(e.cover??0===t);/* @__PURE__ */
|
|
2
|
+
return v("div",{...Te?{"data-grid-item":"","data-grid-id":e.id,role:"option"}:{},...ee?{[m]:""}:{},"aria-selected":Ke?Ke.has(e.id):void 0,onClick:Te?t=>{t.target.closest?.("button")||G(e.id,{ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey})}:void 0,onDoubleClick:J?()=>J(e.id):void 0,onContextMenu:_?t=>_(e.id,t):void 0,draggable:ue||me&&!!e.dragData||void 0,onDragStart:ue?e=>{e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",String(t)),oe(t)}:me&&e.dragData?t=>{t.dataTransfer.effectAllowed=e.dragAlso?"all":"link",t.dataTransfer.setData(K,e.dragData);for(const[r,a]of Object.entries(e.dragAlso??{}))t.dataTransfer.setData(r,a);T?.("start",e.id)}:void 0,onDragEnd:ue?()=>oe(null):me&&e.dragData&&T?t=>T("none"===t.dataTransfer.dropEffect?"cancelled":"dropped",e.id):void 0,onDragOver:ue?e=>{null!=ie&&(e.preventDefault(),e.stopPropagation())}:void 0,onDrop:ue?e=>{null!=ie&&(e.preventDefault(),e.stopPropagation(),ie!==t&&j(ie,t),oe(null))}:void 0,tabIndex:ue||Te?0:void 0,"aria-label":ue?te.reorder(a,t+1,p.length):Te?a:void 0,onKeyDown:Te&&!ue?t=>{t.target!==t.currentTarget||"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),G(e.id,{ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey}))}:ue?e=>{"ArrowLeft"===e.key||"ArrowUp"===e.key?t>0&&(e.preventDefault(),j(t,t-1)):"ArrowRight"!==e.key&&"ArrowDown"!==e.key||t<p.length-1&&(e.preventDefault(),j(t,t+1))}:void 0,className:["relative shrink-0 overflow-hidden rounded-md border border-line bg-gray-100",fe,ie===t?"opacity-50":"",Ke?.has(e.id)?"ring-2 ring-blue-500 ring-offset-1":"",Te?"cursor-pointer":""].join(" "),style:{...je,cursor:ue?"move":void 0},children:[r?/* @__PURE__ */x("video",{src:e.url,muted:!0,playsInline:!0,preload:"metadata","aria-label":a,className:"h-full w-full",style:{objectFit:M}}):/* @__PURE__ */x("img",{src:e.url,alt:a,className:"h-full w-full",style:{objectFit:M}}),n&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 rounded bg-accent-fill px-2 py-0.5 text-xs font-medium text-on-accent",children:ae}),!n&&null!=e.mark&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs font-medium text-on-accent",style:{background:"var(--rosh-media-scrim)"},children:e.mark}),!n&&null==e.mark&&!!e.badges?.length&&
|
|
3
3
|
/* @__PURE__ */x("span",{"data-tile-badges":"",className:"absolute left-1 top-1 flex flex-nowrap items-center gap-1 overflow-hidden rounded-md bg-surface p-0.5 shadow-sm",style:{maxWidth:"calc(100% - 8px)"},children:e.badges.map(e=>/* @__PURE__ */x("span",{"data-tile-badge":"",className:"flex min-w-0",children:Ce?
|
|
4
4
|
/* @__PURE__ */x(f,{content:e.label,children:/* @__PURE__ */x("span",{tabIndex:0,"aria-label":e.label,className:`flex rounded-full ${fe}`,children:/* @__PURE__ */x(u,{tone:e.tone,size:"xs",children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"inline-flex items-center gap-0.5",children:[
|
|
5
|
-
/* @__PURE__ */x("span",{className:"inline-flex h-3 w-3 shrink-0 items-center justify-center",children:e.icon}),null!=e.count&&/* @__PURE__ */x("span",{children:e.count})]})})})}):/* @__PURE__ */x(u,{tone:e.tone,size:"xs",children:e.label})},e.key))}),null!=e.caption&&/* @__PURE__ */x(s,{children:e.caption}),ce&&/* @__PURE__ */x("button",{type:"button",onClick:()=>w(e.id),"aria-label":e.removeLabel??te.removeItem(a),className:`absolute right-1 top-1 flex h-5 w-5 items-center justify-center rounded-full text-white ${fe}`,style:{background:"var(--rosh-media-scrim-button)"},children:D})]},e.id)},
|
|
5
|
+
/* @__PURE__ */x("span",{className:"inline-flex h-3 w-3 shrink-0 items-center justify-center",children:e.icon}),null!=e.count&&/* @__PURE__ */x("span",{children:e.count})]})})})}):/* @__PURE__ */x(u,{tone:e.tone,size:"xs",children:e.label})},e.key))}),null!=e.caption&&/* @__PURE__ */x(s,{children:e.caption}),ce&&/* @__PURE__ */x("button",{type:"button",onClick:()=>w(e.id),"aria-label":e.removeLabel??te.removeItem(a),className:`absolute right-1 top-1 flex h-5 w-5 items-center justify-center rounded-full text-white ${fe}`,style:{background:"var(--rosh-media-scrim-button)"},children:D})]},e.id)},Oe=de&&/* @__PURE__ */v("button",{type:"button",onClick:()=>we(),"aria-label":te.addMedia,className:`flex shrink-0 flex-col items-center justify-center gap-1 rounded-md border-2 border-dashed border-gray-300 bg-gray-50 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-500 ${fe}`,style:je,children:[
|
|
6
6
|
/* @__PURE__ */x(a,{className:"h-5 w-5"}),
|
|
7
|
-
/* @__PURE__ */x("span",{className:"text-xs font-medium text-gray-500",children:te.add})]}),
|
|
7
|
+
/* @__PURE__ */x("span",{className:"text-xs font-medium text-gray-500",children:te.add})]}),Pe=de?/* @__PURE__ */v("button",{type:"button",onClick:()=>we(),"aria-label":"string"==typeof he?he:te.upload,className:n(Ne,!1,fe),style:{minHeight:S+32},children:[
|
|
8
8
|
/* @__PURE__ */x("span",{className:"text-ink-faintest",children:/* @__PURE__ */x(a,{})}),
|
|
9
9
|
/* @__PURE__ */x("span",{className:"px-3 text-xs text-ink-faint",children:he}),
|
|
10
|
-
/* @__PURE__ */x("span",{className:"text-sm font-medium text-blue-600",children:re}),
|
|
11
|
-
return v(e,{label:
|
|
12
|
-
/* @__PURE__ */v("div",{id:le,role:"group","aria-labelledby":
|
|
13
|
-
/* @__PURE__ */x("div",{role:"listbox","aria-multiselectable":!!Ke||void 0,"aria-label":"string"==typeof
|
|
10
|
+
/* @__PURE__ */x("span",{className:"text-sm font-medium text-blue-600",children:re}),W&&/* @__PURE__ */x("span",{className:"text-xs text-ink-faintest",children:W})]}):/* @__PURE__ */x("div",{className:"flex w-full items-center justify-center rounded-lg border border-line bg-surface-sunken px-3 text-xs text-ink-faintest",style:{minHeight:S+32},children:/* @__PURE__ */x("span",{className:U?"invisible":void 0,children:te.empty})});/* @__PURE__ */
|
|
11
|
+
return v(e,{label:O,labelId:O?`${le}-label`:void 0,htmlFor:le,hint:P,error:E,required:F,className:I,children:[
|
|
12
|
+
/* @__PURE__ */v("div",{id:le,role:"group","aria-labelledby":O?`${le}-label`:void 0,"aria-describedby":E?`${le}-error`:P?`${le}-hint`:void 0,"aria-busy":U||void 0,...ge.zoneProps,...pe?De:{},className:"relative rounded-lg transition-colors",style:{...se?{opacity:.6}:{},...Ne?{boxShadow:"0 0 0 2px var(--rosh-drop-ring)"}:{}},children:[0===p.length?Pe:/* @__PURE__ */v("div",{className:"flex flex-wrap gap-2",children:[Te?
|
|
13
|
+
/* @__PURE__ */x("div",{role:"listbox","aria-multiselectable":!!Ke||void 0,"aria-label":"string"==typeof O?O:te.files,className:"contents",children:p.map(Ae)}):p.map(Ae),Oe]}),U&&/* @__PURE__ */x(l,{label:ne,progress:q})]}),!k&&N&&/* @__PURE__ */x("input",{...ge.inputProps}),
|
|
14
14
|
/* @__PURE__ */x(c,{rejections:ge.rejections})]})}export{k as FULL_BADGE_TILE_PX,N as MediaUploadGrid};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{Card as e}from"./chunk-TOVKWNI2.js";import{Select_default as a}from"./chunk-
|
|
2
|
-
return d(
|
|
1
|
+
import{Card as e}from"./chunk-TOVKWNI2.js";import{Select_default as a}from"./chunk-VNACNNCJ.js";import{Pagination as r}from"./chunk-ULAGXDOL.js";import{Input_default as t}from"./chunk-MAMWQCJ6.js";import{StatusBadgeProvider as i,StatusBadge as s}from"./chunk-TXDA7TTP.js";import{Button_default as l}from"./chunk-I4VIEGCX.js";import{Icon as c}from"./chunk-2UO47XB4.js";import{TH_ONE_LINE as m}from"./chunk-MVZRZTQP.js";import{useState as n}from"react";import{jsx as d,jsxs as o}from"react/jsx-runtime";var h={active:"success",invited:"queued",suspended:"danger",pending:"pending"},p=[{name:"Alice Nguyen",email:"alice@acme.co",role:"Admin",status:"active"},{name:"Marco Reyes",email:"marco@acme.co",role:"Editor",status:"invited"},{name:"Priya Patel",email:"priya@acme.co",role:"Editor",status:"active"},{name:"Tom Becker",email:"tom@acme.co",role:"Viewer",status:"suspended"},{name:"Sara Lind",email:"sara@acme.co",role:"Viewer",status:"pending"},{name:"Yuki Tanaka",email:"yuki@acme.co",role:"Editor",status:"active"}];function u(){const[c,u]=n(1),[g,f]=n(""),[y,v]=n("");/* @__PURE__ */
|
|
2
|
+
return d(i,{groups:h,children:/* @__PURE__ */d("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */o("div",{className:"mx-auto max-w-5xl space-y-4",children:[
|
|
3
3
|
/* @__PURE__ */o("div",{className:"flex items-center justify-between gap-4",children:[
|
|
4
4
|
/* @__PURE__ */d("h1",{className:"text-xl font-semibold text-gray-900",children:"Members"}),
|
|
5
|
-
/* @__PURE__ */d(
|
|
5
|
+
/* @__PURE__ */d(l,{size:"sm",children:"Invite member"})]}),
|
|
6
6
|
/* @__PURE__ */o(e,{padded:!1,children:[
|
|
7
7
|
/* @__PURE__ */o("div",{className:"flex flex-wrap items-center gap-2 border-b border-gray-100 p-3",children:[
|
|
8
|
-
/* @__PURE__ */d("div",{className:"min-w-48 flex-1",children:/* @__PURE__ */d(
|
|
8
|
+
/* @__PURE__ */d("div",{className:"min-w-48 flex-1",children:/* @__PURE__ */d(t,{value:y,onChange:e=>v(e.target.value),placeholder:"Search members…",leftIcon:/* @__PURE__ */d(x,{})})}),
|
|
9
9
|
/* @__PURE__ */d("div",{className:"w-40",children:/* @__PURE__ */d(a,{value:g,onChange:f,placeholder:"All roles",options:[{value:"admin",label:"Admin"},{value:"editor",label:"Editor"},{value:"viewer",label:"Viewer"}]})}),
|
|
10
|
-
/* @__PURE__ */d(
|
|
10
|
+
/* @__PURE__ */d(l,{variant:"secondary",size:"sm",children:"Filter"})]}),
|
|
11
11
|
/* @__PURE__ */o("table",{className:"w-full text-sm",children:[
|
|
12
12
|
/* @__PURE__ */d("thead",{children:/* @__PURE__ */o("tr",{className:"border-b border-gray-100 text-left text-xs uppercase tracking-wide text-gray-400",children:[
|
|
13
13
|
/* @__PURE__ */d("th",{className:`${m} px-4 py-2 font-medium`,children:"Name"}),
|
|
@@ -19,9 +19,9 @@ return d(t,{groups:h,children:/* @__PURE__ */d("div",{className:"h-full overflow
|
|
|
19
19
|
/* @__PURE__ */d("div",{className:"font-medium text-gray-900",children:e.name}),
|
|
20
20
|
/* @__PURE__ */d("div",{className:"text-xs text-gray-400",children:e.email})]}),
|
|
21
21
|
/* @__PURE__ */d("td",{className:"px-4 py-3",children:e.role}),
|
|
22
|
-
/* @__PURE__ */d("td",{className:"px-4 py-3",children:/* @__PURE__ */d(
|
|
23
|
-
/* @__PURE__ */d("td",{className:"px-4 py-3 text-right",children:/* @__PURE__ */d(
|
|
22
|
+
/* @__PURE__ */d("td",{className:"px-4 py-3",children:/* @__PURE__ */d(s,{status:e.status})}),
|
|
23
|
+
/* @__PURE__ */d("td",{className:"px-4 py-3 text-right",children:/* @__PURE__ */d(l,{variant:"ghost",size:"sm",children:"Edit"})})]},e.email))})]}),
|
|
24
24
|
/* @__PURE__ */o("div",{className:"flex items-center justify-between border-t border-gray-100 p-3",children:[
|
|
25
25
|
/* @__PURE__ */d("span",{className:"text-xs text-gray-400",children:"Showing 1–6 of 48"}),
|
|
26
|
-
/* @__PURE__ */d(
|
|
27
|
-
return d(
|
|
26
|
+
/* @__PURE__ */d(r,{page:c,pageCount:8,onPageChange:u,showEdges:!0})]})]})]})})})}function x(){/* @__PURE__ */
|
|
27
|
+
return d(c,{name:"search",className:"h-4 w-4",strokeWidth:"2","aria-hidden":"true"})}export{u as DataTablePage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useInsideTooltip as e,Tooltip as n}from"./chunk-
|
|
1
|
+
import{useInsideTooltip as e,Tooltip as n}from"./chunk-6XBWM453.js";import{useRef as r,useState as t}from"react";import{jsx as c}from"react/jsx-runtime";var i="whitespace-nowrap";function l({children:i}){const l=e(),o=r(null),[a,s]=t(!1),m=/* @__PURE__ */c("span",{ref:o,className:"min-w-0 truncate",onMouseEnter:()=>{const e=o.current;s(!!e&&e.scrollWidth>e.clientWidth+1)},children:i});return l?m:/* @__PURE__ */c(n,{content:a?i:null,describe:!1,className:"relative inline-flex min-w-0 max-w-full",children:m})}export{l as OneLineLabel,i as TH_ONE_LINE};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Z_LAYERS as t}from"./chunk-62LW225J.js";import{VIEWPORT_MARGIN as e,placeMenu as r,followRect as n}from"./chunk-GLUJS42B.js";import{
|
|
2
|
-
/* @__PURE__ */l("div",{ref:J,role:"group","aria-label":g,"data-floating-bar":"",onMouseDown:t=>{const e=t.target;e?.closest?.('input, textarea, select, [contenteditable]:not([contenteditable="false"])')||t.preventDefault()},className:`fixed rounded-(--radius-popup) p-1 ${w}`.trim(),style:{...
|
|
1
|
+
import{Z_LAYERS as t}from"./chunk-62LW225J.js";import{VIEWPORT_MARGIN as e,placeMenu as r,followRect as n}from"./chunk-GLUJS42B.js";import{useHydrated as o,useBrowserLayoutEffect as i}from"./chunk-D65T4H6J.js";import{solidSurfaceStyle as s}from"./chunk-F27JJHNJ.js";import{useRef as c,useCallback as a,useEffect as u}from"react";import{createPortal as d}from"react-dom";import{jsx as l}from"react/jsx-runtime";var f=()=>({left:0,top:0,right:window.innerWidth,bottom:window.innerHeight});function p({anchor:p,bounds:m,side:h="top",align:b="start","aria-label":g,children:x,className:w=""}){const v=o(),J=c(null),j=c(p);j.current=p;const k=c(m);k.current=m;const y=a(()=>{const t=J.current,n=j.current();if(!t||!n)return;const o=(k.current??f)(),i=t.style;i.maxWidth=`${Math.max(0,o.right-o.left-2*e)}px`;const s=r({trigger:n,menu:{width:t.offsetWidth,height:t.offsetHeight},bounds:o,align:b,side:h});i.left=`${s.left}px`,i.top=`${s.top}px`,t.dataset.side=s.side},[b,h]);i(()=>{v&&y()}),u(()=>{if(!v)return;const t=n(()=>j.current(),y),e=J.current;if(!e||"undefined"==typeof ResizeObserver)return t;const r=new ResizeObserver(()=>y());return r.observe(e),()=>{t(),r.disconnect()}},[v,y]);return v&&p()?d(
|
|
2
|
+
/* @__PURE__ */l("div",{ref:J,role:"group","aria-label":g,"data-floating-bar":"",onMouseDown:t=>{const e=t.target;e?.closest?.('input, textarea, select, [contenteditable]:not([contenteditable="false"])')||t.preventDefault()},className:`fixed rounded-(--radius-popup) p-1 ${w}`.trim(),style:{...s(),position:"fixed",left:0,top:0,zIndex:t.popup},children:x}),document.body):null}export{p as FloatingBar};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{swallowPress as e,describedByWith as r,OffWithReason as i}from"./chunk-
|
|
1
|
+
import{swallowPress as e,describedByWith as r,OffWithReason as i}from"./chunk-34URULVW.js";import{Tooltip as o}from"./chunk-6XBWM453.js";import{useId as a,useRef as n}from"react";import{jsx as t}from"react/jsx-runtime";var l={ArrowLeft:[0,-1],ArrowRight:[0,1],ArrowUp:[-1,0],ArrowDown:[1,0]};function s({label:s,value:d,points:c,onChange:u,disabled:b=!1,disabledReason:v,id:f,className:g=""}){const h=a(),m=n([]),p=c.findIndex(e=>e.value===d),x=c.findIndex(e=>!b&&!0!==e.disabled),w=p>=0?p:Math.max(0,x);/* @__PURE__ */
|
|
2
2
|
return t("div",{id:f,role:"radiogroup","aria-label":s,className:`grid w-max grid-cols-3 gap-px overflow-hidden rounded-(--radius-control) border border-line bg-gray-200 ${g}`.trim(),children:c.map((a,n)=>{const s=d===a.value,f=b||!0===a.disabled,g=f&&(!0===a.disabled&&a.title||(b?v:void 0))||void 0,p=`${h}-${n}`,x=/* @__PURE__ */t("button",{type:"button",role:"radio","aria-checked":s,"aria-label":a.label,"aria-disabled":f||void 0,"aria-describedby":r(void 0,g?p:void 0),ref:e=>{m.current[n]=e},tabIndex:n===w?0:-1,onKeyDown:e=>((e,r)=>{const i=l[r.key];if(!i)return;r.preventDefault();const o=Math.floor(e/3)+i[0],a=e%3+i[1];if(o<0||a<0||a>=3)return;const n=3*o+a;if(n>=c.length)return;m.current[n]?.focus();const t=c[n];b||!0===t.disabled||t.value===d||u(t.value)})(n,e),onClick:f?e:()=>u(a.value),className:"group relative flex size-(--control-height-lg) items-center justify-center transition-colors rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring)] aria-disabled:cursor-not-allowed aria-disabled:opacity-60 "+(s?"bg-accent-tint hover:bg-blue-100":"bg-surface hover:bg-row-hover"),children:a.icon?/* @__PURE__ */t("span",{"data-icon-slot":"","aria-hidden":"true",className:"inline-flex items-center justify-center [&_svg]:h-4 [&_svg]:w-4 "+(s?"text-blue-700":"text-ink-faint group-hover:text-gray-700"),children:a.icon}):/* @__PURE__ */t("span",{"data-dot":"","aria-hidden":"true",className:s?"size-3 rounded-sm bg-accent-fill":"size-1 rounded-full bg-[color:var(--ink-faintest)] transition-colors group-hover:bg-[color:var(--ink-faint)]"})},a.value);return g?/* @__PURE__ */t(i,{reason:g,id:p,block:!0,children:x},a.value):/* @__PURE__ */t(o,{content:a.title??a.label,className:"relative flex",children:x},a.value)})})}export{s as AlignmentGrid};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Button_default as e}from"./chunk-
|
|
1
|
+
import{Button_default as e}from"./chunk-I4VIEGCX.js";import{Icon as r}from"./chunk-2UO47XB4.js";import{useShellStrings as t}from"./chunk-4PAWQEXM.js";import{jsxs as a,jsx as d}from"react/jsx-runtime";function n({title:n,message:o,onRetry:s,variant:i="dashed"}){const m=t().list;/* @__PURE__ */
|
|
2
2
|
return a("div",{className:`flex flex-col items-center justify-center text-center ${"card"===i?"rounded-md border border-gray-200 bg-white px-6 py-12":"none"===i?"px-6 py-12":"rounded-lg border-2 border-dashed border-red-200 px-6 py-12"}`,role:"alert",children:[
|
|
3
3
|
/* @__PURE__ */d(r,{name:"warning",className:"h-10 w-10 text-red-300 mb-3",strokeWidth:1,"aria-hidden":"true"}),
|
|
4
4
|
/* @__PURE__ */d("h3",{className:"text-sm font-medium text-gray-900",children:n??m.loadError}),
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{ChartTooltip as e}from"./chunk-G4GVLK44.js";import{usePlotWidth as t}from"./chunk-MAFUXCPZ.js";import{resolveSeriesColor as l,CHART_INK as r}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as n}from"./chunk-TWVUQUUD.js";import{useShellStrings as i,useShellLocale as a}from"./chunk-4PAWQEXM.js";import{formatPlain as o}from"./chunk-C3QOHMR6.js";import{useRef as h,useId as c,useState as s,useEffect as m}from"react";import{jsx as f,jsxs as u}from"react/jsx-runtime";function x({rows:x,columns:d,cells:p,height:M,width:g,color:y,max:v,formatValue:$,label:b,className:k,emptyLabel:w,cellGap:A=2,cellRadius:N=2}){const j=i().charts,U=a(),z=$??(e=>o(e,U)),C=b??j.intensity,D=w??j.noActivity,F=h(null),G=t(F),L=g??G,R=c(),[S,V]=s(null);if(m(()=>{if(null!==S)return n(e=>"Escape"===e.key&&(V(null),!0))},[S]),0===x.length||0===d.length)/* @__PURE__ */
|
|
2
|
+
return f("div",{className:k,ref:F,children:/* @__PURE__ */f("p",{className:"py-8 text-center text-sm text-gray-500",children:D})});const E=y??l(0),Q=v??Math.max(1,...p.flat().filter(Number.isFinite)),B=96,K=26*x.length,P=M??K+26+26,T=Math.max(2,(Math.max(97,L)-B)/d.length),W=e=>{const t=Q>0?Math.max(0,Math.min(1,e/Q)):0;return`color-mix(in oklab, ${E} ${(8+92*t).toFixed(1)}%, ${r.surface})`};/* @__PURE__ */
|
|
3
|
+
return u("div",{className:`relative ${k??""}`,ref:F,children:[
|
|
4
|
+
/* @__PURE__ */u("svg",{width:"100%",height:P,viewBox:`0 0 ${L} ${P}`,role:"img","aria-label":j.heatmap(C,x.length,d.length),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>V(null),onBlur:()=>V(null),onKeyDown:e=>{const t="ArrowDown"===e.key?1:"ArrowUp"===e.key?-1:0,l="ArrowRight"===e.key?1:"ArrowLeft"===e.key?-1:0;0===t&&0===l||(e.preventDefault(),V(e=>({r:Math.min(x.length-1,Math.max(0,(e?.r??0)+t)),c:Math.min(d.length-1,Math.max(0,(e?.c??0)+l))})))},children:[
|
|
5
|
+
/* @__PURE__ */f("defs",{children:/* @__PURE__ */u("linearGradient",{id:R,x1:"0",x2:"1",children:[
|
|
6
|
+
/* @__PURE__ */f("stop",{offset:"0",stopColor:W(0)}),
|
|
7
|
+
/* @__PURE__ */f("stop",{offset:"1",stopColor:W(Q)})]})}),x.map((e,t)=>/* @__PURE__ */f("text",{x:86,y:26*t+13+4,textAnchor:"end",fontSize:11,fill:r.label,children:e},`r${t}`)),x.map((e,t)=>d.map((l,r)=>{const n=p[t]?.[r]??0,i=S&&(S.r!==t||S.c!==r);/* @__PURE__ */
|
|
8
|
+
return f("rect",{x:B+r*T+A/2,y:26*t+A/2,width:Math.max(1,T-A),height:26-A,rx:N,fill:W(n),opacity:i?.55:1,onMouseEnter:()=>V({r:t,c:r}),children:/* @__PURE__ */f("title",{children:`${e} · ${l}: ${z(n)}`})},`${t}-${r}`)})),d.map((e,t)=>t%Math.max(1,Math.ceil(d.length/Math.max(1,Math.floor((L-B)/56))))===0?/* @__PURE__ */f("text",{x:B+t*T+T/2,y:K+15,textAnchor:"middle",fontSize:11,fill:r.label,children:e},`c${t}`):null),
|
|
9
|
+
/* @__PURE__ */f("rect",{x:B,y:K+26,width:Math.min(180,Math.max(40,L-B)),height:8,rx:4,fill:`url(#${R})`}),
|
|
10
|
+
/* @__PURE__ */f("text",{x:B,y:K+48,fontSize:11,fill:r.label,children:"0"}),
|
|
11
|
+
/* @__PURE__ */f("text",{x:B+Math.min(180,Math.max(40,L-B)),y:K+48,textAnchor:"end",fontSize:11,fill:r.label,style:{fontVariantNumeric:"tabular-nums"},children:z(Q)})]}),S&&/* @__PURE__ */f("div",{className:"pointer-events-none absolute top-1 right-1 z-10",children:/* @__PURE__ */f(e,{title:`${x[S.r]} · ${d[S.c]}`,rows:[{key:"v",label:C,color:E,value:null==p[S.r]?.[S.c]?void 0:z(p[S.r][S.c])}]})})]})}export{x as HeatmapChart};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{isFocusableEntry as e,menuStatusIds as t,renderMenuEntries as r}from"./chunk-4UKGVLFP.js";import{useTabLayer as n,focusableIn as o}from"./chunk-CDAJKLGL.js";import{PopupMenu as i,PopupMenuDivider as a}from"./chunk-4WEFGKJL.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as s}from"./chunk-62LW225J.js";import{placeMenu as d,popupBounds as c,followAnchor as u}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as p}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as f}from"./chunk-TWVUQUUD.js";import{useState as m,useRef as h,useId as g,useCallback as v,useEffect as b}from"react";import{jsxs as y,jsx as x}from"react/jsx-runtime";var k=/(^|[\s:])!?z-/,w={paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:"0.25rem",paddingBottom:"0.25rem"};function D({trigger:D,items:L,align:K="end",side:j="bottom","aria-label":E,className:W="",triggerClassName:A,menuClassName:C="",minWidth:S=180,linkAs:$,disabled:H,id:N,"aria-describedby":U,"aria-disabled":T=!1,onOpenChange:G,footer:J,footerLabel:B}){const[I,q]=m(!1),[M,P]=m(-1),z=h(null),F=h(null),R=h(null),V=h(null),O=h(null),Q=null!=J&&!1!==J,Y=h({text:"",at:0}),X=g(),Z=g(),_=N??Z,ee=h(G);ee.current=G;const te=h(I);te.current=I;const re=v(e=>{q(!1),te.current&&(te.current=!1,ee.current?.(!1)),e&&F.current?.focus()},[]),ne=(t,r)=>{const n=L.length;for(let o=0;o<n;o+=1){const i=((t+r*o)%n+n)%n;if(e(L[i]))return i}return-1},oe=()=>R.current?.closest("[data-popup-menu-tree]")??null;b(()=>{if(!I)return;const e=e=>{const t=e.target;if(z.current?.contains(t)||oe()?.contains(t))return;const r=oe()?.getAttribute("data-popup-menu-tree"),n=t.closest?.("[data-popup-menu-tree]");r&&n?.getAttribute("data-popup-menu-tree")===r||re(!1)};document.addEventListener("pointerdown",e,!0);const t=l(()=>re(!1));return()=>{document.removeEventListener("pointerdown",e,!0),t()}},[I,re]);const ie=v(()=>{const e=oe(),t=F.current;if(!e||!t)return;const r=e.style;r.left="0px",r.top="0px",r.maxWidth="none",r.maxHeight="none";const n={width:e.offsetWidth,height:e.offsetHeight},o=d({trigger:t.getBoundingClientRect(),menu:n,bounds:c(t),align:K,side:j});r.left=`${o.left}px`,r.top=`${o.top}px`,r.maxWidth=`${o.maxWidth}px`,r.maxHeight=`${o.maxHeight}px`,r.overflowY=n.height>o.maxHeight?"auto":"",e.dataset.side=o.side,e.dataset.align=K},[K,j]);p(()=>{I&&ie()}),b(()=>{if(I)return u(()=>F.current,ie)},[I,ie]),b(()=>{if(!I)return;const t=R.current,r=e(L[M])?t?.querySelector(`[data-dropdown-index="${M}"]`):null;(r??t)?.focus({preventScroll:!0})},[I,M]),b(()=>{if(I)return f(e=>"Escape"===e.key&&(re(!0),!0),()=>V.current)},[I,re]),n(V,I&&Q);const ae=h(null),le=e=>"first"===e?ne(0,1):ne(L.length-1,-1),se=e=>{P(le(e)),q(!0),te.current||(te.current=!0,ae.current=e,G?.(!0))};p(()=>{const e=ae.current;if(!I||!e)return;ae.current=null;const t=le(e);t!==M&&P(t)});const de=t(L,X),ce="function"==typeof J?J({close:()=>re(!0)}):J,ue={...k.test(C)?{}:{zIndex:s.popup},minWidth:S};/* @__PURE__ */
|
|
2
|
+
return y("div",{ref:z,className:`relative inline-flex ${W}`.trim(),children:[
|
|
3
|
+
/* @__PURE__ */x("button",{ref:F,id:_,type:"button","aria-haspopup":"menu","aria-expanded":I,"aria-controls":I?X:void 0,"aria-label":E,"aria-describedby":U,"aria-disabled":T||void 0,disabled:H,onClick:()=>{T||(I?re(!1):se("first"))},onKeyDown:e=>{T||("ArrowDown"===e.key||"Enter"===e.key||" "===e.key?(e.preventDefault(),se("first")):"ArrowUp"===e.key&&(e.preventDefault(),se("last")))},className:A??"inline-flex items-center justify-center rounded-(--radius-control) text-gray-600 transition-colors not-disabled:not-aria-disabled:hover:bg-gray-100 not-disabled:not-aria-disabled:hover:text-ink-strongest rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] disabled:cursor-not-allowed disabled:opacity-60 "+(E?"h-8 min-w-8 px-0":"h-8 min-w-8 gap-2 px-3"),children:D}),I&&
|
|
4
|
+
/* @__PURE__ */x(i,{portal:!0,className:C,style:ue,children:/* @__PURE__ */y("div",{ref:V,children:[
|
|
5
|
+
/* @__PURE__ */x("div",{ref:R,id:X,role:"menu","aria-orientation":"vertical","aria-label":E,"aria-labelledby":E?void 0:_,"aria-describedby":de,tabIndex:-1,onKeyDown:t=>{if(!t.target.closest?.("[data-popup-submenu-panel]")||"Tab"===t.key)if("ArrowDown"===t.key)t.preventDefault(),P(ne(M+1,1));else if("ArrowUp"===t.key)t.preventDefault(),P(ne(M-1,-1));else if("Home"===t.key)t.preventDefault(),P(ne(0,1));else if("End"===t.key)t.preventDefault(),P(ne(L.length-1,-1));else if("Tab"===t.key){t.preventDefault();const e=!t.shiftKey&&O.current?o(O.current)[0]:void 0;e?e.focus({preventScroll:!0}):re(!0)}else if(" "===t.key){const e=t.target;e.matches?.("a[href]")&&(t.preventDefault(),e.click())}else 1!==t.key.length||t.ctrlKey||t.metaKey||t.altKey||(t=>{const r=Date.now(),n=t.key.toLowerCase(),o=r-Y.current.at<500?Y.current.text+n:n;Y.current={text:o,at:r};const i=[...o].every(e=>e===o[0]),a=i?o[0]:o,l=i?M+1:Math.max(M,0),s=R.current,d=L.length;for(let r=0;r<d;r+=1){const n=((l+r)%d+d)%d;if(e(L[n])&&(s?.querySelector(`[data-dropdown-index="${n}"]`)?.textContent?.trim().toLowerCase()??"").startsWith(a))return t.preventDefault(),void P(n)}})(t)},children:r(L,{menuId:X,choose:e=>{e.disabled||(re(!0),e.onSelect())},toggle:e=>{e.disabled||e.onSelect()},followLink:()=>re(!0),rowProps:(e,t)=>({"data-dropdown-index":e,tabIndex:e===M?0:-1,onMouseEnter:()=>{t.disabled||O.current?.contains(document.activeElement)||P(e)}}),linkAs:$})}),Q&&/* @__PURE__ */y("div",{ref:O,role:"group","aria-label":B,"data-dropdown-footer":"",onKeyDown:e=>{const t=O.current;if("Tab"!==e.key||!t||!t.contains(e.target))return;const r=o(t),n=document.activeElement;if(e.shiftKey){if(r.length>0&&n!==r[0])return;e.preventDefault();const t=R.current?.querySelector(`[data-dropdown-index="${M}"]`);return void(t??R.current)?.focus({preventScroll:!0})}r.length>0&&n!==r[r.length-1]||(e.preventDefault(),re(!0))},children:[
|
|
6
|
+
/* @__PURE__ */x("div",{"aria-hidden":"true",children:/* @__PURE__ */x(a,{})}),
|
|
7
|
+
/* @__PURE__ */x("div",{style:w,children:ce})]})]})})]})}export{D as DropdownMenu};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{AccessibleTable as t}from"./chunk-TKJBZIHT.js";import{arcPath as e}from"./chunk-VFC6QUEN.js";import{useHighlight as o}from"./chunk-CNYAHYE6.js";import{ChartTooltip as n}from"./chunk-G4GVLK44.js";import{CHART_INK as r,resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as l,useShellLocale as i}from"./chunk-4PAWQEXM.js";import{formatPlain as s}from"./chunk-C3QOHMR6.js";import{useState as c}from"react";import{jsx as d,jsxs as m}from"react/jsx-runtime";function h(t,e,o,n){const r=(t,o)=>{const n=e[t]?.[o];return"number"==typeof n&&Number.isFinite(n)?n:0},a=t.map((e,o)=>t.reduce((t,e,n)=>t+r(o,n)+r(n,o),0)),l=Math.max(2,o),i=t.length>l,s=i?t.map((t,e)=>e).sort((t,e)=>a[e]-a[t]).slice(0,l-1).sort((t,e)=>t-e):t.map((t,e)=>e),c=new Map(s.map((t,e)=>[t,e])),d=i?s.length:-1,m=i?[...s.map(e=>t[e]),n]:[...t],h=m.map(()=>m.map(()=>0));let u=0;t.forEach((e,o)=>t.forEach((t,e)=>{const n=c.get(o)??d,a=c.get(e)??d;n!==d||a!==d?h[n][a]+=r(o,e):u+=r(o,e)}));const f=m.map((t,e)=>m.reduce((t,o,n)=>t+h[e][n]+h[n][e],0));return d>=0&&(f[d]+=u),{labels:m,matrix:h,totals:f,otherIndex:d,foldedCount:i?t.length-s.length:0}}function u({labels:u,matrix:f,size:p=340,maxNodes:x=8,padAngle:g=.04,arcWidth:b=12,formatValue:k,className:v,emptyLabel:M}){const $=l().charts,w=i(),N=k??(t=>s(t,w)),j=M??$.noFlows,[y,E]=c(null),{highlighted:F}=o(),C=h(u,f,x,$.other),{labels:A,matrix:I,otherIndex:z,foldedCount:L}=C,Q=(t,e)=>I[t]?.[e]??0,T=t=>t===z?r.muted:a(t),H=C.totals,O=A.map((t,e)=>e).sort((t,e)=>H[e]-H[t]),P=O.reduce((t,e)=>t+H[e],0);if(P<=0)/* @__PURE__ */return d("p",{className:`text-sm text-gray-500 ${v??""}`,children:j});const V=p/2,W=p/2,B=p/2-44,G=B-b,K=g*O.length,R=/* @__PURE__ */new Map;let U=-Math.PI/2;O.forEach((t,e)=>{const o=H[t]/P*(2*Math.PI-K);R.set(t,{start:U,end:U+o,slot:e}),U+=o+g});const Y=/* @__PURE__ */new Map,Z=[];for(const t of O)for(const e of O){const o=Q(t,e);if(o<=0)continue;const n=R.get(t),r=o/Math.max(1,H[t])*(n.end-n.start),a=Y.get(t)??0;Y.set(t,a+r),Z.push({from:t,to:e,value:o,a:n.start+a+r/2,b:R.get(e).start+(R.get(e).end-R.get(e).start)/2})}const J=(t,e)=>[V+e*Math.cos(t),W+e*Math.sin(t)],S="arc"===y?.kind?y.index:void 0,X="ribbon"===y?.kind?Z[y.index]:void 0;/* @__PURE__ */
|
|
2
|
+
return m("div",{className:`relative ${v??""}`,children:[
|
|
3
|
+
/* @__PURE__ */m("svg",{width:"100%",height:p,viewBox:`0 0 ${p} ${p}`,role:"img","aria-label":$.chord(O.length),onMouseLeave:()=>E(null),children:[Z.map((t,e)=>{const[o,n]=J(t.a,G),[r,a]=J(t.b,G),l=T(t.from),i=((t,e)=>y?"ribbon"===y.kind?y.index===e:y.index===t.from||y.index===t.to:null!==F?A[t.from]===F||A[t.to]===F:null)(t,e);/* @__PURE__ */
|
|
4
|
+
return d("path",{d:`M${o},${n} Q${V},${W} ${r},${a}`,fill:"none",stroke:l,strokeWidth:Math.max(1,t.value/P*p*.9),strokeOpacity:null===i||i?.34:.07,strokeLinecap:"round",onMouseEnter:()=>E({kind:"ribbon",index:e})},`${A[t.from]}→${A[t.to]}`)}),O.map(t=>{const o=R.get(t),n=(o.start+o.end)/2,[a,l]=J(n,B+16),i=(t=>y?"arc"===y.kind?y.index===t:Z[y.index].from===t||Z[y.index].to===t:null!==F?A[t]===F:null)(t);/* @__PURE__ */
|
|
5
|
+
return m("g",{onMouseEnter:()=>E({kind:"arc",index:t}),children:[
|
|
6
|
+
/* @__PURE__ */d("path",{d:e(V,W,G,B,o.start,o.end),fill:T(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:A[t]})]},t)})]}),L>0&&/* @__PURE__ */d("p",{className:"mt-1 text-xs text-ink-faint",children:$.chordFolded(L)}),void 0!==S&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:A[S],rows:[{key:"total",label:$.totalFlow,color:T(S),value:N(H[S])}]})}),X&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:`${A[X.from]} → ${A[X.to]}`,rows:[{key:"value",label:$.flow,color:T(X.from),value:N(X.value)}]})}),
|
|
8
|
+
/* @__PURE__ */d(t,{caption:$.chord(O.length),head:[$.tableFrom,$.tableTo,$.value],rows:Z.map(t=>[A[t.from],A[t.to],N(t.value)])})]})}export{u as ChordChart,h as foldChord};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{iconButtonClasses as e}from"./chunk-UQYNPYF4.js";import{isAriaDisabled as r,swallowPress as a,describedByWith as i,OffWithReason as s}from"./chunk-34URULVW.js";import{forwardRef as d,useId as n}from"react";import{jsx as o}from"react/jsx-runtime";var t=d(function({children:d,variant:t="ghost",size:c="md",type:l="button",className:m="",pressed:b,disabledReason:p,ink:u,disabled:f,onClick:h,"aria-disabled":k,"aria-describedby":v,...y},N){const j=n(),U=(Boolean(f)||r(k))&&null!=p&&""!==p,x=U||r(k),z=/* @__PURE__ */o("button",{ref:N,type:l,className:e({variant:t,size:c,pressed:b??(!0===y["aria-pressed"]||"true"===y["aria-pressed"]),ink:u,className:m}),...y,disabled:U?void 0:f,"aria-disabled":!!x||k,"aria-describedby":i(v,U?j:void 0),onClick:x?a:h,children:d});return U?/* @__PURE__ */o(s,{reason:p,id:j,children:z}):z});export{t as IconButton_default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{MOVE_KEYS as e,MoveHint as r,moveFromKey as t}from"./chunk-
|
|
2
|
-
return d(u.Provider,{value:i,children:/* @__PURE__ */d("div",{...o,role:"list","aria-label":r?void 0:e,"aria-labelledby":r,"data-sortable-list":i,className:`flex min-w-0 flex-col ${"comfortable"===i?"gap-2":"gap-1"} ${a}`.trim(),children:t})})}function b({children:o,title:f,thumb:b,expanded:p,onToggle:h,actions:g,below:v,active:x=!1,flat:w=!1,draggable:y=!1,dragging:N=!1,drop:k,onMove:j,rowProps:
|
|
1
|
+
import{MOVE_KEYS as e,MoveHint as r,moveFromKey as t}from"./chunk-I2XGPTCN.js";import{Icon as i}from"./chunk-2UO47XB4.js";import{useBrowserLayoutEffect as a}from"./chunk-D65T4H6J.js";import{createContext as o,useContext as n,useRef as l,useId as s}from"react";import{jsx as d,jsxs as c,Fragment as m}from"react/jsx-runtime";var u=o("compact");function f({"aria-label":e,"aria-labelledby":r,children:t,spacing:i="compact",className:a="",rootProps:o}){/* @__PURE__ */
|
|
2
|
+
return d(u.Provider,{value:i,children:/* @__PURE__ */d("div",{...o,role:"list","aria-label":r?void 0:e,"aria-labelledby":r,"data-sortable-list":i,className:`flex min-w-0 flex-col ${"comfortable"===i?"gap-2":"gap-1"} ${a}`.trim(),children:t})})}function b({children:o,title:f,thumb:b,expanded:p,onToggle:h,actions:g,below:v,active:x=!1,flat:w=!1,draggable:y=!1,dragging:N=!1,drop:k,onMove:j,rowProps:P,rowRef:B,className:D=""}){const I=x||!!p,T=n(u),$=l(null),A=s(),C=[P?.["aria-describedby"],j?A:void 0].filter(Boolean).join(" ")||void 0,K=P?.tabIndex;a(()=>{const e=$.current;if(!e||void 0!==K)return;const r=[...e.querySelectorAll('a[href], button, input, select, textarea, [contenteditable]:not([contenteditable="false"]), [tabindex]')].some(r=>r!==e);j&&!r?e.tabIndex=0:e.removeAttribute("tabindex")});const X="comfortable"===T?{before:"-top-[5px]",after:"-bottom-[5px]"}:{before:"-top-0.5",after:"-bottom-0.5"},q=null!=f&&/* @__PURE__ */c(m,{children:[null!=b&&/* @__PURE__ */d("span",{"aria-hidden":"true",className:"inline-flex h-6 w-6 shrink-0 overflow-hidden rounded-sm",children:b}),
|
|
3
3
|
/* @__PURE__ */d("span",{"data-list-row-name":"",className:"min-w-0 flex-1 break-words font-semibold text-(--ink-strongest)",children:f})]});/* @__PURE__ */
|
|
4
|
-
return c("div",{role:"listitem","data-list-item":"","data-drop":k,"data-open"
|
|
5
|
-
/* @__PURE__ */c("div",{...
|
|
6
|
-
/* @__PURE__ */c("div",{"data-list-row-main":"",className:"flex min-h-8 min-w-0 flex-1 items-center gap-1",children:[
|
|
7
|
-
/* @__PURE__ */d(i,{name:"chevron-right","aria-hidden":"true",strokeWidth:"2",className:"h-4 w-4 shrink-0 transition-transform duration-(--motion-base) motion-reduce:transition-none "+(p?"rotate-90":"")})]}):/* @__PURE__ */d("span",{"data-list-row-title":"",className:"flex min-w-0 flex-1 items-center gap-2 py-2",children:
|
|
4
|
+
return c("div",{role:"listitem","data-list-item":"","data-drop":k,"data-open":I||void 0,className:["relative flex min-w-0 flex-col",w?"":"rounded-(--radius-card) border bg-surface transition-colors duration-(--motion-fast)",w?"":I?"border-blue-300":"border-line hover:border-gray-300"].filter(Boolean).join(" "),children:[k&&/* @__PURE__ */d("span",{"aria-hidden":"true","data-list-drop-line":"",className:`pointer-events-none absolute inset-x-2 z-10 h-0.5 rounded-full bg-blue-500 ${X[k]}`}),
|
|
5
|
+
/* @__PURE__ */c("div",{...P,ref:e=>{var r,t;$.current=e,t=e,"function"==typeof(r=B)?r(t):r&&(r.current=t)},"data-list-row":"","data-draggable":y||void 0,"aria-keyshortcuts":P?.["aria-keyshortcuts"]??(j?e:void 0),"aria-describedby":C,onKeyDown:e=>{if(P?.onKeyDown?.(e),e.defaultPrevented||!j)return;const r=t(e);r&&!e.target.closest?.("select")&&(e.preventDefault(),j(r))},className:["group/listrow relative flex min-h-8 min-w-0 items-center gap-1 rounded-md text-sm",w?"":"min-h-10 pl-3",y?"cursor-grab active:cursor-grabbing":"","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",null!=g&&!1!==g?"":"pr-2",N?"opacity-40":"",D].filter(Boolean).join(" "),children:[
|
|
6
|
+
/* @__PURE__ */c("div",{"data-list-row-main":"",className:"flex min-h-8 min-w-0 flex-1 items-center gap-1",children:[q&&(h?/* @__PURE__ */c("button",{type:"button","aria-expanded":!!p,onClick:h,"data-list-row-title":"",className:"flex min-w-0 flex-1 items-center gap-2 self-stretch rounded-sm py-2 text-left text-(--ink-strongest) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:[q,
|
|
7
|
+
/* @__PURE__ */d(i,{name:"chevron-right","aria-hidden":"true",strokeWidth:"2",className:"h-4 w-4 shrink-0 transition-transform duration-(--motion-base) motion-reduce:transition-none "+(p?"rotate-90":"")})]}):/* @__PURE__ */d("span",{"data-list-row-title":"",className:"flex min-w-0 flex-1 items-center gap-2 py-2",children:q})),o]}),null!=g&&!1!==g&&/* @__PURE__ */d("div",{"data-list-actions":"",className:"flex shrink-0 items-center gap-0.5",children:g}),j&&/* @__PURE__ */d(r,{id:A})]}),null!=v&&!1!==v&&/* @__PURE__ */d("div",{"data-list-below":"",className:w?"":"px-3 pb-3",children:v})]})}export{b as ListRow,f as SortableList};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{SidebarLayout as e}from"./chunk-
|
|
1
|
+
import{SidebarLayout as e}from"./chunk-FEQDZTZ7.js";import{Avatar as t}from"./chunk-DKGZPVLL.js";import{ItemCount as r}from"./chunk-QHOBK35Y.js";import{Button_default as a}from"./chunk-I4VIEGCX.js";import{useState as i}from"react";import{jsx as l,jsxs as n}from"react/jsx-runtime";var s=[{id:"inbox",label:"Inbox",count:12},{id:"starred",label:"Starred",count:3},{id:"sent",label:"Sent"},{id:"drafts",label:"Drafts",count:1},{id:"archive",label:"Archive"},{id:"trash",label:"Trash"}],d=[{id:1,from:"Marco Reyes",subject:"Q3 roadmap review",preview:"Sharing the deck ahead of Thursday — let me know what you think before the review.",time:"9:14",unread:!0},{id:2,from:"Priya Patel",subject:"Design handoff",preview:"The Figma file is ready for engineering. I exported every icon at 1x and 2x.",time:"8:02",unread:!0},{id:3,from:"GitHub",subject:"[acme/web] PR #482 merged",preview:"Your pull request was merged into main by the release bot after all checks passed.",time:"Yest"},{id:4,from:"Sara Lind",subject:"Lunch Friday?",preview:"A few of us are heading to the new place on 5th at noon if you want to join.",time:"Yest"}];function c(){const[c,o]=i(1),m=d.find(e=>e.id===c)??d[0];/* @__PURE__ */
|
|
2
2
|
return l("div",{className:"h-full",children:/* @__PURE__ */l(e,{side:"left",defaultWidth:200,sidebar:/* @__PURE__ */n("div",{className:"flex h-full flex-col p-2",children:[
|
|
3
3
|
/* @__PURE__ */l(a,{block:!0,className:"mb-2",children:"Compose"}),s.map((e,t)=>/* @__PURE__ */n("button",{className:"flex items-center justify-between rounded-md px-3 py-2 text-left text-sm "+(0===t?"bg-blue-50 font-medium text-blue-700":"text-gray-700 hover:bg-gray-100"),children:[
|
|
4
4
|
/* @__PURE__ */l("span",{children:e.label}),null!=e.count&&/* @__PURE__ */l(r,{count:e.count,active:0===t})]},e.id))]}),children:/* @__PURE__ */n("div",{className:"flex h-full",children:[
|