efficient-shell 15.1.0 → 15.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Browser-QK2CCZTR.js +44 -0
- package/dist/Calculator-DB4U2KXJ.js +29 -0
- package/dist/CurrencyConverter-D5MWU2M2.js +21 -0
- package/dist/{Files-QNAN5FCH.js → Files-6WMIQAVD.js} +93 -93
- package/dist/Notepad-FKSRP7R6.js +24 -0
- package/dist/PdfViewer-AIAVQYZ6.js +1 -0
- package/dist/{PomodoroTimer-LJ6VBFGX.js → PomodoroTimer-U62N64F6.js} +22 -22
- package/dist/{Preview-I35MWZBC.js → Preview-2GS2CWRA.js} +15 -15
- package/dist/Sidebar-KAALEIIX.js +44 -0
- package/dist/{Stock-USRT7FDU.js → Stock-DUXAE4DY.js} +4 -4
- package/dist/{Weather-CMA5QQYM.js → Weather-XXPZTLY7.js} +22 -22
- package/dist/{WorldClock-WQ3XGK2J.js → WorldClock-6ANSNTXU.js} +7 -7
- package/dist/ai/index.js +118 -118
- package/dist/apps/index.js +1 -1
- package/dist/bin/browser-check.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/charts/ChordChart.js +1 -1
- package/dist/charts/FlowChart.js +1 -1
- package/dist/charts/RadarChart.js +1 -1
- package/dist/charts/SankeyChart.js +1 -1
- package/dist/charts/SpecChart.js +1 -1
- package/dist/charts/SunburstChart.js +1 -1
- package/dist/charts/TreemapChart.js +1 -1
- package/dist/{chunk-ULSVYSVN.js → chunk-26ZOXLE6.js} +1 -1
- package/dist/chunk-2RLUG5ID.js +1 -0
- package/dist/chunk-345FP3IX.js +4 -0
- package/dist/{chunk-HTBACICQ.js → chunk-35Q7ZMQD.js} +6 -6
- package/dist/{chunk-IZ6D4KGR.js → chunk-3AVXNZY5.js} +3 -3
- package/dist/chunk-3FININUU.js +1 -0
- package/dist/{chunk-ZEGCKIAL.js → chunk-3H476JWK.js} +3 -3
- package/dist/chunk-422SFOQU.js +28 -0
- package/dist/chunk-4KPOTWYF.js +92 -0
- package/dist/{chunk-GVAVIYE6.js → chunk-4MDSZSLC.js} +1 -1
- package/dist/{chunk-UYUNREAL.js → chunk-4NTAZLT3.js} +3 -3
- package/dist/{chunk-NC5FIFAY.js → chunk-52RSW6TO.js} +1 -1
- package/dist/{chunk-P5J7G7OV.js → chunk-5B7CLXHC.js} +1 -1
- package/dist/{chunk-Y5YVKUM4.js → chunk-5LB7LCEG.js} +17 -17
- package/dist/{chunk-JPVD3VS7.js → chunk-5LG6TOV6.js} +6 -6
- package/dist/{chunk-7D2QZ6JA.js → chunk-5OXQ5M5S.js} +1 -1
- package/dist/{chunk-AH5MLH54.js → chunk-5QHNDAZ6.js} +1 -1
- package/dist/chunk-5QRHQCRG.js +2 -0
- package/dist/chunk-5RCKE4X2.js +6 -0
- package/dist/{chunk-2RLWGWOU.js → chunk-5Y2JZL3I.js} +13 -13
- package/dist/{chunk-DO6P6LYU.js → chunk-62UNBUTU.js} +1 -1
- package/dist/chunk-A4ROXNUF.js +2 -0
- package/dist/{chunk-EDRELF6L.js → chunk-ABIWAS5K.js} +1 -1
- package/dist/{chunk-TBDILJ6G.js → chunk-AKEED2BC.js} +1 -1
- package/dist/chunk-APFDZ2HG.js +1 -0
- package/dist/{chunk-XJK6VNXV.js → chunk-ASNRA3ZL.js} +1 -1
- package/dist/{chunk-Y5RTVKMB.js → chunk-B4Y5NGHR.js} +8 -8
- package/dist/{chunk-CXEELIRW.js → chunk-BTMZ5MUY.js} +10 -10
- package/dist/chunk-C4TG6XS4.js +19 -0
- package/dist/chunk-C75ICYHF.js +2 -0
- package/dist/{chunk-EHPY3BFC.js → chunk-CGX2IGQO.js} +1 -1
- package/dist/chunk-CIZAUBWA.js +6 -0
- package/dist/{chunk-DNPAYNNU.js → chunk-CMEPDSYB.js} +1 -1
- package/dist/chunk-D7MRZZVV.js +5 -0
- package/dist/chunk-DEV3ZHPP.js +8 -0
- package/dist/chunk-DN6NGGP5.js +8 -0
- package/dist/{chunk-UGA5NGW4.js → chunk-E43VGO66.js} +1 -1
- package/dist/{chunk-O7A7PH3R.js → chunk-EJ5NIA42.js} +1 -1
- package/dist/{chunk-NHALP3MW.js → chunk-EJMCK7E3.js} +4 -4
- package/dist/{chunk-U75MSD4F.js → chunk-EULBBS5L.js} +1 -1
- package/dist/{chunk-G3TC2GIA.js → chunk-FAPZFMS3.js} +1 -1
- package/dist/chunk-FGP2IOFN.js +15 -0
- package/dist/{chunk-DBBOD5QW.js → chunk-FHTL7ZZR.js} +1 -1
- package/dist/chunk-GGNQEZ2D.js +9 -0
- package/dist/{chunk-XFN4DOXP.js → chunk-GL3D5EOZ.js} +3 -3
- package/dist/{chunk-2SOGTOUQ.js → chunk-GUOAPXUY.js} +4 -4
- package/dist/{chunk-EHNW3UNC.js → chunk-HU5FTTW2.js} +8 -8
- package/dist/{chunk-HAEZUUDT.js → chunk-INQQUAIO.js} +3 -3
- package/dist/{chunk-6RU2PGQK.js → chunk-JA4I5BEB.js} +1 -1
- package/dist/{chunk-SP4S4HUJ.js → chunk-JGN27L4Q.js} +3 -3
- package/dist/{chunk-QCLKRFL4.js → chunk-JIHDUZJZ.js} +3 -3
- package/dist/chunk-JRKD7SD3.js +24 -0
- package/dist/{chunk-RA5G4K3N.js → chunk-JWS77LQE.js} +1 -1
- package/dist/{chunk-T46I4YOI.js → chunk-KERCZSIA.js} +1 -1
- package/dist/{chunk-ZA6ANC2D.js → chunk-KIIZNION.js} +4 -4
- package/dist/{chunk-Y6FULJWJ.js → chunk-KJ4CHRRC.js} +7 -7
- package/dist/{chunk-6X32SWQI.js → chunk-L2WQOJ3T.js} +1 -1
- package/dist/{chunk-OYQWBJ37.js → chunk-LFUXWZV7.js} +1 -1
- package/dist/{chunk-7OVMWXFM.js → chunk-LGVVXYW7.js} +1 -1
- package/dist/{chunk-5O4HMXPQ.js → chunk-MF7OELXP.js} +2 -2
- package/dist/chunk-MQNSKFZY.js +11 -0
- package/dist/chunk-NJY4HPNB.js +7 -0
- package/dist/{chunk-2TNG32QT.js → chunk-NM7U42KL.js} +8 -8
- package/dist/{chunk-F7J7XRVI.js → chunk-NZNPU2GD.js} +1 -1
- package/dist/{chunk-BUUAALHH.js → chunk-OEWBWKKD.js} +20 -20
- package/dist/{chunk-3L7BEEBW.js → chunk-OHWP24DL.js} +1 -1
- package/dist/{chunk-WYAKASF3.js → chunk-OK2J6WSC.js} +1 -1
- package/dist/chunk-P56YLT73.js +15 -0
- package/dist/{chunk-EEAOFYW5.js → chunk-PCNFY6EK.js} +10 -10
- package/dist/{chunk-XNKNX5L3.js → chunk-PM6HY5BH.js} +1 -1
- package/dist/{chunk-7WF6LFOJ.js → chunk-PO2KNVCC.js} +1 -1
- package/dist/chunk-PRN2QDX6.js +7 -0
- package/dist/{chunk-YX3JD6PA.js → chunk-QE2F4YQQ.js} +7 -7
- package/dist/{chunk-4BRVZAIW.js → chunk-QSFQTMWV.js} +1 -1
- package/dist/{chunk-6AYAB5FN.js → chunk-QSOBETAI.js} +5 -5
- package/dist/chunk-QXEZBS3H.js +6 -0
- package/dist/{chunk-3ZJAQSFS.js → chunk-QYOIS4BN.js} +3 -3
- package/dist/chunk-R6YVKP6D.js +3 -0
- package/dist/chunk-R72SBGYR.js +9 -0
- package/dist/{chunk-R36VZ35L.js → chunk-RIA6KKIB.js} +5 -5
- package/dist/{chunk-24BF22NF.js → chunk-RTZFWH5U.js} +1 -1
- package/dist/chunk-S6C7X6CR.js +23 -0
- package/dist/{chunk-XIX72C7K.js → chunk-SJUEGYT2.js} +1 -1
- package/dist/{chunk-ION3XGLN.js → chunk-TAB3K2WF.js} +1 -1
- package/dist/{chunk-MPC3CHAO.js → chunk-TAIH2VIW.js} +1 -1
- package/dist/chunk-TALQMTCE.js +4 -0
- package/dist/{chunk-I7WAOKU2.js → chunk-TEYG2W7A.js} +2 -2
- package/dist/{chunk-JU722M5V.js → chunk-TMXMIRWG.js} +8 -8
- package/dist/{chunk-IVEM2BPC.js → chunk-TSZPGDU3.js} +1 -1
- package/dist/{chunk-EOYKUV2U.js → chunk-TTUUXGEW.js} +1 -1
- package/dist/{chunk-4SFWQPOB.js → chunk-TXGVSWH6.js} +13 -13
- package/dist/{chunk-EHSK43WG.js → chunk-U7PA4KNZ.js} +8 -8
- package/dist/{chunk-RXCBSQA2.js → chunk-UYM7562M.js} +2 -2
- package/dist/chunk-V4BA3FGC.js +14 -0
- package/dist/{chunk-P3XXFQG5.js → chunk-V62FEHS4.js} +1 -1
- package/dist/{chunk-MKHOXO5O.js → chunk-VB4ZPIZF.js} +1 -1
- package/dist/{chunk-PTLVNC3V.js → chunk-VHBRVW5O.js} +6 -6
- package/dist/{chunk-5SQHRDFC.js → chunk-WNHDYTTI.js} +2 -2
- package/dist/chunk-WR3SULZW.js +13 -0
- package/dist/chunk-WSQ73CRR.js +2 -0
- package/dist/{chunk-GY7MJTIZ.js → chunk-XMBMI27I.js} +1 -1
- package/dist/{chunk-4RF3C523.js → chunk-XSMVWJV3.js} +1 -1
- package/dist/{chunk-EN3GYSCE.js → chunk-YEDAXZYO.js} +1 -1
- package/dist/{chunk-TFQC67XR.js → chunk-YGNJIOOH.js} +9 -9
- package/dist/{chunk-47BGAQWD.js → chunk-YXMXATYP.js} +1 -1
- package/dist/data/DataTable.js +1 -1
- package/dist/data/EntityList.js +1 -1
- package/dist/data/Gantt.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/ListToolbar.js +1 -1
- package/dist/data/ResizableTable.js +1 -1
- package/dist/data/statusColumn.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/Input.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.js +1 -1
- package/dist/forms/NumericKeypad.js +1 -1
- package/dist/forms/PictureTiles.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/RenameField.js +1 -1
- package/dist/forms/SearchInput.js +1 -1
- package/dist/forms/Segmented.d.ts +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/UnitMenu.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +511 -511
- package/dist/map/index.js +11 -11
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/routine-index.json +1 -1
- 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/Popover.js +1 -1
- package/dist/shell/PopupMenu.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/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/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/value-index.json +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Browser-MILMPZK2.js +0 -44
- package/dist/Calculator-MW7S4UKX.js +0 -29
- package/dist/CurrencyConverter-P3HQXUX2.js +0 -21
- package/dist/Notepad-VXENTPT2.js +0 -24
- package/dist/PdfViewer-FWGHFO4N.js +0 -1
- package/dist/Sidebar-2TYZENQL.js +0 -44
- package/dist/chunk-2XDO7FZC.js +0 -24
- package/dist/chunk-4DNPUG3T.js +0 -7
- package/dist/chunk-A3VLZZHJ.js +0 -9
- package/dist/chunk-AJPQJ7TC.js +0 -6
- package/dist/chunk-ALZHFQRX.js +0 -4
- package/dist/chunk-B34UWI47.js +0 -1
- package/dist/chunk-CHDGSJLV.js +0 -8
- package/dist/chunk-DOJSWVBX.js +0 -6
- package/dist/chunk-EBODRYXS.js +0 -19
- package/dist/chunk-FFPIT2LB.js +0 -3
- package/dist/chunk-HX5QSQ2C.js +0 -2
- package/dist/chunk-KETNB4NQ.js +0 -2
- package/dist/chunk-M5IZ7QLQ.js +0 -7
- package/dist/chunk-MEP6CZJ3.js +0 -2
- package/dist/chunk-MNZAAQLH.js +0 -15
- package/dist/chunk-MYH5H43C.js +0 -1
- package/dist/chunk-NDCS4COQ.js +0 -11
- package/dist/chunk-OJYEGB74.js +0 -28
- package/dist/chunk-PWON7O3N.js +0 -9
- package/dist/chunk-RTK77DMP.js +0 -15
- package/dist/chunk-SYUCEN76.js +0 -92
- package/dist/chunk-VUBDHFG5.js +0 -4
- package/dist/chunk-W4IH3BE3.js +0 -23
- package/dist/chunk-W6REY3SV.js +0 -5
- package/dist/chunk-WBZO6WRU.js +0 -8
- package/dist/chunk-Y7D2CZ4H.js +0 -13
- package/dist/chunk-YTLUSBDY.js +0 -14
- package/dist/chunk-ZSVU44OB.js +0 -6
- /package/dist/{chunk-5YTZBYG4.js → chunk-TEQ5ZPAL.js} +0 -0
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import{Checkbox_default as e}from"./chunk-CGZBDI6C.js";import{Pagination as t}from"./chunk-Q2RNFBYS.js";import{SpinnerRing as r}from"./chunk-R2VKEMZH.js";import{TH_ONE_LINE as o,OneLineLabel as n}from"./chunk-
|
|
1
|
+
import{Checkbox_default as e}from"./chunk-CGZBDI6C.js";import{Pagination as t}from"./chunk-Q2RNFBYS.js";import{SpinnerRing as r}from"./chunk-R2VKEMZH.js";import{TH_ONE_LINE as o,OneLineLabel as n}from"./chunk-FAPZFMS3.js";import{useBrowserLayoutEffect as l}from"./chunk-PU2GJVMG.js";import{useShellStrings as s}from"./chunk-NRHG4R2Q.js";import{useState as i,useRef as a}from"react";import{jsxs as c,Fragment as d,jsx as h}from"react/jsx-runtime";function u(e){const t={};if(!e)return t;for(const[r,o]of Object.entries(e))!r.startsWith("data-")||"string"!=typeof o&&"number"!=typeof o&&"boolean"!=typeof o||(t[r]=o);return t}var m=e=>Array.isArray(e.columns),f=e=>"wide"===e.only?"rosh-dt-only-wide":"stacked"===e.only?"rosh-dt-only-stacked":"",g="rosh-dt-row-link rosh-focus-ring underline-offset-4 hover:underline",p={sm:"px-2 py-2",md:"px-3 py-2"},y={left:"text-left",right:"text-right",center:"text-center"};function b({direction:e}){/* @__PURE__ */
|
|
2
2
|
return c("span",{className:"ml-1 inline-flex flex-col leading-none","aria-hidden":"true",children:[
|
|
3
3
|
/* @__PURE__ */h("svg",{className:"h-2 w-2 "+("asc"===e?"text-gray-700":"text-gray-300"),viewBox:"0 0 8 5",fill:"currentColor",children:/* @__PURE__ */h("path",{d:"M4 0L8 5H0z"})}),
|
|
4
|
-
/* @__PURE__ */h("svg",{className:"h-2 w-2 "+("desc"===e?"text-gray-700":"text-gray-300"),viewBox:"0 0 8 5",fill:"currentColor",children:/* @__PURE__ */h("path",{d:"M4 5L0 0h8z"})})]})}function w(e,t=!1){const r=t?"":" whitespace-nowrap";return e.code?`font-mono${r}`:e.numeric?`tabular-nums${r}`:""}function x({columns:x,data:v,rowKey:k,sort:N=null,onSortChange:C,pagination:j,caption:M,loading:B=!1,bordered:S=!1,size:$="md",minWidth:z,rowClassName:H,onRow:
|
|
5
|
-
return h("th",{scope:"col",...J("columnheader"),rowSpan:r>1?r:void 0,"aria-sort":"asc"===s?"ascending":"desc"===s?"descending":d?"none":void 0,style:{width:e.width,...a?{left:(Be[t]??0)+be}:{},...
|
|
4
|
+
/* @__PURE__ */h("svg",{className:"h-2 w-2 "+("desc"===e?"text-gray-700":"text-gray-300"),viewBox:"0 0 8 5",fill:"currentColor",children:/* @__PURE__ */h("path",{d:"M4 5L0 0h8z"})})]})}function w(e,t=!1){const r=t?"":" whitespace-nowrap";return e.code?`font-mono${r}`:e.numeric?`tabular-nums${r}`:""}function x({columns:x,data:v,rowKey:k,sort:N=null,onSortChange:C,pagination:j,caption:M,loading:B=!1,bordered:S=!1,size:$="md",minWidth:z,rowClassName:H,onRow:F,rowHref:R,onRowPress:I,linkAs:P,emptyText:T,selection:A,footer:E,virtualized:G,stackOnNarrow:L=!1,stackBelow:O,className:D=""}){const K=s(),W=T??K.table.empty,Z=(e,t)=>"function"==typeof k?k(e,t):String(e[k]),Q=L&&!G,V=Q?x:x.flatMap(e=>{if(!m(e))return"stacked"===e.only?[]:[e];const t=e.columns.filter(e=>"stacked"!==e.only);return t.length?[{...e,columns:t}]:[]}),J=e=>Q?{role:e}:{},U=(e,t)=>(t??("string"==typeof e||"number"==typeof e?String(e):"")).trim()||void 0,[Y,q]=i(0),X=G?.overscan??6,_=G?e=>{const t=Math.max(0,Math.floor(e.currentTarget.scrollTop/G.rowHeight)-X);q(e=>e===t?e:t)}:void 0,ee=G?Math.ceil(G.height/G.rowHeight)+2*X:v.length,te=G?Math.min(Y,Math.max(0,v.length-ee)):0,re=Math.min(v.length,te+ee),oe=G?te*G.rowHeight:0,ne=G?(v.length-re)*G.rowHeight:0,le=a(null),[se,ie]=i(0);l(()=>{if(!G)return;const e=le.current?.offsetHeight??0;ie(t=>t===e?t:e)});const ae=e=>e.sortField??e.key,ce=e=>N&&N.field===ae(e)?N.direction:null,de=V.flatMap(e=>m(e)?e.columns:[e]),he=V.some(m),ue=/* @__PURE__ */new Map;if(Q)for(const e of V)if(m(e))for(const t of e.columns)ue.set(t,U(e.title,e.label));const me=e=>{const t=U(e.title,e.label),r=ue.get(e);return t&&r?`${r} · ${t}`:t},fe=new Set(A?.selected??[]),ge=A?v.map((e,t)=>Z(e,t)):[],pe=ge.length>0&&ge.every(e=>fe.has(e)),ye=ge.some(e=>fe.has(e)),be=A?36:0,we=de.length+(A?1:0),xe=de.some(e=>"left"===e.fixed),ve=Q&&!A&&de.some(e=>e.cardCorner),ke=P??"a",Ne=`${p[$]} ${"sm"===$?"text-xs":"text-sm"}`,Ce=(e,t)=>e.ellipsis?/* @__PURE__ */h("span",{className:"block w-0 min-w-full",children:t}):t,je=(e,t,r,l=0)=>{const s=ce(e),i=y[e.align??(e.numeric?"right":"left")],a="left"===e.fixed,d=!(!e.sortable||!C);/* @__PURE__ */
|
|
5
|
+
return h("th",{scope:"col",...J("columnheader"),rowSpan:r>1?r:void 0,"aria-sort":"asc"===s?"ascending":"desc"===s?"descending":d?"none":void 0,style:{width:e.width,...a?{left:(Be[t]??0)+be}:{},...G?{top:l}:{}},className:[Ne,i,o,"font-semibold uppercase tracking-wide text-gray-500","sm"===$?"text-2xs":"text-xs",a?G?"sticky z-20 bg-gray-50":"sticky z-10 bg-gray-50":G?"sticky z-10 bg-gray-50":"",Q&&d?"rosh-dt-sort":"",Q?f(e):"",e.headerClassName??""].filter(Boolean).join(" "),children:Ce(e,d?/* @__PURE__ */c("button",{type:"button",onClick:()=>(e=>{if(!C)return;const t=ae(e),r=ce(e),o=e.sortFirst??"asc";C(null===r?{field:t,direction:o}:r===o?{field:t,direction:"asc"===o?"desc":"asc"}:null)})(e),"data-group":Q?ue.get(e):void 0,className:`inline-flex max-w-full items-center font-semibold uppercase tracking-wide hover:text-ink ${i}`,children:[
|
|
6
6
|
/* @__PURE__ */h(n,{children:e.title}),
|
|
7
7
|
/* @__PURE__ */h(b,{direction:s})]}):/* @__PURE__ */h(n,{children:e.title}))},e.key)};let Me=0;const Be=de.map(e=>{if("left"!==e.fixed)return null;const t=Me;return Me+=e.width??0,t}),Se=/* @__PURE__ */c(d,{children:[
|
|
8
|
-
/* @__PURE__ */c("div",{onScroll:_,style:
|
|
8
|
+
/* @__PURE__ */c("div",{onScroll:_,style:G?{maxHeight:G.height}:void 0,className:`relative overflow-x-auto ${G?"overflow-y-auto":""} ${S?"rounded-lg border border-gray-200":""}${Q?" rosh-dt-scroll":""}`.trim(),children:[B&&
|
|
9
9
|
/* @__PURE__ */c("div",{className:"absolute inset-0 z-20 flex items-start justify-center bg-white/60 pt-8",role:"status","aria-live":"polite",children:[
|
|
10
10
|
/* @__PURE__ */h(r,{className:"h-6 w-6"}),
|
|
11
11
|
/* @__PURE__ */h("span",{className:"sr-only",children:K.table.loading})]}),
|
|
12
|
-
/* @__PURE__ */c("table",{...J("table"),className:(
|
|
13
|
-
/* @__PURE__ */c("thead",{...J("rowgroup"),className:
|
|
14
|
-
/* @__PURE__ */c("tr",{ref:le,...J("row"),className:"border-b border-gray-200 bg-gray-50",children:[
|
|
15
|
-
/* @__PURE__ */h("tbody",{...J("rowgroup"),className:
|
|
16
|
-
return c("tr",{...u(n),...J("row"),style:
|
|
17
|
-
return h("td",{...J("cell"),style:{width:36},onClick:e=>e.stopPropagation(),className:[Ne,xe?"sticky left-0 z-10 bg-white":"",
|
|
18
|
-
return h("td",{...J("cell"),"data-label":l?me(e):void 0,style:r?{left:(Be[t]??0)+be}:void 0,className:[l?e.ellipsis?"rosh-dt-cell rosh-dt-clip":"rosh-dt-cell":"",n?"rosh-dt-corner":"",
|
|
19
|
-
/* @__PURE__ */h("span",{className:["rosh-dt-value",w(e,!0)].filter(Boolean).join(" "),children:o}):o},e.key)})]},
|
|
20
|
-
return h("div",
|
|
12
|
+
/* @__PURE__ */c("table",{...J("table"),className:(Q?"rosh-dt-table ":"")+"w-full border-collapse tabular-nums",style:z?{minWidth:z}:void 0,children:[M&&/* @__PURE__ */h("caption",{className:"sr-only",children:M}),
|
|
13
|
+
/* @__PURE__ */c("thead",{...J("rowgroup"),className:Q?"rosh-dt-head":void 0,children:[
|
|
14
|
+
/* @__PURE__ */c("tr",{ref:le,...J("row"),className:"border-b border-gray-200 bg-gray-50",children:[A&&/* @__PURE__ */h("th",{scope:"col",...J("columnheader"),rowSpan:he?2:void 0,style:{width:36,...G?{top:0}:{}},className:[Ne,o,xe||G?"sticky z-20 bg-gray-50":"",xe?"left-0":"",Q?"rosh-dt-select":""].filter(Boolean).join(" "),children:/* @__PURE__ */h(e,{"aria-label":K.table.selectAll,checked:pe,indeterminate:ye&&!pe,onChange:()=>{if(!A)return;const e=new Set(ge);A.onChange(pe?A.selected.filter(t=>!e.has(t)):[...A.selected,...ge.filter(e=>!fe.has(e))])}})}),V.map((e,t)=>m(e)?/* @__PURE__ */h("th",{scope:"colgroup",...J("columnheader"),colSpan:e.columns.length,style:G?{top:0}:void 0,className:[Ne,"text-center",o,"font-semibold uppercase tracking-wide text-gray-500","sm"===$?"text-2xs":"text-xs","border-b border-gray-200",G?"sticky z-10 bg-gray-50":"",e.headerClassName??""].filter(Boolean).join(" "),children:/* @__PURE__ */h(n,{children:e.title})},e.key??`group-${t}`):je(e,de.indexOf(e),he?2:1))]}),he&&/* @__PURE__ */h("tr",{...J("row"),className:"border-b border-gray-200 bg-gray-50",children:V.flatMap(e=>m(e)?e.columns:[]).map(e=>je(e,de.indexOf(e),1,se))})]}),
|
|
15
|
+
/* @__PURE__ */h("tbody",{...J("rowgroup"),className:Q?"rosh-dt-body":void 0,children:0!==v.length||B?/* @__PURE__ */c(d,{children:[oe>0&&/* @__PURE__ */h("tr",{"aria-hidden":"true",children:/* @__PURE__ */h("td",{colSpan:we,style:{height:oe,padding:0,border:0}})}),v.slice(te,re).map((t,r)=>{const o=te+r,n=F?.(t,o),l=!!n?.current,s=R?.(t,o),i=void 0===s&&I?()=>I(t,o):void 0,a=void 0!==s||void 0!==i;let d=!1;const m=(e,t)=>{if(d=!0,!a)return e;const r=[g,i?"cursor-pointer text-left":"",t?.className??""].filter(Boolean).join(" "),o=l?"true":void 0;return void 0!==s?/* @__PURE__ */h(ke,{href:s,className:r,"aria-current":o,children:e}):/* @__PURE__ */h("button",{type:"button",onClick:i,className:r,"aria-current":o,children:e})},p=de.map(e=>e.render?e.render(t,o,m):e.dataIndex?t[e.dataIndex]:null);if(a&&!d){const e=de.findIndex(e=>"stacked"!==e.only&&!e.cardCorner),t=de.findIndex(e=>"wide"!==e.only&&!e.cardCorner);for(const r of/* @__PURE__ */new Set([e,t]))r>=0&&(p[r]=m(p[r]))}const b=e=>e?t=>{t.currentTarget.contains(t.relatedTarget)||e()}:void 0;/* @__PURE__ */
|
|
16
|
+
return c("tr",{...u(n),...J("row"),style:G?{height:G.rowHeight}:void 0,onClick:n?.onClick,onMouseEnter:n?.onMouseEnter,onMouseLeave:n?.onMouseLeave,onFocus:b(n?.onFocus),onBlur:b(n?.onBlur),"aria-current":l&&!a?"true":void 0,...n?.onClick?{tabIndex:0,onKeyDown:e=>{e.target===e.currentTarget&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),n.onClick?.()))}}:{},className:[Q?A?"rosh-dt-row rosh-dt-row-select":"rosh-dt-row":"",Q&&ve?"rosh-dt-row-corner":"","border-b border-gray-100 last:border-b-0",n?.onClick?"cursor-pointer hover:bg-gray-50 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"",a?"rosh-dt-linked hover:bg-gray-50":"",l?"rosh-dt-current":"",H?.(t,o)??"",n?.className??""].filter(Boolean).join(" "),children:[A&&(()=>{const r=Z(t,o);/* @__PURE__ */
|
|
17
|
+
return h("td",{...J("cell"),style:{width:36},onClick:e=>e.stopPropagation(),className:[Ne,xe?"sticky left-0 z-10 bg-white":"",Q?"rosh-dt-select":""].filter(Boolean).join(" "),children:/* @__PURE__ */h(e,{"aria-label":K.table.selectRow,checked:fe.has(r),onChange:()=>(e=>{A&&A.onChange(fe.has(e)?A.selected.filter(t=>t!==e):[...A.selected,e])})(r)})})})(),de.map((e,t)=>{const r="left"===e.fixed,o=p[t],n=ve&&!!e.cardCorner,l=Q&&!n&&"wide"!==e.only;/* @__PURE__ */
|
|
18
|
+
return h("td",{...J("cell"),"data-label":l?me(e):void 0,style:r?{left:(Be[t]??0)+be}:void 0,className:[l?e.ellipsis?"rosh-dt-cell rosh-dt-clip":"rosh-dt-cell":"",n?"rosh-dt-corner":"",Q?f(e):"",Ne,y[e.align??(e.numeric?"right":"left")],Q?"":w(e),"text-ink-strongest",e.ellipsis?"max-w-0 truncate":"",r?"sticky z-10 bg-white":"",e.className??""].filter(Boolean).join(" "),children:Q?
|
|
19
|
+
/* @__PURE__ */h("span",{className:["rosh-dt-value",w(e,!0)].filter(Boolean).join(" "),children:o}):o},e.key)})]},Z(t,o))}),ne>0&&/* @__PURE__ */h("tr",{"aria-hidden":"true",children:/* @__PURE__ */h("td",{colSpan:we,style:{height:ne,padding:0,border:0}})})]}):/* @__PURE__ */h("tr",{...J("row"),className:Q?"rosh-dt-empty":void 0,children:/* @__PURE__ */h("td",{...J("cell"),colSpan:we,className:`${Ne} py-10 text-center text-gray-500`,children:W})})})]}),E]}),j&&j.pageCount>1&&/* @__PURE__ */h("div",{className:Q?"rosh-dt-pager mt-3 flex justify-end":"mt-3 flex justify-end",children:/* @__PURE__ */h(t,{page:j.page,pageCount:j.pageCount,onPageChange:j.onPageChange})})]});/* @__PURE__ */
|
|
20
|
+
return h("div",Q?void 0!==O&&O>0&&40!==O?{className:`rosh-dt-at ${D}`.trim(),children:/* @__PURE__ */h("div",{className:"rosh-dt-stack",style:{width:40/O*100+"%"},children:/* @__PURE__ */h("div",{className:"rosh-dt-fit",style:{width:O/40*100+"%"},children:Se})})}:{className:`rosh-dt-stack ${D}`.trim(),children:Se}:{className:D,children:Se})}export{x as DataTable};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{StatCard as e,Card as a}from"./chunk-RKSCB5BJ.js";import{Sparkline as t}from"./chunk-CKCDGSTC.js";import{PieChart as r}from"./chunk-6EGZ4PV4.js";import{Avatar as s}from"./chunk-SCNQK5NF.js";import{ColumnChart as l}from"./chunk-AQVPWUJ3.js";import{StatusBadgeProvider as i,StatusBadge as d}from"./chunk-
|
|
1
|
+
import{StatCard as e,Card as a}from"./chunk-RKSCB5BJ.js";import{Sparkline as t}from"./chunk-CKCDGSTC.js";import{PieChart as r}from"./chunk-6EGZ4PV4.js";import{Avatar as s}from"./chunk-SCNQK5NF.js";import{ColumnChart as l}from"./chunk-AQVPWUJ3.js";import{StatusBadgeProvider as i,StatusBadge as d}from"./chunk-ABIWAS5K.js";import{Button_default as c}from"./chunk-A4ROXNUF.js";import{TH_ONE_LINE as n}from"./chunk-FAPZFMS3.js";import{jsx as o,jsxs as m}from"react/jsx-runtime";var u={paid:"success",shipped:"active",processing:"queued",refunded:"neutral",overdue:"danger"},h=[12,18,14,22,19,27,24,31,28,35,30,38],p=["J","F","M","A","M","J","J","A","S","O","N","D"],g=[{key:"direct",label:"Direct",value:45},{key:"search",label:"Search",value:30},{key:"social",label:"Social",value:15},{key:"email",label:"Email",value:10}],x=[{id:"#3201",customer:"Alice Nguyen",total:"$1,204",status:"paid"},{id:"#3202",customer:"Marco Reyes",total:"$642",status:"shipped"},{id:"#3203",customer:"Priya Patel",total:"$2,980",status:"processing"},{id:"#3204",customer:"Tom Becker",total:"$318",status:"overdue"},{id:"#3205",customer:"Sara Lind",total:"$540",status:"refunded"}];function v(){/* @__PURE__ */
|
|
2
2
|
return o(i,{groups:u,children:/* @__PURE__ */o("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */m("div",{className:"mx-auto max-w-6xl space-y-6",children:[
|
|
3
3
|
/* @__PURE__ */m("div",{className:"flex items-center justify-between gap-4",children:[
|
|
4
4
|
/* @__PURE__ */m("div",{children:[
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{isAriaDisabled as e,swallowPress as a,describedByWith as r,OffWithReason as i}from"./chunk-TSZPGDU3.js";import{SpinnerRing as s}from"./chunk-R2VKEMZH.js";import{useRowControlSize as l}from"./chunk-3FININUU.js";import{buttonClasses as d}from"./chunk-UQYNPYF4.js";import{forwardRef as n,useId as o}from"react";import{jsxs as t,jsx as c}from"react/jsx-runtime";var m=n(function({variant:n="primary",size:m="md",loading:p=!1,leftIcon:b,rightIcon:f,block:u=!1,disabled:h,type:k="button",children:x,className:N="",disabledReason:y,onClick:j,pressed:v,"aria-disabled":g,"aria-describedby":I,...U},w){const z=l(m)??"md",C=o(),F=h||p,P=null!=y&&""!==y,R=F&&P,Y=!F&&e(g),Z=Y&&P,D=R||Z?C:void 0,E=/* @__PURE__ */t("button",{ref:w,type:k,disabled:F,"aria-busy":p||void 0,"aria-disabled":!!Y||g,"aria-describedby":r(I,D),onClick:Y?a:j,className:d({variant:n,size:z,block:u,pressed:v??(!0===U["aria-pressed"]||"true"===U["aria-pressed"]),className:N}),...U,children:[p?/* @__PURE__ */c(s,{className:"h-3.5 w-3.5",ink:""}):b,x,!p&&f]});return Z?/* @__PURE__ */c(i,{reason:y,id:C,block:u,children:E}):R?/* @__PURE__ */t("span",{className:u?"flex w-full flex-col gap-1":"inline-flex flex-col items-start gap-1",children:[E,
|
|
2
|
+
/* @__PURE__ */c("span",{id:D,className:"text-xs text-red-600",children:y})]}):E});export{m as Button_default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{OneLineLabel as t}from"./chunk-
|
|
1
|
+
import{OneLineLabel as t}from"./chunk-FAPZFMS3.js";import{createContext as s,useContext as a,useCallback as r}from"react";import{jsx as o}from"react/jsx-runtime";var e="inline-flex max-w-full items-center whitespace-nowrap rounded-full",n={success:"bg-[var(--status-success-soft)] text-[color:var(--status-success-soft-ink)]",active:"bg-[var(--status-active-soft)] text-[color:var(--status-active-soft-ink)]",queued:"bg-[var(--status-queued-soft)] text-[color:var(--status-queued-soft-ink)]",info:"bg-[var(--status-info-soft)] text-[color:var(--status-info-soft-ink)]",pending:"bg-[var(--status-pending-soft)] text-[color:var(--status-pending-soft-ink)]",warning:"bg-[var(--status-warning-soft)] text-[color:var(--status-warning-soft-ink)]",danger:"bg-[var(--status-danger-soft)] text-[color:var(--status-danger-soft-ink)]",draft:"bg-[var(--status-draft-soft)] text-[color:var(--status-draft-soft-ink)]",neutral:"bg-[var(--status-neutral-soft)] text-[color:var(--status-neutral-soft-ink)]"},u={success:"bg-[var(--status-success-solid)] text-[color:var(--status-on-solid)]",active:"bg-[var(--status-active-solid)] text-[color:var(--status-on-solid)]",queued:"bg-[var(--status-queued-solid)] text-[color:var(--status-on-solid)]",info:"bg-[var(--status-info-solid)] text-[color:var(--status-on-solid)]",pending:"bg-[var(--status-pending-solid)] text-[color:var(--status-on-solid)]",warning:"bg-[var(--status-warning-solid)] text-[color:var(--status-on-solid)]",danger:"bg-[var(--status-danger-solid)] text-[color:var(--status-on-solid)]",draft:"bg-[var(--status-draft-solid)] text-[color:var(--status-on-solid)]",neutral:"bg-[var(--status-neutral-solid)] text-[color:var(--status-on-solid)]"};function i(t,s="subtle"){return"solid"===s?u[t]:n[t]}var l=s({}),c=s(void 0);function d(t){return t.replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase())}function v({groups:t,labelFor:s,children:a}){/* @__PURE__ */
|
|
2
2
|
return o(l.Provider,{value:t,children:/* @__PURE__ */o(c.Provider,{value:s,children:a})})}function f(){const t=a(c);return r(s=>t?.(s)??d(s),[t])}function g({status:s,label:r,emphasis:n="subtle"}){const u=i(a(l)[s]??"neutral",n),v=a(c),f=r??v?.(s)??d(s);/* @__PURE__ */
|
|
3
3
|
return o("span",{className:`${e} px-3 py-0.5 text-xs font-medium ${u}`,children:/* @__PURE__ */o(t,{children:f})})}export{e as BADGE_PILL,n as GROUP_COLORS,u as GROUP_COLORS_SOLID,g as StatusBadge,v as StatusBadgeProvider,i as groupColors,d as statusLabel,f as useStatusLabel};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Input_default as r}from"./chunk-
|
|
1
|
+
import{Input_default as r}from"./chunk-D7MRZZVV.js";import{Icon as e}from"./chunk-ISVODSRP.js";import{forwardRef as a}from"react";import{jsx as m}from"react/jsx-runtime";var t=a(function({className:a="w-80",...t},c){/* @__PURE__ */
|
|
2
2
|
return m("div",{"data-search-input":"",className:`min-w-0 ${a}`,children:/* @__PURE__ */m(r,{ref:c,type:"search",leftIcon:/* @__PURE__ */m(e,{name:"search",className:"h-4 w-4"}),...t})})});export{t as SearchInput_default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isAriaDisabled as e,swallowPress as r,describedByWith as i,OffWithReason as a}from"./chunk-TSZPGDU3.js";import{useRowControlSize as s}from"./chunk-3FININUU.js";import{iconButtonClasses as d}from"./chunk-UQYNPYF4.js";import{forwardRef as o,useId as n}from"react";import{jsx as t}from"react/jsx-runtime";var c=o(function({children:o,variant:c="ghost",size:l="md",type:m="button",className:p="",pressed:b,disabledReason:u,ink:f,disabled:h,onClick:k,"aria-disabled":N,"aria-describedby":v,...j},y){const U=s(l)??"md",x=n(),z=(Boolean(h)||e(N))&&null!=u&&""!==u,C=z||e(N),F=/* @__PURE__ */t("button",{ref:y,type:m,className:d({variant:c,size:U,pressed:b??(!0===j["aria-pressed"]||"true"===j["aria-pressed"]),ink:f,className:p}),...j,disabled:z?void 0:h,"aria-disabled":!!C||N,"aria-describedby":i(v,z?x:void 0),onClick:C?r:k,children:o});return z?/* @__PURE__ */t(a,{reason:u,id:x,children:F}):F});export{c as IconButton_default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ErrorPage as r}from"./chunk-6NXPOZ6X.js";import{reportBoundaryError as e}from"./chunk-KNUR2UEG.js";import{Button_default as t}from"./chunk-
|
|
1
|
+
import{ErrorPage as r}from"./chunk-6NXPOZ6X.js";import{reportBoundaryError as e}from"./chunk-KNUR2UEG.js";import{Button_default as t}from"./chunk-A4ROXNUF.js";import{useShellStrings as s}from"./chunk-NRHG4R2Q.js";import{Component as o}from"react";import{jsxs as i,jsx as a,Fragment as n}from"react/jsx-runtime";function c({pick:r}){/* @__PURE__ */
|
|
2
2
|
return a(n,{children:r(s().errors)})}var l=class extends o{state={error:null};static getDerivedStateFromError(r){return{error:r}}componentDidCatch(r,t){console.error("ErrorBoundary caught an error:",r,t),e(r),this.props.onError?.(r,t)}componentDidUpdate(r){if(!this.state.error)return;const e=r.resetKeys??[],t=this.props.resetKeys??[];(e.length!==t.length||e.some((r,e)=>!Object.is(r,t[e])))&&this.reset()}reset=()=>this.setState({error:null});render(){const{error:e}=this.state;return e?this.props.fallback?this.props.fallback(e,this.reset):
|
|
3
3
|
/* @__PURE__ */i("div",{className:"flex h-full flex-col",children:[
|
|
4
4
|
/* @__PURE__ */a("div",{role:"alert",className:"min-h-0 flex-1",children:/* @__PURE__ */a(r,{code:500,actions:/* @__PURE__ */i(n,{children:[
|
|
@@ -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",{...
|
|
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:
|
|
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-TAIH2VIW.js";import{useFileIntake as d,FileIntakeAlert as c}from"./chunk-TNGIXSTM.js";import{ColoredBadge as u}from"./chunk-L2WQOJ3T.js";import{MENU_ON_MEDIA_ATTR as m}from"./chunk-5QFPTDQF.js";import{Icon as p}from"./chunk-ISVODSRP.js";import{Tooltip as f}from"./chunk-CIZAUBWA.js";import{useShellStrings as h}from"./chunk-NRHG4R2Q.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:T,onDragOutChange:K,dropType:A,onDropData:C,label:I,hint:O,error:S,required:F,className:L,accept:P="image/*",maxSizeBytes:z,maxFiles:R,fit:$="cover",thumbSize:E=96,placeholder:H,cta:M,acceptHint:W,showCover:B=!1,coverLabel:Q,busy:q=!1,busyLabel:G,progress:U,disabled:V=!1,readOnly:J=!1,selected:X,onItemClick:Y,onItemDoubleClick:Z,onItemContextMenu:_,menuOnMedia:ee=!1}){const te=h().media,re=M??te.cta,ae=Q??te.cover,ne=G??te.uploading,le=g(),[ie,oe]=b(null),se=V||q,de=!(!k&&!N||se||J),ce=!!w&&!se&&!J,ue=!!j&&!se&&!J,me=!!T&&!V&&!ue,pe=!(!A||!C||se||J),fe=t(se),he=H??r(P,te),ge=d({accept:P,maxSizeBytes:z,maxFiles:R,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(A),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(A);t&&C(t)}},Ne=ge.dragOver||be,we=()=>{de&&(k?k():ge.open())},je={width:E,height:E},Te=null==X?null:new Set(X),Ke=!!Y,Ae=E<112,Ce=(e,t)=>{const r=e.kind?"video"===e.kind:i(e.url,P),a=e.name??o(e.url),n=B&&(e.cover??0===t);/* @__PURE__ */
|
|
2
|
+
return v("div",{...Ke?{"data-grid-item":"","data-grid-id":e.id,role:"option"}:{},...ee?{[m]:""}:{},"aria-selected":Te?Te.has(e.id):void 0,onClick:Ke?t=>{t.target.closest?.("button")||Y(e.id,{ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey})}:void 0,onDoubleClick:Z?()=>Z(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(T,e.dragData);for(const[r,a]of Object.entries(e.dragAlso??{}))t.dataTransfer.setData(r,a);K?.("start",e.id,t.currentTarget)}:void 0,onDragEnd:ue?()=>oe(null):me&&e.dragData&&K?t=>K("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||Ke?0:void 0,"aria-label":ue?te.reorder(a,t+1,p.length):Ke?a:void 0,onKeyDown:Ke&&!ue?t=>{t.target!==t.currentTarget||"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),Y(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":"",Te?.has(e.id)?"ring-2 ring-blue-500 ring-offset-1":"",Ke?"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:$}}):/* @__PURE__ */x("img",{src:e.url,alt:a,className:"h-full w-full",style:{objectFit:$}}),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
|
+
/* @__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:Ae?
|
|
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
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)},Ie=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})]}),Oe=de?/* @__PURE__ */v("button",{type:"button",onClick:()=>we(),"aria-label":"string"==typeof he?he:te.upload,className:n(Ne,!1,fe),style:{minHeight:E+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:I,labelId:I?`${le}-label`:void 0,htmlFor:le,hint:
|
|
12
|
-
/* @__PURE__ */v("div",{id:le,role:"group","aria-labelledby":I?`${le}-label`:void 0,"aria-describedby":
|
|
13
|
-
/* @__PURE__ */x("div",{role:"listbox","aria-multiselectable":!!Te||void 0,"aria-label":"string"==typeof I?I:te.files,className:"contents",children:p.map(
|
|
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:E+32},children:/* @__PURE__ */x("span",{className:q?"invisible":void 0,children:te.empty})});/* @__PURE__ */
|
|
11
|
+
return v(e,{label:I,labelId:I?`${le}-label`:void 0,htmlFor:le,hint:O,error:S,required:F,className:L,children:[
|
|
12
|
+
/* @__PURE__ */v("div",{id:le,role:"group","aria-labelledby":I?`${le}-label`:void 0,"aria-describedby":S?`${le}-error`:O?`${le}-hint`:void 0,"aria-busy":q||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?Oe:/* @__PURE__ */v("div",{className:"flex flex-wrap gap-2",children:[Ke?
|
|
13
|
+
/* @__PURE__ */x("div",{role:"listbox","aria-multiselectable":!!Te||void 0,"aria-label":"string"==typeof I?I:te.files,className:"contents",children:p.map(Ce)}):p.map(Ce),Ie]}),q&&/* @__PURE__ */x(l,{label:ne,progress:U})]}),!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,20 +1,20 @@
|
|
|
1
|
-
import{MOVE_KEYS as e,MoveGrip as t,MoveHint as r,moveFromKey as a}from"./chunk-
|
|
1
|
+
import{MOVE_KEYS as e,MoveGrip as t,MoveHint as r,moveFromKey as a}from"./chunk-5B7CLXHC.js";import{ItemCount as n}from"./chunk-PO2KNVCC.js";import{GROUP_COLORS as o}from"./chunk-ABIWAS5K.js";import{Icon as i}from"./chunk-ISVODSRP.js";import{OneLineLabel as s}from"./chunk-FAPZFMS3.js";import{Tooltip as l}from"./chunk-CIZAUBWA.js";import{useBrowserLayoutEffect as c}from"./chunk-PU2GJVMG.js";import{useShellStrings as d}from"./chunk-NRHG4R2Q.js";import{useRef as u,useCallback as p,useId as m,isValidElement as f}from"react";import{jsx as h,jsxs as g}from"react/jsx-runtime";var b='[role="treeitem"]';function v(e){return[...e.querySelectorAll(b)].filter(t=>{for(let r=t.parentElement?.closest('[role="group"]');r&&e.contains(r);r=r.parentElement?.closest('[role="group"]')??null)if(r.hasAttribute("hidden"))return!1;return!0})}function y({"aria-label":e,"aria-labelledby":t,children:r,className:a="",rootProps:n}){const o=u(null);c(()=>{const e=o.current;if(!e)return;const t=[...e.querySelectorAll(b)];if(0===t.length)return;const r=t.find(e=>e===document.activeElement)??t.find(e=>"true"===e.getAttribute("aria-selected"))??v(e)[0]??t[0];for(const e of t)e.tabIndex=e===r?0:-1});const i=p(e=>{n?.onKeyDown?.(e);const t=o.current,r=e.target.closest?.(b);if(!t||!r||e.target!==r||e.defaultPrevented)return;if(e.altKey||e.ctrlKey||e.metaKey)return;const a=v(t),i=a.indexOf(r),s=Number(r.getAttribute("aria-level")??"1"),l=r=>{e.preventDefault(),function(e,t){if(t){for(const r of e.querySelectorAll(b))r.tabIndex=r===t?0:-1;t.focus()}}(t,r)};switch(e.key){case"ArrowDown":l(a[i+1]);break;case"ArrowUp":l(a[i-1]);break;case"Home":l(a[0]);break;case"End":l(a[a.length-1]);break;case"ArrowRight":if("true"===r.getAttribute("aria-expanded")){const t=a[i+1];t&&Number(t.getAttribute("aria-level")??"1")>s?l(t):e.preventDefault()}break;case"ArrowLeft":if("true"!==r.getAttribute("aria-expanded"))for(let e=i-1;e>=0;e--)if(Number(a[e].getAttribute("aria-level")??"1")<s){l(a[e]);break}}},[n]);/* @__PURE__ */
|
|
2
2
|
return h("div",{...n,ref:o,role:"tree","aria-label":t?void 0:e,"aria-labelledby":t,onKeyDown:i,className:`flex flex-col gap-1 ${a}`.trim(),children:r})}function x({children:e,hidden:t,className:r=""}){/* @__PURE__ */
|
|
3
3
|
return h("div",{role:"group",hidden:t,className:`ml-4 flex flex-col gap-1 border-l border-gray-200 pl-2 ${r}`.trim(),children:e})}var k=["inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-full px-2","text-2xs font-medium normal-case tabular-nums tracking-normal"].join(" "),w=`${k} bg-[color:color-mix(in_srgb,var(--ink-faint)_12%,transparent)] text-gray-600`;function N(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&!f(e)&&"label"in e}function A(e){if(null==e||!1===e||"number"==typeof e)return null;const t=Array.isArray(e)&&e.length>0&&e.every(N)?e:N(e)?[e]:null;return t?t.map((e,t)=>/* @__PURE__ */h("span",{"data-tree-count":"","data-tone":e.tone,className:e.tone?`${k} ${o[e.tone]}`:w,children:e.label},t)):/* @__PURE__ */h("span",{"data-tree-count":"",className:w,children:e})}function j({children:e,count:t,countLabel:r,expanded:a,onToggle:o}){const i=void 0!==a,l=
|
|
4
4
|
/* @__PURE__ */h("span",{"data-tree-label-text":"",className:"flex min-w-0 flex-1 text-left",children:/* @__PURE__ */h(s,{children:e})}),c="number"==typeof t?/* @__PURE__ */h(n,{count:t,label:r,showZero:!0}):null!=t&&!1!==t&&/* @__PURE__ */h("span",{"data-tree-count":"",className:w,children:t}),d="text-xs font-semibold uppercase tracking-wide text-ink-faint";return i?/* @__PURE__ */h("div",{role:"presentation",className:"pb-1 pt-3",children:/* @__PURE__ */g("button",{type:"button","aria-expanded":a,onClick:o,className:["flex w-full items-center gap-2 rounded-md px-2 hover:text-ink-strongest","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",d].join(" "),children:[
|
|
5
5
|
/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-caret":"",className:"flex h-4 w-4 shrink-0 items-center justify-center",children:P(!!a)}),l,c]})}):/* @__PURE__ */g("div",{role:"presentation",className:`flex items-center gap-2 px-2 pb-1 pt-3 ${d}`,children:[
|
|
6
|
-
/* @__PURE__ */h("span",{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),l,c]})}var P=e=>/* @__PURE__ */h(i,{name:"chevron-right","aria-hidden":"true",strokeWidth:2.6,className:"h-3 w-3 transition-transform "+(e?"rotate-90":"")})
|
|
7
|
-
return g("div",{...
|
|
8
|
-
/* @__PURE__ */h(t,{marker:"tree",hint:
|
|
9
|
-
/* @__PURE__ */h("span",
|
|
10
|
-
/* @__PURE__ */g("span",{className:"relative flex min-w-0 flex-1 items-center gap-2",children:[
|
|
11
|
-
/* @__PURE__ */h("span",{"data-tree-name":"",className:`flex min-w-0 ${d?"font-semibold":"font-medium"} ${v?"text-ink-faintest line-through":""}`,children:/* @__PURE__ */g(s,{children:[o,null!=c&&/* @__PURE__ */h("span",{className:"ml-2 font-normal text-ink-faint",children:c})]})}),A(y),null!=
|
|
12
|
-
/* @__PURE__ */g("span",{"data-tree-actions":"","data-tree-actions-overlay":"",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),style
|
|
6
|
+
/* @__PURE__ */h("span",{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),l,c]})}var P=e=>/* @__PURE__ */h(i,{name:"chevron-right","aria-hidden":"true",strokeWidth:2.6,className:"h-3 w-3 transition-transform "+(e?"rotate-90":"")}),C={backgroundColor:"inherit",maskImage:"linear-gradient(to right, transparent, black 12px)",WebkitMaskImage:"linear-gradient(to right, transparent, black 12px)"};function $({label:o,level:i=1,icon:l,preview:c,selected:d=!1,tone:u,expanded:p,onToggle:f,onSelect:b,muted:v=!1,badge:y,count:x,countLabel:k,actions:w,actionsPinned:N=!1,actionsOverlay:j=!0,rename:$,drop:D,dragging:K=!1,draggable:I=!1,dragHint:S,onMove:H,rowProps:B,className:E=""}){const L=void 0!==p,R=m(),W=x??("number"==typeof y?y:void 0),M=[B?.["aria-describedby"],H?R:void 0].filter(Boolean).join(" ")||void 0,O="shared"===u?"text-[color:var(--status-success-soft-ink)]":null,Z=d?O?`bg-[var(--status-success-soft)] ${O}`:"bg-accent-tint text-blue-700":"into"===D?`bg-accent-tint ${O??"text-ink-strongest"}`:`${O??"text-ink"} hover:bg-gray-100`;/* @__PURE__ */
|
|
7
|
+
return g("div",{...B,role:"treeitem","aria-level":i,"aria-selected":d,"aria-expanded":L?p:void 0,"data-tone":u,tabIndex:d?0:-1,"aria-keyshortcuts":B?.["aria-keyshortcuts"]??(H?e:void 0),"aria-describedby":M,"data-drop":D,"data-draggable":I||void 0,onKeyDown:e=>{if(B?.onKeyDown?.(e),e.target!==e.currentTarget||e.defaultPrevented)return;const t=a(e);t&&H?(e.preventDefault(),H(t)):"Enter"!==e.key&&" "!==e.key||!b?("ArrowRight"===e.key&&L&&!p&&f||"ArrowLeft"===e.key&&L&&p&&f)&&(e.preventDefault(),f()):(e.preventDefault(),b())},onClick:e=>{B?.onClick?.(e),e.defaultPrevented||b?.()},className:["group/treerow relative flex h-8 shrink-0 select-none items-center gap-2 rounded-md px-2 text-sm",I?"cursor-grab active:cursor-grabbing":"cursor-pointer","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",Z,"into"===D?"ring-2 ring-inset ring-[color:var(--rosh-drop-ring)]":"",K?"opacity-40":"",E].filter(Boolean).join(" "),children:["before"===D&&/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-drop-line":"",className:"pointer-events-none absolute inset-x-2 -top-0.5 h-0.5 rounded-full bg-blue-500"}),"after"===D&&/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-drop-line":"",className:"pointer-events-none absolute inset-x-2 -bottom-0.5 h-0.5 rounded-full bg-blue-500"}),I&&
|
|
8
|
+
/* @__PURE__ */h(t,{marker:"tree",hint:S,dragging:K,revealClassName:"group-hover/treerow:opacity-100"}),
|
|
9
|
+
/* @__PURE__ */h("span",L?{"aria-hidden":"true","data-tree-caret":"",onClick:e=>{e.stopPropagation(),f?.()},className:"flex h-4 w-4 shrink-0 items-center justify-center rounded text-gray-500 hover:bg-gray-200 hover:text-gray-900",children:P(!!p)}:{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),null!=l&&/* @__PURE__ */h("span",{"aria-hidden":"true",className:"flex h-4 w-4 shrink-0 items-center justify-center "+(v?"text-ink-faintest":""),children:l}),
|
|
10
|
+
/* @__PURE__ */g("span",{className:"relative flex min-w-0 flex-1 items-center gap-2",children:[$??
|
|
11
|
+
/* @__PURE__ */h("span",{"data-tree-name":"",className:`flex min-w-0 ${d?"font-semibold":"font-medium"} ${v?"text-ink-faintest line-through":""}`,children:/* @__PURE__ */g(s,{children:[o,null!=c&&/* @__PURE__ */h("span",{className:"ml-2 font-normal text-ink-faint",children:c})]})}),A(y),null!=W&&/* @__PURE__ */h(n,{count:W,label:k,active:d,showZero:!0,className:"ml-auto"}),null!=w&&!j&&/* @__PURE__ */h("span",{"data-tree-actions":"",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),className:`${null!=W?"":"ml-auto "}flex shrink-0 items-center gap-0.5 transition-opacity ${N||v?"opacity-100":"opacity-0 group-hover/treerow:opacity-100 group-focus-within/treerow:opacity-100"}`,children:w})]}),null!=w&&j&&
|
|
12
|
+
/* @__PURE__ */g("span",{"data-tree-actions":"","data-tree-actions-overlay":"",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),style:C,className:"absolute inset-y-0 right-0 grid rounded-r-md transition-opacity "+(N||v||d?"opacity-100":"pointer-events-none opacity-0 group-hover/treerow:pointer-events-auto group-hover/treerow:opacity-100 group-focus-within/treerow:pointer-events-auto group-focus-within/treerow:opacity-100"),children:[
|
|
13
13
|
/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-actions-scrim":"",className:"col-start-1 row-start-1",style:{background:"var(--rosh-tree-ground, var(--surface))"}}),
|
|
14
14
|
/* @__PURE__ */h("span",{"aria-hidden":"true",className:"col-start-1 row-start-1",style:{backgroundColor:"inherit"}}),
|
|
15
|
-
/* @__PURE__ */h("span",{className:"col-start-1 row-start-1 flex items-center gap-0.5 pl-4 pr-2",children:w})]}),
|
|
15
|
+
/* @__PURE__ */h("span",{className:"col-start-1 row-start-1 flex items-center gap-0.5 pl-4 pr-2",children:w})]}),H&&/* @__PURE__ */h(r,{id:R})]})}function D({onAdd:e,label:t,drop:r=!1,slotProps:a}){const n=d().tree,o=r?n.dropHere:t??n.empty,i="flex min-h-8 w-full items-center gap-2 rounded-md border border-dashed px-3 text-sm "+(r?"border-blue-500 bg-blue-50 text-blue-700":"border-gray-300 text-gray-500");/* @__PURE__ */
|
|
16
16
|
return h("div",{...a,role:"presentation","data-drop":r||void 0,children:e?/* @__PURE__ */g("button",{type:"button",onClick:e,className:`${i} text-left hover:bg-gray-100 hover:text-gray-900 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]`,children:[
|
|
17
17
|
/* @__PURE__ */h("span",{"aria-hidden":"true",children:"+"}),o]}):/* @__PURE__ */h("span",{className:i,children:o})})}function K({onInsert:e,label:t,drop:r=!1,seamProps:a}){const n=d().tree,o=t??n.insertHere,s=r?"opacity-100":e?"opacity-0 group-hover/seam:opacity-100 group-focus-within/seam:opacity-100":"opacity-0";/* @__PURE__ */
|
|
18
18
|
return g("div",{...a,role:"presentation","data-tree-seam":"","data-drop":r||void 0,className:`group/seam relative z-10 -my-1 h-1 shrink-0 ${a?.className??""}`.trim(),children:[
|
|
19
19
|
/* @__PURE__ */h("span",{"aria-hidden":"true",className:"absolute inset-x-0 -bottom-1 -top-1"}),
|
|
20
|
-
/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-seam-line":"",className:`pointer-events-none absolute inset-x-2 top-1/2 h-0.5 -translate-y-1/2 rounded-full bg-blue-500 transition-opacity ${s}`}),e&&/* @__PURE__ */h(l,{content:o,className:"absolute left-1/2 top-1/2 inline-flex -translate-x-1/2 -translate-y-1/2",children:/* @__PURE__ */h("button",{type:"button","aria-label":o,onClick:e,className:"flex h-5 w-5 items-center justify-center rounded-full bg-blue-600 text-white transition rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(r?"scale-75 opacity-0":"scale-75 opacity-0 group-hover/seam:scale-100 group-hover/seam:opacity-100 focus-visible:scale-100 focus-visible:opacity-100"),children:/* @__PURE__ */h(i,{name:"add","aria-hidden":"true",strokeWidth:2.6,className:"h-3 w-3"})})})]})}export{y as Tree,
|
|
20
|
+
/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-seam-line":"",className:`pointer-events-none absolute inset-x-2 top-1/2 h-0.5 -translate-y-1/2 rounded-full bg-blue-500 transition-opacity ${s}`}),e&&/* @__PURE__ */h(l,{content:o,className:"absolute left-1/2 top-1/2 inline-flex -translate-x-1/2 -translate-y-1/2",children:/* @__PURE__ */h("button",{type:"button","aria-label":o,onClick:e,className:"flex h-5 w-5 items-center justify-center rounded-full bg-blue-600 text-white transition rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(r?"scale-75 opacity-0":"scale-75 opacity-0 group-hover/seam:scale-100 group-hover/seam:opacity-100 focus-visible:scale-100 focus-visible:opacity-100"),children:/* @__PURE__ */h(i,{name:"add","aria-hidden":"true",strokeWidth:2.6,className:"h-3 w-3"})})})]})}export{y as Tree,D as TreeEmptySlot,x as TreeGroup,j as TreeGroupLabel,$ as TreeRow,K as TreeSeam};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import{firstEnabledIndex as e,matchTypeahead as t,lastEnabledIndex as r,nextEnabledIndex as n}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as i,groupedRows as a,isOptionGroup as l,OptionCheck as o}from"./chunk-K5YT5PMJ.js";import{useSettingAuto as d}from"./chunk-2NMW66P5.js";import{inputClasses as s,PLACEHOLDER_INK as c}from"./chunk-AYZY3YNC.js";import{useIsMobile as u}from"./chunk-UGTRSRIW.js";import{optionNoteClass as p}from"./chunk-URHGHXDN.js";import{Icon as m}from"./chunk-ISVODSRP.js";import{onOverlayOpen as v}from"./chunk-PGN5ME7B.js";import{createShellPortal as h}from"./chunk-5QRHQCRG.js";import{Z_LAYERS as f}from"./chunk-62LW225J.js";import{useDropdownPosition as b,MENU_MAX_HEIGHT as g}from"./chunk-TAHHZGRH.js";import{useBrowserLayoutEffect as y}from"./chunk-PU2GJVMG.js";import{useRowControlSize as x}from"./chunk-3FININUU.js";import{registerModalEscapeInterceptor as k}from"./chunk-TWVUQUUD.js";import{solidSurfaceStyle as N}from"./chunk-5FYDNH4Y.js";import{useShellStrings as w}from"./chunk-NRHG4R2Q.js";import{forwardRef as $,useId as D,useState as j,useRef as H,useMemo as S,useCallback as T,useEffect as I}from"react";import{jsxs as C,jsx as R,Fragment as E}from"react/jsx-runtime";var O=e=>e.labelStyle?{lineHeight:1.25,...e.labelStyle}:void 0,z=$(function({value:e,onChange:t,options:r,placeholder:n,invalid:i,className:a="",size:l,touchSize:o,renderOption:c,renderValue:u,valueText:p,readOnly:m,footer:v,changed:h,auto:f,multiple:b,"aria-describedby":g,...y},x){const k=t,N=w(),$=d(),j=f??$,H=D(),S=/* @__PURE__ */C("select",{ref:x,value:e,multiple:b||void 0,onChange:e=>k(b?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),"aria-invalid":i||void 0,"aria-describedby":[g,j?H:void 0].filter(Boolean).join(" ")||void 0,className:s({invalid:i,size:l,auto:j,className:`pr-8 ${a}`.trim()}),...y,children:[void 0!==n&&!b&&/* @__PURE__ */R("option",{value:"",disabled:!0,children:n}),
|
|
2
|
+
/* @__PURE__ */R(U,{items:r})]});return j?/* @__PURE__ */C(E,{children:[S,
|
|
3
|
+
/* @__PURE__ */R("span",{id:H,hidden:!0,children:N.settingView.auto})]}):S});function U({items:e}){const t=e=>/* @__PURE__ */R("option",{value:e.value,disabled:e.disabled,lang:e.lang,children:e.label},e.value);/* @__PURE__ */
|
|
4
|
+
return R(E,{children:e.map((e,r)=>(e=>l(e))(e)?/* @__PURE__ */R("optgroup",{label:e.label,children:e.options.map(t)},`group-${r}`):t(e))})}var A=$(function({value:l,onChange:u,options:$,placeholder:z,invalid:A,className:P="",id:V,disabled:G,size:K,touchSize:M,title:Y,multiple:B,renderOption:F,renderValue:W,valueText:L,readOnly:Q=!1,footer:J,changed:q=!1,auto:X,"aria-describedby":Z,"aria-label":_,"aria-labelledby":ee,...te},re){const ne=x(K),[ie,ae]=j(!1),[le,oe]=j(-1),de=H(null),se=H(null),ce=H(null),ue=H(null),pe=H([]),me=()=>ue.current??ce.current,ve=!!J?.length,he="sm"===ne,fe=he?"min-h-7 px-3 py-1 text-xs leading-4":"min-h-(--row-height-menu) px-3 py-2 text-sm leading-5",be=p(he),[ge,ye]=j(null),xe=w(),ke=H(ie);ke.current=ie;const Ne=H({buffer:"",timer:null}),we=D(),$e=`${we}-listbox`,De=V??`${we}-trigger`,je=e=>`${we}-opt-${e}`,He=`${we}-changed`,Se=d(),Te=X??Se,Ie=`${we}-auto`,Ce=[Z,q?He:void 0,Te?Ie:void 0].filter(Boolean).join(" ")||void 0,Re=S(()=>i($),[$]),Ee=B?l:[],Oe=u,ze=b(se,ie,{matchTriggerWidth:!0,...J?.length?{preferredMaxHeight:Number.POSITIVE_INFINITY}:{}}),Ue=`${ie}|${ze?.top}|${ze?.bottom}|${ze?.maxHeight}|${$.length}`;y(()=>{ye(null)},[Ue]),y(()=>{const e=ce.current;if(!ie||!e||null!==ge)return;if(e.scrollHeight<=e.clientHeight+1)return;const t=getComputedStyle(e),r=parseFloat(t.paddingTop)||0;parseFloat(t.paddingBottom);const n=e.getBoundingClientRect().top;let i=0;for(const t of e.querySelectorAll('[role="option"]')){const r=t.getBoundingClientRect().bottom-n+e.scrollTop;if(!(r<=e.clientHeight+.5))break;i=r}i>r&&ye(Math.floor(i))},[ie,ge,Ue]);const Ae=B?Re.findIndex(e=>Ee.includes(e.value)):Re.findIndex(e=>e.value===l),Pe=B?Re.filter(e=>Ee.includes(e.value)).map(e=>e.label).join(", ")||void 0:Ae>=0?Re[Ae].label:void 0,Ve=!B&&Ae>=0?Re[Ae].lang:void 0,Ge=B?Re.filter(e=>Ee.includes(e.value)):Ae>=0?[Re[Ae]]:[],Ke=W&&Ge.length?W(Ge):void 0,Me=void 0!==Ke&&L?L(Ge):void 0,Ye=T((e=!0)=>{ae(!1),oe(-1),e&&se.current?.focus()},[]),Be=T(()=>{G||Q||(oe(Ae>=0?Ae:e(Re)),ae(!0))},[G,Q,Re,Ae]),Fe=T(e=>{const t=Re[e];if(t&&!t.disabled){if(B){const r=l;return Oe(r.includes(t.value)?r.filter(e=>e!==t.value):[...r,t.value]),void oe(e)}Oe(t.value),Ye()}},[Re,B,l,Oe,Ye]);I(()=>{if(!ie)return;return k(e=>!("Escape"!==e.key||!ke.current)&&(Ye(),!0),me)},[ie,Ye]),I(()=>{if(!ie)return;const e=e=>{const t=e.target;de.current?.contains(t)||me()?.contains(t)||Ye(!1)};document.addEventListener("pointerdown",e);const t=v(()=>Ye(!1));return()=>{document.removeEventListener("pointerdown",e),t()}},[ie,Ye]),I(()=>{!ie||le<0||ce.current?.querySelector(`#${CSS.escape(je(le))}`)?.scrollIntoView({block:"nearest"})},[ie,le]);const We=T(e=>{const r=Ne.current;r.timer&&clearTimeout(r.timer),r.buffer+=e,r.timer=setTimeout(()=>{r.buffer="",r.timer=null},500);const n=ie?le:Ae,i=t(Re,r.buffer,n);i<0||(ie?oe(i):B?(oe(i),ae(!0)):Fe(i))},[ie,le,Ae,Re,Fe,B]),Le=ie?a($,(e,t)=>{const r=(n=e.value,B?Ee.includes(n):l===n);var n;const i=t===le;/* @__PURE__ */
|
|
5
|
+
return C("div",{id:je(t),role:"option",lang:e.description||e.labelStyle||F?void 0:e.lang,"aria-selected":r,"aria-disabled":e.disabled||void 0,onPointerEnter:()=>{e.disabled||oe(t)},onClick:()=>Fe(t),className:`mx-1 cursor-pointer truncate rounded-lg ${fe}${B?" flex items-center gap-2":""}\n ${e.disabled?"cursor-not-allowed text-gray-400":i?"bg-blue-50 text-blue-700":r?"font-medium text-blue-600":"text-gray-700"}`,children:[B&&/* @__PURE__ */R(o,{selected:r}),F?/* @__PURE__ */R("span",{className:"block min-w-0 flex-1 truncate",children:F(e,{selected:r,active:i})}):B?/* @__PURE__ */C("span",{className:"block min-w-0 flex-1",children:[
|
|
6
|
+
/* @__PURE__ */R("span",{lang:e.lang,className:"block truncate",style:O(e),children:e.label}),e.description&&/* @__PURE__ */R("span",{className:be,children:e.description})]}):e.description||e.labelStyle?
|
|
7
|
+
/* @__PURE__ */C(E,{children:[
|
|
8
|
+
/* @__PURE__ */R("span",{lang:e.lang,className:"block truncate",style:O(e),children:e.label}),e.description&&/* @__PURE__ */R("span",{className:be,children:e.description})]}):e.label]},e.value)},we,"mx-1"):null,Qe=void 0!==Ke?
|
|
9
|
+
/* @__PURE__ */C("span",{className:"relative block min-w-0 truncate",children:[
|
|
10
|
+
/* @__PURE__ */R("span",{"aria-hidden":"true","data-select-value":"",className:"flex min-w-0 items-center gap-2 truncate",children:Ke}),
|
|
11
|
+
/* @__PURE__ */R("span",{lang:void 0===Me?Ve:void 0,className:"sr-only",children:Me??Pe})]}):/* @__PURE__ */R("span",{lang:Ve,className:`block truncate ${void 0===Pe?c:""}`,children:Pe??z??" "}),Je={zIndex:f.popup,left:ze?.left,top:ze?.top,bottom:ze?.bottom,width:ze?.width,maxHeight:ze?.maxHeight??g,visibility:ze?void 0:"hidden",...N()},qe=/* @__PURE__ */R("div",{ref:ce,id:$e,role:"listbox","aria-labelledby":ee??(_?void 0:De),"aria-label":ee?void 0:_,"aria-multiselectable":B||void 0,className:ve?"min-h-0 shrink overflow-y-auto py-1":"fixed overflow-y-auto rounded-(--radius-popup) py-1",style:ve?null!==ge?{maxHeight:ge}:void 0:null!==ge?{...Je,maxHeight:ge}:Je,children:Le}),Xe=ve?/* @__PURE__ */C("div",{ref:ue,className:"fixed flex flex-col overflow-hidden rounded-(--radius-popup)",style:Je,children:[qe,
|
|
12
|
+
/* @__PURE__ */R("div",{className:"shrink-0 border-t border-(--rosh-glass-solid-border) px-1 py-1",children:J.map((e,t)=>/* @__PURE__ */C("button",{ref:e=>{pe.current[t]=e},type:"button","data-select-action":"","aria-disabled":e.disabled||void 0,onClick:()=>(e=>{e.disabled||(Ye(),e.onSelect())})(e),onKeyDown:e=>((e,t)=>{const r=(J?.length??0)-1,n=t=>{e.preventDefault(),pe.current[t]?.focus()},i=()=>{e.preventDefault(),se.current?.focus()};switch(e.key){case"ArrowDown":return void n(Math.min(t+1,r));case"ArrowUp":return void(0===t?i():n(t-1));case"Home":return void n(0);case"End":return void n(r);case"Tab":return e.shiftKey?void(0===t?i():n(t-1)):t<r?void n(t+1):(e.preventDefault(),void Ye());case"Escape":return e.preventDefault(),e.stopPropagation(),void Ye()}})(e,t),className:`flex w-full items-center gap-2 rounded-lg ${fe} text-left rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${e.disabled?"cursor-not-allowed text-ink-faintest":"cursor-pointer text-ink hover:bg-accent-tint hover:text-blue-700"}`,children:[e.icon&&/* @__PURE__ */R(m,{name:e.icon,"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
|
|
13
|
+
/* @__PURE__ */R("span",{className:"min-w-0 flex-1 truncate",children:e.label})]},e.label))})]}):qe;/* @__PURE__ */
|
|
14
|
+
return C("div",{ref:de,className:"relative",children:[
|
|
15
|
+
/* @__PURE__ */R("button",{ref:se,id:De,type:"button",role:"combobox","aria-haspopup":"listbox","aria-expanded":ie,"aria-controls":ie?$e:void 0,"aria-activedescendant":ie&&le>=0?je(le):void 0,"aria-invalid":A||void 0,"aria-describedby":Ce,"aria-label":_,"aria-labelledby":ee,title:Y,disabled:G,"aria-readonly":Q||void 0,onClick:()=>ie?Ye():Be(),onKeyDown:t=>{if(!G&&!Q)switch(t.key){case"ArrowDown":return t.preventDefault(),void(ie?oe(e=>n(Re,e,1)):Be());case"ArrowUp":return t.preventDefault(),void(ie?oe(e=>n(Re,e,-1)):Be());case"Home":return void(ie&&(t.preventDefault(),oe(e(Re))));case"End":return void(ie&&(t.preventDefault(),oe(r(Re))));case"Enter":return void(ie&&(t.preventDefault(),Fe(le)));case" ":return t.preventDefault(),void(ie?Fe(le):Be());case"Escape":return void(ie&&(t.preventDefault(),t.stopPropagation(),Ye()));case"Tab":return ie&&ve&&!t.shiftKey?(t.preventDefault(),void pe.current[0]?.focus()):void(ie&&Ye(!1));default:1!==t.key.length||t.metaKey||t.ctrlKey||t.altKey||(t.preventDefault(),We(t.key))}},className:s({invalid:A,size:ne,readOnly:Q,auto:Te,className:`${Q?"":"pr-8 "}text-left ${P}`.trim()}),children:q?
|
|
16
|
+
/* @__PURE__ */C("span",{className:"flex min-w-0 items-center gap-1",children:[Qe,
|
|
17
|
+
/* @__PURE__ */R("span",{"aria-hidden":"true","data-select-changed":"",className:"shrink-0",children:"*"})]}):Qe}),q&&/* @__PURE__ */R("span",{id:He,hidden:!0,children:xe.select.changed}),Te&&/* @__PURE__ */R("span",{id:Ie,hidden:!0,children:xe.settingView.auto}),!Q&&/* @__PURE__ */R(m,{name:"chevron-up-down","aria-hidden":"true",className:`pointer-events-none absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 ${c}`,strokeWidth:2}),
|
|
18
|
+
/* @__PURE__ */C("select",{ref:re,value:l,multiple:B||void 0,onChange:e=>Oe(B?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),disabled:G,"aria-hidden":"true",tabIndex:-1,className:"sr-only",...te,children:[void 0!==z&&!B&&/* @__PURE__ */R("option",{value:"",disabled:!0,children:z}),
|
|
19
|
+
/* @__PURE__ */R(U,{items:$})]}),ie&&h(Xe,document.body)]})}),P=$(function({touchSize:e,...t},r){const n=u(),i=e??"touch";return!n||void 0===t.footer&&void 0===t.changed||t.readOnly?n&&!t.readOnly?/* @__PURE__ */R(z,{ref:r,...t,size:i}):/* @__PURE__ */R(A,{ref:r,...t}):/* @__PURE__ */R(A,{ref:r,...t,size:i})});export{z as NativeSelect,P as Select_default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{RowControlSizeContext as r}from"./chunk-3FININUU.js";import{jsx as e}from"react/jsx-runtime";function i({children:i,className:t=""}){/* @__PURE__ */
|
|
2
|
+
return e("div",{"data-list-toolbar":"",className:`flex min-h-(--row-height-window-bar) shrink-0 flex-wrap items-center gap-2 border-b border-line px-3 py-2 ${t}`.trim(),children:/* @__PURE__ */e(r.Provider,{value:"md",children:i})})}export{i as ListToolbar};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{SidebarLayout as e}from"./chunk-
|
|
1
|
+
import{SidebarLayout as e}from"./chunk-TMXMIRWG.js";import{Avatar as t}from"./chunk-SCNQK5NF.js";import{Input_default as a}from"./chunk-D7MRZZVV.js";import{Button_default as i}from"./chunk-A4ROXNUF.js";import{useState as s}from"react";import{jsx as n,jsxs as l}from"react/jsx-runtime";var r=[{id:1,name:"Priya Patel",last:"Sounds good — shipping it now",time:"9:41",status:"online"},{id:2,name:"Design team",last:"Marco: updated the tokens",time:"9:12",status:"away"},{id:3,name:"Tom Becker",last:"Thanks!",time:"Yest",status:"offline"},{id:4,name:"Sara Lind",last:"See you Friday 🎉",time:"Yest",status:"busy"}],m=[{mine:!1,text:"Hey! Did the latest build go out?"},{mine:!0,text:"Just merged — deploying now."},{mine:!1,text:"Nice. Any breaking changes for the portal?"},{mine:!0,text:"Nope, fully additive. New components only."},{mine:!1,text:"Sounds good — shipping it now"}];function d(){const[d,o]=s(1),c=r.find(e=>e.id===d)??r[0];/* @__PURE__ */
|
|
2
2
|
return n("div",{className:"h-full",children:/* @__PURE__ */n(e,{side:"left",defaultWidth:260,sidebar:/* @__PURE__ */n("div",{className:"h-full overflow-auto",children:r.map(e=>/* @__PURE__ */l("button",{onClick:()=>o(e.id),className:"flex w-full items-center gap-3 border-b border-gray-100 px-3 py-3 text-left hover:bg-gray-50 "+(e.id===d?"bg-blue-50/50":""),children:[
|
|
3
3
|
/* @__PURE__ */n(t,{name:e.name,status:e.status}),
|
|
4
4
|
/* @__PURE__ */l("div",{className:"min-w-0 flex-1",children:[
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{onOverlayOpen as t}from"./chunk-PGN5ME7B.js";import{createShellPortal as e}from"./chunk-5QRHQCRG.js";import{Z_LAYERS as r}from"./chunk-62LW225J.js";import{followAnchor as o,popupBounds as n,VIEWPORT_MARGIN as i,showingBox as a,placeBeside as l,placeArrow as c}from"./chunk-TAHHZGRH.js";import{useBrowserLayoutEffect as s}from"./chunk-PU2GJVMG.js";import{registerModalEscapeInterceptor as d,escapeSurfaceAbove as h}from"./chunk-TWVUQUUD.js";import{solidSurfaceStyle as u}from"./chunk-5FYDNH4Y.js";import{createContext as p,useContext as m,useState as f,useRef as x,useId as w,useEffect as g,isValidElement as b,cloneElement as v}from"react";import{jsxs as y,jsx as k}from"react/jsx-runtime";var H=p(!1),j=()=>m(H),T={top:"bottom-full left-1/2 -translate-x-1/2 mb-3",bottom:"top-full left-1/2 -translate-x-1/2 mt-3",left:"right-full top-1/2 -translate-y-1/2 mr-3",right:"left-full top-1/2 -translate-y-1/2 ml-3"};function W({content:p,side:m="top",delay:j=200,children:W,className:N="relative inline-flex",describe:M=!0,open:B}){const[G,R]=f(!1),C=(B??G)&&!(null==p||!1===p||""===p),[P,U]=f(null),z=x(void 0),D=x(null),E=x(null),Q=w(),$=x(!1),F=()=>{window.clearTimeout(z.current),$.current||D.current?.querySelector('[aria-haspopup][aria-expanded="true"]')||(z.current=window.setTimeout(()=>R(!0),j))},J=()=>{window.clearTimeout(z.current),R(!1)},L=t=>{t.currentTarget.contains(t.target)&&($.current=!0,J())},V=()=>{$.current=!1,J()};g(()=>()=>window.clearTimeout(z.current),[]),s(()=>{if(!C)return void U(null);const t=()=>{const t=D.current,e=E.current;if(!t||!e)return;const r=n(t),o=Math.max(0,r.right-r.left-2*i),s=Math.max(0,r.bottom-r.top-2*i);e.style.maxWidth=`${o}px`,e.style.maxHeight=`${s}px`;const d=e.getBoundingClientRect();if(d.width<=0||d.height<=0)return;const h=t.getBoundingClientRect();if(!a(t))return void J();const u=l(h,d,m,r,12),p=c(h,u,d,16,6),f={anchor:{left:h.left,top:h.top,width:h.width,height:h.height},left:u.left-h.left,top:u.top-h.top,maxWidth:o,maxHeight:s,side:u.side,arrow:p&&{left:p.x-h.left,top:p.y-h.top}};U(t=>{return t&&(r=f,(e=t).anchor.left===r.anchor.left&&e.anchor.top===r.anchor.top&&e.anchor.width===r.anchor.width&&e.anchor.height===r.anchor.height&&e.left===r.left&&e.top===r.top&&e.maxWidth===r.maxWidth&&e.maxHeight===r.maxHeight&&e.side===r.side&&e.arrow?.left===r.arrow?.left&&e.arrow?.top===r.arrow?.top)?t:f;var e,r})};return t(),o(()=>D.current,t)},[C,m,p]),g(()=>{if(!C)return;const e=d(t=>"Escape"===t.key&&(J(),!h(D.current))),r=t(J);return()=>{e(),r()}},[C]);const Y=C&&M?Q:void 0,q=b(W)?v(W,{"aria-describedby":[W.props["aria-describedby"],Y].filter(Boolean).join(" ")||void 0}):W,A=C?u():void 0;/* @__PURE__ */
|
|
2
|
+
return y("span",{ref:D,className:N,"aria-describedby":b(W)?void 0:Y,onMouseEnter:F,onMouseLeave:V,onFocus:t=>{if(!t.currentTarget.contains(t.target))return;let e=!0;try{e=t.target.matches(":focus-visible")}catch{}e&&F()},onBlur:V,onPointerDown:L,onClick:L,children:[
|
|
3
|
+
/* @__PURE__ */k(H.Provider,{value:!0,children:q}),C&&e(
|
|
4
|
+
/* @__PURE__ */y("span",{className:"pointer-events-none fixed left-0 top-0",style:{zIndex:r.hint,...P?.anchor},children:[
|
|
5
|
+
/* @__PURE__ */k("span",{ref:E,id:Q,role:"tooltip",className:`pointer-events-none absolute z-(--z-hint) box-border w-max overflow-hidden whitespace-normal break-words text-start rounded-md px-2 py-1 text-xs text-ink-strong ${P?"":T[m]}`,style:{...A,...P&&{left:P.left,top:P.top,maxWidth:P.maxWidth,maxHeight:P.maxHeight}},children:p}),(!P||P.arrow)&&
|
|
6
|
+
/* @__PURE__ */k("span",{"aria-hidden":"true",className:"rosh-tooltip-arrow","data-side":P?.side??m,style:{background:A?.background,"--rosh-tooltip-edge":A?.border,...P?.arrow&&{left:P.arrow.left,top:P.arrow.top}}})]}),document.body)]})}export{W as Tooltip,j as useInsideTooltip};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{formatMoney as e}from"./chunk-OJI4ROSD.js";import{EMPTY_VALUE as r}from"./chunk-36BRD5J3.js";import{TimeSeriesChart as t}from"./chunk-P5TSGXL4.js";import{ChartFrame as a}from"./chunk-A6TOHNJY.js";import{ColumnChart as l}from"./chunk-AQVPWUJ3.js";import{TH_ONE_LINE as s}from"./chunk-
|
|
1
|
+
import{formatMoney as e}from"./chunk-OJI4ROSD.js";import{EMPTY_VALUE as r}from"./chunk-36BRD5J3.js";import{TimeSeriesChart as t}from"./chunk-P5TSGXL4.js";import{ChartFrame as a}from"./chunk-A6TOHNJY.js";import{ColumnChart as l}from"./chunk-AQVPWUJ3.js";import{TH_ONE_LINE as s}from"./chunk-FAPZFMS3.js";import{jsxs as o,jsx as i}from"react/jsx-runtime";function n({spec:n,height:c=200,width:m,animate:d=!0,className:h}){const u=function(r){if(r.currency)return t=>e(t,r.currency);const t=r.unit?` ${r.unit}`:"";return e=>`${e.toLocaleString("en-US",{maximumFractionDigits:2})}${t}`}(n),p=n.currency?r=>e(r,n.currency,{whole:!0}):u,b=n.series.map((e,r)=>({key:`s${r}`,label:e.name,data:e.values})),y=n.title??n.series.map(e=>e.name).join(", "),f=/* @__PURE__ */o("table",{className:"w-full border-collapse text-sm",children:[
|
|
2
2
|
/* @__PURE__ */i("thead",{children:/* @__PURE__ */o("tr",{children:[
|
|
3
3
|
/* @__PURE__ */i("td",{className:"border-b border-gray-200"}),n.series.map((e,r)=>/* @__PURE__ */i("th",{scope:"col",className:`${s} border-b border-gray-200 px-2 py-1 text-right font-semibold text-gray-700`,children:e.name},r))]})}),
|
|
4
4
|
/* @__PURE__ */i("tbody",{children:n.x.map((e,t)=>/* @__PURE__ */o("tr",{children:[
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{inputClasses as r,PLACEHOLDER_INK as e}from"./chunk-AYZY3YNC.js";import{DropdownMenu as n}from"./chunk-NJY4HPNB.js";import{IconButton_default as t}from"./chunk-APFDZ2HG.js";import{Tooltip as i}from"./chunk-CIZAUBWA.js";import{useRowControlSize as a}from"./chunk-3FININUU.js";import{iconButtonClasses as s}from"./chunk-UQYNPYF4.js";import{forwardRef as o}from"react";import{jsx as l,jsxs as c}from"react/jsx-runtime";var m={sm:"sm",md:"sm",lg:"md",touch:"touch-sm"},p={sm:"pr-8",md:"pr-8",lg:"pr-10",touch:"pr-12"};function d({children:r}){/* @__PURE__ */
|
|
2
|
+
return l("span",{className:"absolute right-1 top-1/2 flex -translate-y-1/2 items-center gap-1",children:r})}function u({action:r,size:e="md"}){/* @__PURE__ */
|
|
3
|
+
return l(f,{action:r,size:m[e]})}var h=["","pr-8","pr-16"];function f({action:r,size:e}){const{label:a,icon:o,onClick:c,menu:m}=r;/* @__PURE__ */
|
|
4
|
+
return l(i,{content:a,describe:!1,children:m?/* @__PURE__ */l(n,{"aria-label":a,trigger:o,items:m,triggerClassName:s({size:e})}):/* @__PURE__ */l(t,{"aria-label":a,size:e,onClick:c,children:o})})}var N=o(function({invalid:n,leftIcon:t,rightAdornment:i,endAction:s,size:o,className:m="",readOnly:h,...f},N){const g=a(o),v=g??"md",j=`${t?"pl-10":""} ${s?p[v]:i?"pr-10":""}`.trim(),k=
|
|
5
|
+
/* @__PURE__ */l("input",{ref:N,"aria-invalid":n||void 0,readOnly:h,className:r({invalid:n,size:g,readOnly:h,className:[j,m].filter(Boolean).join(" ")}),...f});return t||i||s?/* @__PURE__ */c("div",{className:"relative",children:[t&&/* @__PURE__ */l("span",{className:`pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 ${e}`,children:t}),k,s?/* @__PURE__ */l(d,{children:/* @__PURE__ */l(u,{action:s,size:v})}):i&&/* @__PURE__ */l("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400",children:i})]}):k});export{h as END_ACTIONS_PAD,m as INPUT_END_ACTION_SIZE,u as InputEndActionButton,d as InputEndActionSlot,N as Input_default};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{useOverlayTarget as e,usePopupAnchor as i,usePopupLevel as r,usePopupLevelBindings as t,windowScrimStyle as o,OverlayLayerProvider as n,scrimHasCorners as l,popupLayerStyle as a}from"./chunk-CJ4OEY3T.js";import{CloseButton as d}from"./chunk-5QHNDAZ6.js";import{useDiscardGuard as s}from"./chunk-TEQ5ZPAL.js";import{dialogA11y as c}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as m}from"./chunk-DBQNYJZ6.js";import{useFocusTrap as p,useScrollLock as u}from"./chunk-DWGYC7OD.js";import{HEADING_TEXT as h,DESCRIPTION_TEXT as f,PANEL_SURFACE as b}from"./chunk-BWJZTHZ6.js";import{createShellPortal as v}from"./chunk-5QRHQCRG.js";import{useHydrated as y}from"./chunk-KEFNQEXZ.js";import{registerModalEscapeInterceptor as x}from"./chunk-TWVUQUUD.js";import{useRef as k,useId as N,useState as j,useEffect as w}from"react";import{jsxs as g,Fragment as C,jsx as Q}from"react/jsx-runtime";function Z({open:Z,onClose:D,side:E="bottom",title:H,description:W,footer:B,children:T,blocking:Y=!1,dirty:$=!1,initialFocus:A,"aria-label":G,"aria-labelledby":J,"aria-describedby":U,className:F=""}){const O=k(null),R=N(),V=N(),z=N(),I=e(y()),[K,L]=j(null),P=s({open:Z,dirty:$,onClose:D,title:H,layer:K}),X=k(null),q=i(Z&&null!==I,X),M=r(Z&&null!==I,X),S=t(M,K),_=o(M),ee=null!==M.host;if(m(Z),p(O,Z&&null!==I,A,S),u(Z),w(()=>{if(Z)return x(()=>!S.current?.(document.activeElement)&&(Y||P(),!0),()=>O.current)},[Z,Y,P,S]),!Z||!I)return null;const ie={maxHeight:"85vh",...q?(re=q,{left:re.left,width:re.width,bottom:window.innerHeight-(re.top+re.height)}):{}};var re;/* @__PURE__ */
|
|
2
|
+
return g(C,{children:[/* @__PURE__ */Q("span",{ref:X,hidden:!0,"data-popup-anchor":""}),v(
|
|
3
|
+
/* @__PURE__ */Q(n,{value:K,children:/* @__PURE__ */g("div",{ref:L,className:ee?"fixed inset-0 pointer-events-none":"fixed inset-0",style:a(M),role:"presentation","data-overlay-layer":"",children:[
|
|
4
|
+
/* @__PURE__ */Q("div",{className:"fixed bg-black/30 backdrop-blur-sm "+(ee?"pointer-events-auto"+(l(M)?" rounded-(--radius-window)":""):"inset-0"),style:_??void 0,hidden:ee&&!_,onClick:Y?void 0:P,"aria-hidden":"true","data-popup-scrim":ee?"window":"system"}),
|
|
5
|
+
/* @__PURE__ */g("div",{ref:O,...c({modal:!0,titleId:H?z:void 0,labelledBy:J,label:G}),"aria-describedby":U??(W?V:T?R:void 0),"data-drawer-side":E,"data-popup-panel":"",style:ie,className:[`fixed flex flex-col ${b}`,ee?"pointer-events-auto":"",q?"":"inset-x-0 bottom-0","rounded-t-xl",F].filter(Boolean).join(" "),children:[H?/* @__PURE__ */g("div",{className:"flex shrink-0 items-center justify-between gap-4 border-b border-gray-100 px-4 py-3",children:[
|
|
6
|
+
/* @__PURE__ */g("div",{className:"min-w-0",children:[
|
|
7
|
+
/* @__PURE__ */Q("h2",{id:z,className:h,children:H}),W&&/* @__PURE__ */Q("p",{id:V,className:`mt-0.5 ${f}`,children:W})]}),!Y&&/* @__PURE__ */Q(d,{onClose:P})]}):!Y&&/* @__PURE__ */Q("div",{className:"absolute right-2 top-2 z-10",children:/* @__PURE__ */Q(d,{onClose:P})}),
|
|
8
|
+
/* @__PURE__ */g("div",{id:R,className:"min-h-0 flex-1 overflow-y-auto px-4 py-4",children:[W&&!H&&/* @__PURE__ */Q("p",{id:V,className:`mb-3 ${f} ${Y?"":"pr-8"}`.trim(),children:W}),T]}),B&&/* @__PURE__ */Q("div",{className:"flex shrink-0 justify-end gap-3 border-t border-gray-100 px-4 py-3",children:B})]})]})}),I)]})}export{Z as Drawer};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{optionMatches as e,OptionSublabel as t}from"./chunk-K5YT5PMJ.js";import{inputClasses as r}from"./chunk-AYZY3YNC.js";import{GROUP_COLORS as n}from"./chunk-ABIWAS5K.js";import{Tooltip as o}from"./chunk-CIZAUBWA.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{createShellPortal as i}from"./chunk-5QRHQCRG.js";import{Z_LAYERS as a}from"./chunk-62LW225J.js";import{useDropdownPosition as s,POPUP_MAX_WIDTH as c,MENU_MAX_HEIGHT as u}from"./chunk-TAHHZGRH.js";import{glassStyle as d}from"./chunk-5FYDNH4Y.js";import{useShellStrings as m}from"./chunk-NRHG4R2Q.js";import{useState as h,useRef as p,useMemo as f,useEffect as g}from"react";import{jsxs as v,jsx as b,Fragment as x}from"react/jsx-runtime";var w={accent:{chip:"inline-flex max-w-full items-center gap-1 rounded bg-accent-tint px-2 py-0.5 text-xs font-medium text-blue-700",remove:"text-blue-400 hover:text-red-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"},danger:{chip:`inline-flex max-w-full items-center gap-1 rounded ${n.danger} px-2 py-0.5 text-xs font-medium`,remove:"text-current opacity-70 hover:opacity-100 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"}};function y({value:n,onChange:y,options:k=[],placeholder:D,allowFreeText:N=!1,invalid:j,disabled:A,id:C,className:H="",tone:L,tooltip:$,split:T,reorderable:W=!1}){const[E,I]=h(!1),[R,Y]=h(null),[M,B]=h(""),G=m(),K=p(null),S=p(null),F=p(null),Q=s(K,E),Z=e=>k.find(t=>t.value===e)?.label??e,J=f(()=>{const t=new Set(n),r=[],o=M.trim().toLowerCase();for(const n of k)t.has(n.value)||(t.add(n.value),o&&!e(n,o)||r.push(n));return r},[k,n,M]),P=e=>{const t=[...n];for(const r of e){const e=r.trim();if(!e)continue;const n=e.toLowerCase(),o=k.find(t=>t.value===e||t.label.toLowerCase()===n)?.value,l=o??(N?e:null);l&&!t.includes(l)&&t.push(l)}t.length!==n.length&&y(t)},U=e=>{e&&!n.includes(e)?(y([...n,e]),B("")):B("")},z=e=>y(n.filter(t=>t!==e)),O=W&&!A,q=(e,t)=>{if(e===t||t<0||t>=n.length)return;const r=[...n],[o]=r.splice(e,1);r.splice(t,0,o),y(r)},V=()=>{const e=M.trim();if(T&&e)return P(e.split(T)),void B("");N&&e?U(e):B("")},X=p(()=>{});X.current=()=>{V(),I(!1)},g(()=>{if(!E)return;const e=e=>{const t=e.target;K.current?.contains(t)||F.current?.contains(t)||(V(),I(!1))};document.addEventListener("mousedown",e);const t=l(()=>X.current());return()=>{document.removeEventListener("mousedown",e),t()}});const _=k.length>0;/* @__PURE__ */
|
|
2
|
+
return v("div",{ref:K,className:"relative",children:[
|
|
3
|
+
/* @__PURE__ */v("div",{onMouseDown:e=>{A||e.target.closest("button")||(e.preventDefault(),S.current?.focus())},className:r({invalid:j,multiline:!0,className:`flex flex-wrap items-center gap-1 cursor-text focus-within:border-blue-400 has-focus-visible:ring-2 has-focus-visible:ring-[color:var(--rosh-focus-ring)] ${A?"bg-gray-50 cursor-not-allowed":""} ${H}`}),children:[n.map((e,t)=>{const r=L?.(e),l=w[r??"accent"],i=O?{draggable:!0,tabIndex:0,"aria-label":G.select.reorderItem?.(Z(e),t+1,n.length)??Z(e),onDragStart:r=>{r.dataTransfer.effectAllowed="move",r.dataTransfer.setData("text/plain",e),Y(t)},onDragOver:e=>{null!=R&&e.preventDefault()},onDrop:e=>{null!=R&&(e.preventDefault(),q(R,t),Y(null))},onDragEnd:()=>Y(null),onKeyDown:e=>{e.target===e.currentTarget&&("ArrowLeft"===e.key||"ArrowUp"===e.key?t>0&&(e.preventDefault(),q(t,t-1)):"ArrowRight"!==e.key&&"ArrowDown"!==e.key||t<n.length-1&&(e.preventDefault(),q(t,t+1)))}}:{},a=/* @__PURE__ */v("span",{"data-tag-chip":"","data-tone":r,...i,className:`${l.chip}${O?" cursor-grab rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]":""}${R===t?" opacity-50":""}`,children:[
|
|
4
|
+
/* @__PURE__ */b("span",{className:"truncate",children:Z(e)}),!A&&/* @__PURE__ */b("button",{type:"button","aria-label":G.select.removeItem?.(Z(e))??`${G.select.remove} ${Z(e)}`,onClick:()=>z(e),className:l.remove,children:"×"})]},e),s=$?.(e);return null==s?a:/* @__PURE__ */b(o,{content:s,className:"relative inline-flex max-w-full",children:a},e)}),
|
|
5
|
+
/* @__PURE__ */b("input",{id:C,ref:S,type:"text",autoComplete:"off",role:"combobox","aria-expanded":E&&_,"aria-invalid":j||void 0,disabled:A,value:M,placeholder:0===n.length?D:void 0,onChange:e=>{(e=>{if(T){const t=e.split(T);if(t.length>1)return P(t.slice(0,-1)),void B(t[t.length-1])}B(e)})(e.target.value),I(!0)},onFocus:()=>{!A&&_&&I(!0)},onKeyDown:t=>{if("Enter"===t.key||","===t.key&&N){t.preventDefault();const r=M.trim(),n=r?J.filter(t=>e(t,r.toLowerCase())):[];1===n.length?U(n[0].value):V()}else"Backspace"===t.key&&""===M&&n.length>0?z(n[n.length-1]):"Escape"===t.key?(I(!1),B(""),S.current?.blur()):"Tab"===t.key&&(V(),I(!1))},className:"min-w-[8ch] flex-1 border-none bg-transparent p-0 text-sm text-ink-strong placeholder:text-[color:var(--ink-placeholder)] rosh-focus-ring focus-visible:ring-0 disabled:cursor-not-allowed"})]}),E&&_&&i(
|
|
6
|
+
/* @__PURE__ */b("div",{ref:F,className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:a.popup,left:Q?.left,right:Q?.right,top:Q?.top,bottom:Q?.bottom,minWidth:Q?.minWidth,maxWidth:Q?.maxWidth??c,width:"max-content",visibility:Q?void 0:"hidden",...d()},children:/* @__PURE__ */b("div",{className:"overflow-y-auto",style:{maxHeight:Q?.maxHeight??u},children:0===J.length?/* @__PURE__ */b("p",{className:"px-3 py-3 text-sm text-gray-400 text-center",children:k.length>0&&n.length>=k.length?G.select.allSelected:G.select.noMatches}):J.map(e=>/* @__PURE__ */b("button",{type:"button",onMouseDown:t=>{t.preventDefault(),U(e.value)},className:e.sublabel?"w-full text-left px-3 min-h-(--row-height-menu) py-2 text-sm hover:bg-row-hover text-ink whitespace-nowrap flex items-center justify-between gap-3":"w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm hover:bg-row-hover text-ink whitespace-nowrap",children:e.sublabel?/* @__PURE__ */v(x,{children:[
|
|
7
|
+
/* @__PURE__ */b("span",{className:"min-w-0 truncate",children:e.label}),
|
|
8
|
+
/* @__PURE__ */b(t,{grows:!0,children:e.sublabel})]}):e.label},e.value))})}),document.body)]})}export{y as TagInput};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Card as e}from"./chunk-RKSCB5BJ.js";import{Select_default as a}from"./chunk-
|
|
1
|
+
import{Card as e}from"./chunk-RKSCB5BJ.js";import{Select_default as a}from"./chunk-C4TG6XS4.js";import{Pagination as r}from"./chunk-Q2RNFBYS.js";import{Input_default as t}from"./chunk-D7MRZZVV.js";import{StatusBadgeProvider as i,StatusBadge as s}from"./chunk-ABIWAS5K.js";import{Button_default as l}from"./chunk-A4ROXNUF.js";import{Icon as c}from"./chunk-ISVODSRP.js";import{TH_ONE_LINE as m}from"./chunk-FAPZFMS3.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
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"}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{TYPE_SCALE as t,FONT_WEIGHTS as o}from"./chunk-LH7IKIGE.js";import{textWidth as n}from"./chunk-UVCMV2TL.js";import{SPACING_ROLES as e,SPACING_SCALE as m}from"./chunk-SH7PJC4P.js";import{statusLabel as r}from"./chunk-
|
|
1
|
+
import{TYPE_SCALE as t,FONT_WEIGHTS as o}from"./chunk-LH7IKIGE.js";import{textWidth as n}from"./chunk-UVCMV2TL.js";import{SPACING_ROLES as e,SPACING_SCALE as m}from"./chunk-SH7PJC4P.js";import{statusLabel as r}from"./chunk-ABIWAS5K.js";var c=e.controlX,u=m[4],i=t[2],d=o.control,f=.625*i,h=m[1];function p(t){const o="undefined"!=typeof document&&document.body?getComputedStyle(document.body).fontFamily:"";return o?n(t,`${d} ${i}px ${o}`)??t.length*f:t.length*f}function a(t){const o=Object.entries(t).map(([t,o])=>!0===o?r(t):o),n=Math.max(0,...o.map(p)),e=Math.ceil((n+2*c+2*u)/h)*h;return{defaultWidth:e,minWidth:e}}export{c as BADGE_X,u as CELL_X,a as statusColumn};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{railLabelsShown as e}from"./chunk-FQEALPZJ.js";import{ChoiceContent as t,choiceItemClass as n,choiceTipClass as r,choiceTrackClass as o}from"./chunk-EFKJLUYP.js";import{Tooltip as l}from"./chunk-
|
|
2
|
-
return s("nav",{ref:v,"aria-label":m,"aria-labelledby":g,className:b(c,u),children:e.map(e=>{const o=e.id===n,a=/* @__PURE__ */s("a",{href:e.disabled?void 0:e.href,"aria-current":o?"location":void 0,"aria-disabled":e.disabled||void 0,onClick:e.disabled?void 0:t=>((e,t)=>{const n=h(t.href);n&&(e=>!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))(e)&&(e.preventDefault(),y(t.id),n.scrollIntoView({block:"start",behavior:"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"}),n.hasAttribute("tabindex")||n.setAttribute("tabindex","-1"),n.focus({preventScroll:!0}))})(t,e),className:`${f(o,c,"warning"===e.tone?"warning":"default")}${e.disabled?" cursor-not-allowed opacity-50":""}`,children:/* @__PURE__ */s(t,{icon:e.icon,label:e.label})},e.id);return null!=e.tooltip&&!1!==e.tooltip?/* @__PURE__ */s(l,{content:e.tooltip,className:c?r(c):void 0,children:a},e.id):a})})}var v=(e,t)=>`${e}-tab-${t}`,y=(e,t)=>`${e}-panel-${t}`;function w(e,t){const n=getComputedStyle(e),r=(parseFloat(n.paddingLeft)||0)+(parseFloat(n.paddingRight)||0)+(parseFloat(n.borderLeftWidth)||0)+(parseFloat(n.borderRightWidth)||0),o=(parseFloat(n.columnGap)||0)*Math.max(0,t-1),l=e.parentElement;let a=1/0;if(l){const e=getComputedStyle(l);a=l.clientWidth-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)}return{chrome:r+o,room:a}}function x(e){return e.items.some(e=>null!=e.href)?/* @__PURE__ */s(g,{...e}):/* @__PURE__ */s(k,{...e})}function k({items:h,value:p,onChange:g,variant:x="underline",block:k=!1,idPrefix:F,className:E="","aria-label":
|
|
3
|
-
return s("div",{ref:S,role:"tablist","data-labels-shown":
|
|
1
|
+
import{railLabelsShown as e}from"./chunk-FQEALPZJ.js";import{ChoiceContent as t,choiceItemClass as n,choiceTipClass as r,choiceTrackClass as o}from"./chunk-EFKJLUYP.js";import{Tooltip as l}from"./chunk-CIZAUBWA.js";import{useBrowserLayoutEffect as a}from"./chunk-PU2GJVMG.js";import{useRef as i,useState as c,useEffect as d}from"react";import{jsx as s,jsxs as u,Fragment as m}from"react/jsx-runtime";var b=(e,t)=>`flex items-center border-b border-gray-200${e?"":" gap-1"} ${t}`.trim();function f(e,t,n="default"){return`-mb-px inline-flex items-center gap-2 border-b-2 px-3 py-2 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${t?"flex-1 justify-center ":""}${e?"border-blue-600 text-blue-600":`border-transparent ${"warning"===n?"text-amber-700":"text-gray-900"} hover:border-gray-300`}`}function h(e){if(!e||!e.startsWith("#")||e.length<2)return null;try{return document.getElementById(decodeURIComponent(e.slice(1)))}catch{return null}}function p(e,t){const n=e.filter(e=>!e.disabled).map(e=>({id:e.id,section:h(e.href)})).filter(e=>null!=e.section);if(0===n.length)return null;const r=function(e){for(let t=e.parentElement;t;t=t.parentElement){const e=getComputedStyle(t).overflowY;if(("auto"===e||"scroll"===e)&&t.scrollHeight>t.clientHeight)return t}return document.scrollingElement??document.documentElement}(n[0].section);if(r.scrollTop>0&&r.scrollTop+r.clientHeight>=r.scrollHeight-1)return n[n.length-1].id;const o=Math.max(0,t.getBoundingClientRect().bottom)+8;let l=n[0].id;for(const e of n)e.section.getBoundingClientRect().top<=o&&(l=e.id);return l}function g({items:e,value:n,onChange:o,block:c=!1,className:u="","aria-label":m,"aria-labelledby":g}){const v=i(null),y=function(e,t,n,r){const o=i(0),l=i({items:t,value:n,onChange:r});l.current={items:t,value:n,onChange:r};const c=i(()=>{});return c.current=()=>{const t=e.current;if(!t||Date.now()<o.current)return;const n=p(l.current.items,t);null!=n&&n!==l.current.value&&l.current.onChange(n)},a(()=>{c.current()},[t]),d(()=>{let e=0;const t=()=>{e||(e=requestAnimationFrame(()=>{e=0,c.current()}))};return document.addEventListener("scroll",t,{capture:!0,passive:!0}),window.addEventListener("resize",t),()=>{document.removeEventListener("scroll",t,{capture:!0}),window.removeEventListener("resize",t),e&&cancelAnimationFrame(e)}},[]),e=>{o.current=Date.now()+800,e!==l.current.value&&l.current.onChange(e),window.setTimeout(()=>c.current(),850)}}(v,e,n,o);/* @__PURE__ */
|
|
2
|
+
return s("nav",{ref:v,"aria-label":m,"aria-labelledby":g,className:b(c,u),children:e.map(e=>{const o=e.id===n,a=/* @__PURE__ */s("a",{href:e.disabled?void 0:e.href,"aria-current":o?"location":void 0,"aria-disabled":e.disabled||void 0,onClick:e.disabled?void 0:t=>((e,t)=>{const n=h(t.href);n&&(e=>!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))(e)&&(e.preventDefault(),y(t.id),n.scrollIntoView({block:"start",behavior:"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"}),n.hasAttribute("tabindex")||n.setAttribute("tabindex","-1"),n.focus({preventScroll:!0}))})(t,e),className:`${f(o,c,"warning"===e.tone?"warning":"default")}${e.disabled?" cursor-not-allowed opacity-50":""}`,children:/* @__PURE__ */s(t,{icon:e.icon,label:e.label})},e.id);return null!=e.tooltip&&!1!==e.tooltip?/* @__PURE__ */s(l,{content:e.tooltip,className:c?r(c):void 0,children:a},e.id):a})})}var v=(e,t)=>`${e}-tab-${t}`,y=(e,t)=>`${e}-panel-${t}`;function w(e,t){const n=getComputedStyle(e),r=(parseFloat(n.paddingLeft)||0)+(parseFloat(n.paddingRight)||0)+(parseFloat(n.borderLeftWidth)||0)+(parseFloat(n.borderRightWidth)||0),o=(parseFloat(n.columnGap)||0)*Math.max(0,t-1),l=e.parentElement;let a=1/0;if(l){const e=getComputedStyle(l);a=l.clientWidth-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)}return{chrome:r+o,room:a}}function x(e){return e.items.some(e=>null!=e.href)?/* @__PURE__ */s(g,{...e}):/* @__PURE__ */s(k,{...e})}function k({items:h,value:p,onChange:g,variant:x="underline",block:k=!1,idPrefix:F,className:E="","aria-label":A,"aria-labelledby":L,labelsFit:N=!1,dotLabel:R="Has a setting"}){const $=i([]),S=i(null),W="pill"===x,[M,j]=c(null),z=M??"none",D=i(()=>{});D.current=()=>{const t=S.current;if(!t||!N)return;const n=function(e){return[...e.querySelectorAll('[role="tab"]')].map(e=>{const t=getComputedStyle(e),n=(parseFloat(t.paddingLeft)||0)+(parseFloat(t.paddingRight)||0)+(parseFloat(t.borderLeftWidth)||0)+(parseFloat(t.borderRightWidth)||0),r=e.querySelector("[data-tab-glyph]")?.getBoundingClientRect().width??0,o=e.querySelector("[data-tab-word]")?.scrollWidth??0;return{bare:n+r,worded:n+r+(r&&o?8:0)+o,active:"true"===e.getAttribute("aria-selected")}})}(t);j(function({tabs:t,block:n,chrome:r,room:o}){if(!n)return e({buttons:t,orientation:"horizontal",chrome:r,room:o});if(0===t.length)return"none";const l=e=>r+e*t.length<=o+.5;if(l(Math.max(...t.map(e=>e.worded))))return"all";const a=t.find(e=>e.active);return a&&l(Math.max(a.worded,...t.map(e=>e.bare)))?"chosen":"none"}({tabs:n,block:k,...w(t,n.length)}))},a(()=>{D.current()}),d(()=>{const e=S.current?.parentElement;if(!N||!e)return;let t=!0;const n=()=>{t&&D.current()},r="undefined"==typeof ResizeObserver?void 0:ResizeObserver,o=r?new r(n):null;return o?.observe(e),document.fonts?.ready.then(n,()=>{}),()=>{t=!1,o?.disconnect()}},[N]);const H=(e,t)=>{for(let n=1;n<=h.length;n+=1){const r=((e+t*n)%h.length+h.length)%h.length;if(!h[r]?.disabled)return r}return null},I=e=>{const t=1===e?h.map((e,t)=>t):h.map((e,t)=>h.length-1-t);for(const e of t)if(!h[e]?.disabled)return e;return null};/* @__PURE__ */
|
|
3
|
+
return s("div",{ref:S,role:"tablist","data-labels-shown":N?z:void 0,"aria-label":A,"aria-labelledby":L,onKeyDown:e=>{const t=h.findIndex(e=>e.id===p);let n=null;if("ArrowRight"===e.key||"ArrowDown"===e.key)n=H(t,1);else if("ArrowLeft"===e.key||"ArrowUp"===e.key)n=H(t,-1);else if("Home"===e.key)n=I(1);else{if("End"!==e.key)return;n=I(-1)}e.preventDefault(),null!==n&&n!==t&&(g(h[n].id),$.current[n]?.focus())},className:W?o(k,E):b(k,E),children:h.map((e,o)=>{const a=e.id===p,i=N&&null!=e.icon,c="all"===z||"chosen"===z&&a,d=e.dot?/* @__PURE__ */s(C,{label:e.label,on:a,said:R}):e.label,b=/* @__PURE__ */s("button",{ref:e=>{$.current[o]=e},type:"button",role:"tab",id:F?v(F,e.id):void 0,"aria-controls":F?y(F,e.id):void 0,"aria-selected":a,tabIndex:a?0:-1,disabled:e.disabled,onClick:()=>g(e.id),className:W?n({selected:a,disabled:e.disabled,block:k}):f(a,k,"warning"===e.tone?"warning":"default"),children:i?/* @__PURE__ */u(m,{children:[
|
|
4
4
|
/* @__PURE__ */s("span",{"aria-hidden":"true","data-tab-glyph":"",className:"inline-flex shrink-0",children:e.icon}),
|
|
5
|
-
/* @__PURE__ */s("span",{"data-tab-word":c?"shown":"hidden",className:c?"whitespace-nowrap":"sr-only",children:d})]}):/* @__PURE__ */s(t,{icon:e.icon,label:d})},e.id),h=i?e.tooltip??e.label:e.tooltip;return null!=h&&!1!==h?/* @__PURE__ */s(l,{content:h,className:
|
|
5
|
+
/* @__PURE__ */s("span",{"data-tab-word":c?"shown":"hidden",className:c?"whitespace-nowrap":"sr-only",children:d})]}):/* @__PURE__ */s(t,{icon:e.icon,label:d})},e.id),h=i?e.tooltip??e.label:e.tooltip;return null!=h&&!1!==h?/* @__PURE__ */s(l,{content:h,className:W||k?r(k):void 0,children:b},e.id):b})})}function C({label:e,on:t,said:n}){/* @__PURE__ */
|
|
6
6
|
return u("span",{className:"inline-flex items-center gap-(--space-4)",children:[e,
|
|
7
7
|
/* @__PURE__ */s("span",{"aria-hidden":"true","data-tab-dot":t?"on":"off",className:"size-2 shrink-0 rounded-full "+(t?"bg-current":"bg-accent-fill")}),
|
|
8
8
|
/* @__PURE__ */s("span",{className:"sr-only",children:n})]})}export{x as Tabs,v as tabButtonId,y as tabPanelId};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{ColoredBadge as e}from"./chunk-
|
|
1
|
+
import{ColoredBadge as e}from"./chunk-L2WQOJ3T.js";import{Button_default as n}from"./chunk-A4ROXNUF.js";import{useShellStrings as i}from"./chunk-NRHG4R2Q.js";import{useId as t}from"react";import{jsx as m,jsxs as a}from"react/jsx-runtime";function s({items:s,heading:l,emptyText:r,className:c=""}){const o=i().media,d=t();return s.length?/* @__PURE__ */a("div",{className:c||void 0,children:[
|
|
2
2
|
/* @__PURE__ */m("p",{id:d,className:"text-xs font-medium text-ink-faint",children:l??o.usedIn(s.length)}),
|
|
3
3
|
/* @__PURE__ */m("ul",{"aria-labelledby":d,className:"mt-2 flex flex-col gap-1",children:s.map(i=>/* @__PURE__ */a("li",{className:"flex min-w-0 items-center gap-2 text-sm",children:[null!=i.kind&&/* @__PURE__ */m(e,{size:"xs",className:"flex-none",children:i.kind}),i.onOpen?/* @__PURE__ */m(n,{variant:"link",size:"sm",onClick:i.onOpen,className:"min-w-0 text-left",children:i.name}):/* @__PURE__ */m("span",{className:"min-w-0 break-words text-ink",children:i.name})]},i.key))})]}):/* @__PURE__ */m("p",{className:`text-sm text-ink-faint ${c}`.trim(),children:r??o.notUsed})}export{s as MediaUsedInList};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useInsideTooltip as e,Tooltip as n}from"./chunk-
|
|
1
|
+
import{useInsideTooltip as e,Tooltip as n}from"./chunk-CIZAUBWA.js";import{useRef as r,useState as t}from"react";import{jsx as c}from"react/jsx-runtime";var i="whitespace-nowrap";function l({children:i}){const l=e(),o=r(null),[a,s]=t(!1),m=/* @__PURE__ */c("span",{ref:o,className:"min-w-0 truncate",onMouseEnter:()=>{const e=o.current;s(!!e&&e.scrollWidth>e.clientWidth+1)},children:i});return l?m:/* @__PURE__ */c(n,{content:a?i:null,describe:!1,className:"relative inline-flex min-w-0 max-w-full",children:m})}export{l as OneLineLabel,i as TH_ONE_LINE};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import{AccessibleTable as e}from"./chunk-RTZFWH5U.js";import{polygonPoints as t}from"./chunk-VFC6QUEN.js";import{ChartDefs as r,maskId as l}from"./chunk-465RRWBY.js";import{useHighlight as a}from"./chunk-CNYAHYE6.js";import{angleScale as o}from"./chunk-2JWPNR2U.js";import{ChartTooltip as n}from"./chunk-WDQI3FV6.js";import{CHART_INK as i,resolveSeriesColorWithin as s}from"./chunk-TZFACUMR.js";import{useShellStrings as m,useShellLocale as c}from"./chunk-NRHG4R2Q.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{useId as p,useState as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";var k=3,g=e=>`${e.map(([e,t],r)=>`${0===r?"M":"L"}${e.toFixed(2)},${t.toFixed(2)}`).join(" ")} Z`;function x({axes:k,series:x,size:y=300,mode:b="area",grid:v="polygon",rings:M=4,formatValue:N,animate:j=!0,className:W,emptyLabel:$}){const F=m().charts,R=c(),C=N??(e=>h(e,R)),w=$??F.nothingToCompare,A=p(),[H,L]=u(null),{highlighted:Q}=a(),T=x;if(k.length<3||0===T.length)/* @__PURE__ */
|
|
2
|
+
return d("p",{className:`text-sm text-gray-500 ${W??""}`,children:w});const U=y/2,z=y/2,E=y/2-46,V=o(k.length),Y=k.map((e,t)=>null!=e.max&&Number.isFinite(e.max)&&e.max>0?e.max:Math.max(1,...T.map(e=>e.values[t]??0).filter(Number.isFinite))),Z=(e,t)=>{const r=Math.max(0,Math.min(1,t/Y[e])),l=V.center(e)-V.step/2;return[U+E*r*Math.cos(l),z+E*r*Math.sin(l)]},B=(e,t)=>null!==H?H!==e:null!==Q&&Q!==t,O=null!==H?T[H]:void 0;/* @__PURE__ */
|
|
3
|
+
return f("div",{className:`relative ${W??""}`,children:[
|
|
4
|
+
/* @__PURE__ */f("svg",{width:"100%",height:y,viewBox:`0 0 ${y} ${y}`,role:"img","aria-labelledby":A,onMouseLeave:()=>L(null),children:[
|
|
5
|
+
/* @__PURE__ */d("title",{id:A,children:F.acrossMeasures(T.map(e=>e.label),k.length)}),Array.from({length:M},(e,r)=>{const l=E*(r+1)/M;return"circle"===v?/* @__PURE__ */d("circle",{cx:U,cy:z,r:l,fill:"none",stroke:i.grid,strokeWidth:1},r):/* @__PURE__ */d("path",{d:g(t(U,z,l,k.length)),fill:"none",stroke:i.grid,strokeWidth:1},r)}),k.map((e,t)=>{const[r,l]=Z(t,Y[t]);/* @__PURE__ */
|
|
6
|
+
return f("g",{children:[
|
|
7
|
+
/* @__PURE__ */d("line",{x1:U,y1:z,x2:r,y2:l,stroke:i.grid,strokeWidth:1}),
|
|
8
|
+
/* @__PURE__ */d("text",{x:U+(E+18)*Math.cos(V.center(t)-V.step/2),y:z+(E+18)*Math.sin(V.center(t)-V.step/2)+4,textAnchor:"middle",fontSize:11,fill:i.label,children:e.label})]},e.key)}),
|
|
9
|
+
/* @__PURE__ */d(r,{id:A,reveal:!!j&&"center-out"}),T.map((e,t)=>{const r=s(t,3,e.color,e.tone),a=k.map((t,r)=>Z(r,e.values[r]??0));/* @__PURE__ */
|
|
10
|
+
return f("g",{opacity:B(t,e.key)?.3:1,onMouseEnter:()=>L(t),mask:j?`url(#${l(A)})`:void 0,children:["area"===b&&/* @__PURE__ */d("path",{d:g(a),fill:r,fillOpacity:.18,stroke:"none"}),
|
|
11
|
+
/* @__PURE__ */d("path",{d:g(a),fill:"none",stroke:r,strokeWidth:2,strokeLinejoin:"round"}),a.map(([e,t],l)=>/* @__PURE__ */d("circle",{cx:e,cy:t,r:3.5,fill:r,stroke:i.surface,strokeWidth:1.5},l))]},e.key)})]}),O&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:O.label,rows:k.map((e,t)=>({key:e.key,label:e.label,color:s(H,3,O.color,O.tone),value:C(O.values[t]??0)}))})}),
|
|
12
|
+
/* @__PURE__ */d("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:T.map((e,t)=>/* @__PURE__ */f("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
|
|
13
|
+
/* @__PURE__ */d("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:s(t,3,e.color,e.tone)}}),
|
|
14
|
+
/* @__PURE__ */d("span",{className:"flex-1 truncate",children:e.label})]},e.key))}),
|
|
15
|
+
/* @__PURE__ */d(e,{caption:F.acrossMeasures(T.map(e=>e.label),k.length),head:[F.tableSeries,...k.map(e=>e.label)],rows:T.map(e=>[e.label,...k.map((t,r)=>C(e.values[r]??0))])})]})}export{k as RADAR_SERIES_CAP,x as RadarChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{DropdownMenu as e}from"./chunk-
|
|
1
|
+
import{DropdownMenu as e}from"./chunk-NJY4HPNB.js";import{Fragment as t}from"react";import{jsxs as a,jsx as r,Fragment as n}from"react/jsx-runtime";var i="relative inline-flex items-center gap-2 px-4 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-40",s="bg-blue-50 text-blue-600",l="text-gray-600 hover:bg-gray-50 hover:text-gray-900";function c(){/* @__PURE__ */
|
|
2
2
|
return r("span",{className:"my-3 w-px shrink-0 bg-gray-200","aria-hidden":!0})}function m({item:e,active:t,caret:i}){/* @__PURE__ */
|
|
3
3
|
return a(n,{children:[e.icon&&/* @__PURE__ */r("span",{className:"h-4 w-4 shrink-0",children:e.icon}),
|
|
4
4
|
/* @__PURE__ */r("span",{className:"whitespace-nowrap",children:e.label}),null!=e.badge&&/* @__PURE__ */r("span",{className:"ml-0.5 inline-flex min-w-[1.25rem] items-center justify-center rounded-full bg-gray-100 px-2 text-2xs font-semibold leading-5 text-gray-600",children:e.badge}),i&&/* @__PURE__ */r("span",{className:"-ml-1 text-xs","aria-hidden":!0,children:"▾"}),t&&/* @__PURE__ */r("span",{className:"absolute inset-x-2 -bottom-px h-0.5 rounded-full bg-blue-600","aria-hidden":!0})]})}function d({items:n,activeKey:d,onSelect:o,brand:u,actions:b,linkAs:h,className:g}){/* @__PURE__ */
|