efficient-shell 13.25.0 → 14.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -4
- package/dist/{Browser-W2WVSAEN.js → Browser-L2NP7DLM.js} +14 -14
- package/dist/Calculator-7CY2CRGB.js +29 -0
- package/dist/{CurrencyConverter-VH4UVYLO.js → CurrencyConverter-FXWM3DBQ.js} +9 -9
- package/dist/{Files-6QZFFGSH.js → Files-5S6UFGST.js} +82 -82
- package/dist/{Notepad-YU4HIJD2.js → Notepad-HC46LWV5.js} +8 -8
- package/dist/PomodoroTimer-RPGWT26T.js +91 -0
- package/dist/{Preview-H7N2MMAI.js → Preview-L6FJXBAE.js} +37 -37
- package/dist/Sidebar-2TYZENQL.js +44 -0
- package/dist/{Stock-YL732PKW.js → Stock-TUPZORQN.js} +4 -4
- package/dist/{Weather-3CBRXNNM.js → Weather-URCO6JML.js} +23 -23
- package/dist/{WorldClock-LONNWCRG.js → WorldClock-EBBUWG5L.js} +6 -6
- package/dist/ai/index.js +92 -92
- 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-XVMCSUAV.js → chunk-22SVN2ZM.js} +1 -1
- package/dist/{chunk-ZDFMYAQB.js → chunk-24BF22NF.js} +1 -1
- package/dist/{chunk-JIJZBM25.js → chunk-2RLWGWOU.js} +13 -13
- package/dist/{chunk-VP2IQJUD.js → chunk-2SOGTOUQ.js} +4 -4
- package/dist/{chunk-4VFEPP2W.js → chunk-2XDO7FZC.js} +13 -13
- package/dist/{chunk-SLEA47VA.js → chunk-3L7BEEBW.js} +1 -1
- package/dist/{chunk-GZRNOIEE.js → chunk-3ZJAQSFS.js} +3 -3
- package/dist/{chunk-BQQEQCSK.js → chunk-47BGAQWD.js} +1 -1
- package/dist/{chunk-7AVPMO4F.js → chunk-4BRVZAIW.js} +1 -1
- package/dist/chunk-4DNPUG3T.js +7 -0
- package/dist/chunk-5F3HPOBH.js +1 -0
- package/dist/{chunk-VKZC3NPM.js → chunk-5O4HMXPQ.js} +2 -2
- package/dist/{chunk-JLSXDYS4.js → chunk-5SQHRDFC.js} +2 -2
- package/dist/{chunk-LQIHBIXG.js → chunk-6AYAB5FN.js} +5 -5
- package/dist/{chunk-VGUB7LPF.js → chunk-6IP4Q3AT.js} +52 -52
- package/dist/{chunk-527WMFTR.js → chunk-6RU2PGQK.js} +1 -1
- package/dist/{chunk-UVPDEGIA.js → chunk-6X32SWQI.js} +1 -1
- package/dist/{chunk-A5FC4LR7.js → chunk-7D2QZ6JA.js} +1 -1
- package/dist/{chunk-2YHS5E27.js → chunk-7OVMWXFM.js} +1 -1
- package/dist/{chunk-LC2UF3AA.js → chunk-7WF6LFOJ.js} +1 -1
- package/dist/{chunk-IJG4UEKF.js → chunk-A3VLZZHJ.js} +8 -8
- package/dist/{chunk-LG6NDTHZ.js → chunk-AH5MLH54.js} +1 -1
- package/dist/chunk-AJPQJ7TC.js +6 -0
- package/dist/{chunk-TNALBYLY.js → chunk-ALZHFQRX.js} +1 -1
- package/dist/{chunk-S5MTTJ3F.js → chunk-AZZ4NO2D.js} +12 -12
- package/dist/{chunk-P4VOUPRF.js → chunk-CHDGSJLV.js} +6 -6
- package/dist/{chunk-VY6OQRZA.js → chunk-CJ4OEY3T.js} +1 -1
- package/dist/{chunk-Q36KB5RQ.js → chunk-CXEELIRW.js} +11 -11
- package/dist/{chunk-MZ3JADHG.js → chunk-DBBOD5QW.js} +1 -1
- package/dist/chunk-DBQNYJZ6.js +1 -0
- package/dist/{chunk-65BW43PF.js → chunk-DNPAYNNU.js} +1 -1
- package/dist/{chunk-TTRLYWP4.js → chunk-DO6P6LYU.js} +1 -1
- package/dist/chunk-DOJSWVBX.js +6 -0
- package/dist/chunk-DTFX624I.js +8 -0
- package/dist/chunk-E57C7NBA.js +2 -0
- package/dist/{chunk-D5PXRJHA.js → chunk-EBODRYXS.js} +14 -14
- package/dist/{chunk-YDJ5IZOU.js → chunk-EDRELF6L.js} +1 -1
- package/dist/{chunk-M3HTP2N6.js → chunk-EHNW3UNC.js} +6 -6
- package/dist/{chunk-AH2NEKEN.js → chunk-EHSK43WG.js} +8 -8
- package/dist/{chunk-VMAIZU5S.js → chunk-EN3GYSCE.js} +1 -1
- package/dist/{chunk-TTYTOLVV.js → chunk-EOYKUV2U.js} +1 -1
- package/dist/chunk-FFPIT2LB.js +3 -0
- package/dist/{chunk-TD3ZQD5R.js → chunk-G3TC2GIA.js} +1 -1
- package/dist/{chunk-AAJSE5HA.js → chunk-GTBOJ5Q5.js} +1 -1
- package/dist/{chunk-UQV4TSWB.js → chunk-GTZML3V3.js} +1 -1
- package/dist/{chunk-JYR4V4AG.js → chunk-GUUBFQ6L.js} +2 -2
- package/dist/{chunk-K42FXX7J.js → chunk-GVAVIYE6.js} +1 -1
- package/dist/{chunk-2Y4AH7NC.js → chunk-GY7MJTIZ.js} +1 -1
- package/dist/{chunk-XYXCZIJY.js → chunk-HAEZUUDT.js} +3 -3
- package/dist/{chunk-J5W63XNR.js → chunk-HTBACICQ.js} +6 -6
- package/dist/{chunk-5URXJCNC.js → chunk-HX5QSQ2C.js} +1 -1
- package/dist/{chunk-VLBLDSA6.js → chunk-I7WAOKU2.js} +2 -2
- package/dist/{chunk-LLDGRPLF.js → chunk-ION3XGLN.js} +1 -1
- package/dist/{chunk-EXDSYFHB.js → chunk-ISWTJBOA.js} +1 -1
- package/dist/{chunk-BUFAJJDZ.js → chunk-IVEM2BPC.js} +1 -1
- package/dist/{chunk-D4432YRW.js → chunk-IZ6D4KGR.js} +1 -1
- package/dist/{chunk-KC2EQCBE.js → chunk-JPVD3VS7.js} +6 -6
- package/dist/{chunk-C7Z3ZMJH.js → chunk-KE7P74XM.js} +13 -13
- package/dist/chunk-KEFNQEXZ.js +1 -0
- package/dist/{chunk-DUEEAP4Y.js → chunk-LPL7BWGG.js} +1 -1
- package/dist/{chunk-JVENCUUG.js → chunk-LRMDLZMM.js} +4 -4
- package/dist/chunk-M5IZ7QLQ.js +7 -0
- package/dist/{chunk-MCLVTQSF.js → chunk-MEDOESQD.js} +8 -8
- package/dist/chunk-MEP6CZJ3.js +2 -0
- package/dist/{chunk-ZYKY4Z7R.js → chunk-MKHOXO5O.js} +1 -1
- package/dist/chunk-MNZAAQLH.js +15 -0
- package/dist/{chunk-DTRJLQWO.js → chunk-MPC3CHAO.js} +1 -1
- package/dist/{chunk-7PAZO65L.js → chunk-MXRF5YVN.js} +5 -5
- package/dist/{chunk-NWS5G7FE.js → chunk-MYH5H43C.js} +1 -1
- package/dist/{chunk-5OHFBS2B.js → chunk-NC5FIFAY.js} +1 -1
- package/dist/chunk-NDCS4COQ.js +11 -0
- package/dist/{chunk-IJ4JX6WP.js → chunk-NHALP3MW.js} +4 -4
- package/dist/{chunk-R5WBDXI2.js → chunk-OYQWBJ37.js} +1 -1
- package/dist/{chunk-77N3REYY.js → chunk-P2HZ2V3U.js} +2 -2
- package/dist/{chunk-UU42O5ON.js → chunk-P3XXFQG5.js} +1 -1
- package/dist/{chunk-YBE66FBR.js → chunk-P5J7G7OV.js} +1 -1
- package/dist/{chunk-4L5YRMJ4.js → chunk-PEA5Y6DD.js} +9 -9
- package/dist/{chunk-DPFEQQQU.js → chunk-POBVGDZP.js} +1 -1
- package/dist/{chunk-RFWBNKKB.js → chunk-PPHGBEJA.js} +10 -10
- package/dist/{chunk-IMH5H47S.js → chunk-PTLVNC3V.js} +6 -6
- package/dist/chunk-PU2GJVMG.js +1 -0
- package/dist/{chunk-TJG76Y7I.js → chunk-PWERFHOU.js} +9 -9
- package/dist/{chunk-ZFWCTHR4.js → chunk-PWON7O3N.js} +6 -6
- package/dist/{chunk-6MFKKTCE.js → chunk-Q7FPGOUY.js} +24 -24
- package/dist/{chunk-M4REKOGO.js → chunk-QCLKRFL4.js} +5 -5
- package/dist/{chunk-N4LMFGRI.js → chunk-R36VZ35L.js} +6 -6
- package/dist/{chunk-CCZHSISF.js → chunk-REFPTKRD.js} +2 -2
- package/dist/{chunk-THAPVKEJ.js → chunk-RTK77DMP.js} +11 -11
- package/dist/{chunk-PWOVSR7N.js → chunk-RXCBSQA2.js} +2 -2
- package/dist/{chunk-JDLJ7DHV.js → chunk-S4RFJTGR.js} +1 -1
- package/dist/{chunk-D5HFWOW7.js → chunk-SP4S4HUJ.js} +16 -16
- package/dist/{chunk-P73ZJ6QR.js → chunk-T46I4YOI.js} +1 -1
- package/dist/{chunk-VY3UA6AR.js → chunk-TAHHZGRH.js} +1 -1
- package/dist/{chunk-FBZUEZK7.js → chunk-TTD2M6RF.js} +1 -1
- package/dist/{chunk-RB3BMRNA.js → chunk-U75MSD4F.js} +1 -1
- package/dist/{chunk-XC2GUCTG.js → chunk-UGA5NGW4.js} +1 -1
- package/dist/chunk-VUBDHFG5.js +4 -0
- package/dist/{chunk-K4KUGKWP.js → chunk-W4IH3BE3.js} +21 -21
- package/dist/{chunk-B5KX7PDG.js → chunk-W6REY3SV.js} +3 -3
- package/dist/{chunk-WZWSFYXJ.js → chunk-WBUAO7T7.js} +1 -1
- package/dist/{chunk-P6H2B635.js → chunk-WNFZYTWW.js} +9 -9
- package/dist/{chunk-HPKQYUQT.js → chunk-WYAKASF3.js} +1 -1
- package/dist/{chunk-C5OPAULN.js → chunk-XGEN76DG.js} +1 -1
- package/dist/{chunk-ZKILZFUI.js → chunk-XIX72C7K.js} +1 -1
- package/dist/{chunk-3AUN7JSM.js → chunk-XJK6VNXV.js} +1 -1
- package/dist/{chunk-26KHYLJN.js → chunk-XLPUIGMO.js} +1 -1
- package/dist/{chunk-VQBKRBBR.js → chunk-XNKNX5L3.js} +1 -1
- package/dist/chunk-Y2M5PP2C.js +28 -0
- package/dist/{chunk-66NJCU4W.js → chunk-Y5RTVKMB.js} +8 -8
- package/dist/{chunk-JXJNQHPY.js → chunk-Y5YVKUM4.js} +19 -19
- package/dist/{chunk-5CHJA4RL.js → chunk-Y6FULJWJ.js} +7 -7
- package/dist/chunk-Y7D2CZ4H.js +13 -0
- package/dist/chunk-YTLUSBDY.js +14 -0
- package/dist/{chunk-2YUAR2EH.js → chunk-YX3JD6PA.js} +5 -5
- package/dist/{chunk-3WUVYXCF.js → chunk-ZA6ANC2D.js} +5 -5
- package/dist/{chunk-5ZOYYL46.js → chunk-ZEGCKIAL.js} +3 -3
- package/dist/chunk-ZSVU44OB.js +6 -0
- package/dist/data/DataTable.js +1 -1
- package/dist/data/EntityList.js +1 -1
- package/dist/data/Gantt.js +1 -1
- package/dist/data/Kanban.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/ResizableTable.js +1 -1
- package/dist/data/statusColumn.js +1 -1
- package/dist/data/useColumnConfig.js +1 -1
- package/dist/data/useSort.js +1 -1
- package/dist/format/index.js +1 -1
- package/dist/forms/AlignmentGrid.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Button.js +1 -1
- package/dist/forms/Calendar.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DatePicker.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/IconButton.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/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/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/forms/dropdownPosition.js +1 -1
- package/dist/hooks/index.d.ts +15 -14
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/useTheme.d.ts +1 -1
- package/dist/hooks/useTheme.js +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +43 -2
- package/dist/index.js +125 -125
- package/dist/map/index.js +5 -5
- package/dist/markdown/index.js +1 -1
- package/dist/page-tabs/index.js +5 -5
- package/dist/routine-index.json +1 -0
- 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/Kbd.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/MilestoneTimeline.js +1 -1
- package/dist/shell/Popover.js +1 -1
- package/dist/shell/PopupMenu.js +1 -1
- package/dist/shell/ProductionTimeline.js +1 -1
- package/dist/shell/ResizeHandle.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SettingRow.js +1 -1
- package/dist/shell/ShellPrefs.js +1 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/SidebarNav.js +1 -1
- package/dist/shell/SortableList.js +1 -1
- package/dist/shell/StatusBadge.js +1 -1
- package/dist/shell/Tabs.js +1 -1
- package/dist/shell/TimelineTrack.js +1 -1
- package/dist/shell/Tooltip.js +1 -1
- package/dist/shell/TopNav.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/discardGuard.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/AuthScreen.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DashboardTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/ErrorBoundary.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/tokens/colour.d.ts +2 -2
- package/dist/ui/index.js +1 -1
- package/dist/value-index.json +1 -0
- package/dist/version.js +1 -1
- package/package.json +4 -3
- package/dist/Calculator-PKAM5ERT.js +0 -29
- package/dist/PomodoroTimer-PBSAKRX5.js +0 -91
- package/dist/Sidebar-HAIHWIJD.js +0 -44
- package/dist/chunk-2AEYVQ2R.js +0 -2
- package/dist/chunk-3GJVTK4H.js +0 -11
- package/dist/chunk-3TD3GH53.js +0 -7
- package/dist/chunk-44ERJYNW.js +0 -6
- package/dist/chunk-AAFPAQXH.js +0 -13
- package/dist/chunk-EX3DARI3.js +0 -7
- package/dist/chunk-F2RAIGCG.js +0 -6
- package/dist/chunk-FLQXMCB3.js +0 -8
- package/dist/chunk-N6PMH6DU.js +0 -6
- package/dist/chunk-O5ZBRG2G.js +0 -1
- package/dist/chunk-PP3WUT2G.js +0 -15
- package/dist/chunk-PWX64YBI.js +0 -28
- package/dist/chunk-RJVIKGHJ.js +0 -4
- package/dist/chunk-SRI2D23Y.js +0 -14
- package/dist/chunk-UTISUEO4.js +0 -2
- package/dist/chunk-UVHXVSB2.js +0 -1
- package/dist/chunk-WCCS4VFE.js +0 -1
- package/dist/chunk-ZDXRSY2Y.js +0 -1
- package/dist/chunk-ZISKHQZY.js +0 -3
- /package/dist/{chunk-4BYJABCX.js → chunk-5YTZBYG4.js} +0 -0
|
@@ -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-MPC3CHAO.js";import{useFileIntake as d,FileIntakeAlert as c}from"./chunk-TNGIXSTM.js";import{ColoredBadge as u}from"./chunk-6X32SWQI.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-AJPQJ7TC.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:C,dropType:K,onDropData:A,label:I,hint:S,error:O,required:P,className:F,accept:z="image/*",maxSizeBytes:L,maxFiles:M,fit:R="cover",thumbSize:$=96,placeholder:E,cta:H,acceptHint:Q,showCover:W=!1,coverLabel:B,busy:q=!1,busyLabel:G,progress:J,disabled:X=!1,readOnly:U=!1,selected:V,onItemClick:Y,onItemDoubleClick:Z,onItemContextMenu:_,menuOnMedia:ee=!1}){const te=h().media,re=H??te.cta,ae=B??te.cover,ne=G??te.uploading,le=g(),[ie,oe]=b(null),se=X||q,de=!(!k&&!N||se||U),ce=!!w&&!se&&!U,ue=!!j&&!se&&!U,me=!!T&&!X&&!ue,pe=!(!K||!A||se||U),fe=t(se),he=E??r(z,te),ge=d({accept:z,maxSizeBytes:L,maxFiles:M,acceptHint:Q,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(K),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(K);t&&A(t)}},Ne=ge.dragOver||be,we=()=>{de&&(k?k():ge.open())},je={width:$,height:$},Te=null==V?null:new Set(V),Ce=!!Y,Ke=$<112,Ae=(e,t)=>{const r=e.kind?"video"===e.kind:i(e.url,z),a=e.name??o(e.url),n=W&&(e.cover??0===t);/* @__PURE__ */
|
|
2
|
+
return v("div",{...Ce?{"data-grid-item":"","data-grid-id":e.id,role:"option"}:{},...ee?{[m]:""}:{},"aria-selected":Te?Te.has(e.id):void 0,onClick:Ce?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);C?.("start",e.id,t.currentTarget)}:void 0,onDragEnd:ue?()=>oe(null):me&&e.dragData&&C?t=>C("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||Ce?0:void 0,"aria-label":ue?te.reorder(a,t+1,p.length):Ce?a:void 0,onKeyDown:Ce&&!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":"",Ce?"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:R}}):/* @__PURE__ */x("img",{src:e.url,alt:a,className:"h-full w-full",style:{objectFit:R}}),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:Ke?
|
|
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})]}),Se=de?/* @__PURE__ */v("button",{type:"button",onClick:()=>we(),"aria-label":"string"==typeof he?he:te.upload,className:n(Ne,!1,fe),style:{minHeight:$+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(Ae)}):p.map(Ae),Ie]}),
|
|
10
|
+
/* @__PURE__ */x("span",{className:"text-sm font-medium text-blue-600",children:re}),Q&&/* @__PURE__ */x("span",{className:"text-xs text-ink-faintest",children:Q})]}):/* @__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:$+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:S,error:O,required:P,className:F,children:[
|
|
12
|
+
/* @__PURE__ */v("div",{id:le,role:"group","aria-labelledby":I?`${le}-label`:void 0,"aria-describedby":O?`${le}-error`:S?`${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?Se:/* @__PURE__ */v("div",{className:"flex flex-wrap gap-2",children:[Ce?
|
|
13
|
+
/* @__PURE__ */x("div",{role:"listbox","aria-multiselectable":!!Te||void 0,"aria-label":"string"==typeof I?I:te.files,className:"contents",children:p.map(Ae)}):p.map(Ae),Ie]}),q&&/* @__PURE__ */x(l,{label:ne,progress:J})]}),!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,31 +1,31 @@
|
|
|
1
|
-
import{useCopyText as e,CopyGlyph as n}from"./chunk-TJ5YMXVB.js";import{ItemCount as t}from"./chunk-
|
|
1
|
+
import{useCopyText as e,CopyGlyph as n}from"./chunk-TJ5YMXVB.js";import{ItemCount as t}from"./chunk-7WF6LFOJ.js";import{PopupMenu as r,PopupMenuItem as i,PopupMenuDivider as l}from"./chunk-RTK77DMP.js";import{Icon as o}from"./chunk-ISVODSRP.js";import{useShellStrings as a}from"./chunk-NRHG4R2Q.js";import{useState as s,useMemo as d,useEffect as c,useRef as u,Fragment as m,useLayoutEffect as f}from"react";import{jsxs as p,jsx as y,Fragment as g}from"react/jsx-runtime";function h(e){const n=[];let t=0;for(;t<e.length;){const r=e[t].group;let i=t;for(;void 0!==r&&i+1<e.length&&e[i+1].group===r;)i++;n.push(i>t?{group:r,start:t,end:i}:{start:t,end:t}),t=i+1}return n}function k(e,n){return e.find(e=>n>=e.start&&n<=e.end)}function b(e,n,t,r){const i=e.findIndex(e=>e.key===n.key);let l=e.findIndex(e=>e.key===t);if(i<0||l<0)return null;const o=h(e),a=k(o,i),s="group"===n.kind&&void 0!==a.group?e.slice(a.start,a.end+1).map(e=>e.key):[n.key];if(s.includes(t))return null;const d=k(o,l);if("tab"===n.kind&&void 0!==a.group){if(d!==a)return null}else void 0!==d.group&&(l="before"===r?d.start:d.end);return{key:e[l].key,side:r,moving:s}}function x(e,n,t,r){const i=b(e,n,t,r);if(!i)return null;const l=e.map(e=>e.key).filter(e=>!i.moving.includes(e)),o=l.indexOf(i.key)+("after"===i.side?1:0),a=[...l.slice(0,o),...i.moving,...l.slice(o)];return a.every((n,t)=>n===e[t].key)?null:a}var v="flex-[0_100_15rem] [contain-intrinsic-inline-size:15rem]",N=v,w="outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-500",$="pointer-events-none absolute bottom-0 size-2 [background:inherit]";function C(){/* @__PURE__ */
|
|
2
2
|
return p(g,{children:[
|
|
3
|
-
/* @__PURE__ */y("span",{"aria-hidden":"true",className:`${
|
|
4
|
-
/* @__PURE__ */y("span",{"aria-hidden":"true",className:`${
|
|
3
|
+
/* @__PURE__ */y("span",{"aria-hidden":"true",className:`${$} -left-2 [mask-image:radial-gradient(circle_at_0_0,transparent_0.5rem,#000_calc(0.5rem+0.5px))]`}),
|
|
4
|
+
/* @__PURE__ */y("span",{"aria-hidden":"true",className:`${$} -right-2 [mask-image:radial-gradient(circle_at_100%_0,transparent_0.5rem,#000_calc(0.5rem+0.5px))]`})]})}function z(){/* @__PURE__ */
|
|
5
5
|
return y(o,{name:"close",look:"mini","aria-hidden":"true",className:"size-3.5"})}function I({text:t,label:r,copiedLabel:i}){const{copied:l,copy:o}=e(t);/* @__PURE__ */
|
|
6
|
-
return y("button",{type:"button",tabIndex:-1,"aria-label":l?i:r,title:l?i:r,onClick:o,className:"flex size-5 shrink-0 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 @max-[10rem]:hidden",children:/* @__PURE__ */y(n,{copied:l,className:"size-3.5"})})}function _({node:e}){const n=u(null);return f(()=>{const t=n.current;if(t)return t.appendChild(e),()=>{e.parentNode===t&&t.removeChild(e)}},[e]),/* @__PURE__ */y("span",{ref:n,className:"ml-1 flex shrink-0 items-center"})}function j({tabs:e,activeKey:n,idFor:f,panelMounted:k,onActivate
|
|
6
|
+
return y("button",{type:"button",tabIndex:-1,"aria-label":l?i:r,title:l?i:r,onClick:o,className:"flex size-5 shrink-0 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 @max-[10rem]:hidden",children:/* @__PURE__ */y(n,{copied:l,className:"size-3.5"})})}function _({node:e}){const n=u(null);return f(()=>{const t=n.current;if(t)return t.appendChild(e),()=>{e.parentNode===t&&t.removeChild(e)}},[e]),/* @__PURE__ */y("span",{ref:n,className:"ml-1 flex shrink-0 items-center"})}function j({tabs:e,activeKey:n,idFor:f,panelMounted:k,onActivate:$,onClose:j,onCloseMany:D,label:T,className:M,activeClassName:R,end:A,afterPinned:B,onIconMenu:E,menuItems:O,sizing:K="even",tall:G=!1,onReorder:L,groupInfo:S}){const F=a().pageTabs,P=a().count,[V,W]=s(null),X=G?"h-[34px]":"h-8",H=d(()=>e.map(e=>({key:e.key,group:S?e.group:void 0})),[e,S]),J=d(()=>h(H),[H]),Y=d(()=>{const t=e.findIndex(e=>e.key===n);return J.find(e=>void 0!==e.group&&t>=e.start&&t<=e.end)?.group},[J,e,n]),[Q,q]=s(()=>Y??null),U=t=>{const r=J.find(e=>e.group===t);if(!r)return;const i=e.findIndex(e=>e.key===n),l=i>=r.start&&i<=r.end;if(Q!==t)l||$(e[r.start].key),q(t);else{if(l){const n=e[r.end+1]??e[r.start-1];n&&$(n.key)}q(null)}};c(()=>{void 0!==Y&&q(Y)},[n]);const Z=d(()=>{const n=[];for(const t of J)for(let r=t.start;r<=t.end;r++)void 0!==t.group&&t.group!==Q||n.push(e[r]);return n},[J,Q,e]),ee=u(null),[ne,te]=s(null),re=(n,t)=>L?{draggable:!0,onDragStart:t=>{ee.current=n,t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",e.find(e=>e.key===n.key)?.title??"")},onDragOver:e=>{const r=ee.current;if(!r)return;const i=e.currentTarget.getBoundingClientRect(),l=t!==n.key||"tab"===n.kind?e.clientX<i.left+i.width/2?"before":"after":"before",o=x(H,r,t,l)?b(H,r,t,l):null;if(!o)return void(ne&&te(null));e.preventDefault(),e.dataTransfer.dropEffect="move";const a=e=>H.find(n=>n.key===e)?.group,s="tab"===r.kind&&void 0!==a(r.key)&&a(r.key)===a(o.key);ne?.key===o.key&&ne.side===o.side&&ne.inGroup===s||te({key:o.key,side:o.side,inGroup:s})},onDrop:e=>{const n=ee.current;if(!n||!ne)return;e.preventDefault();const t=x(H,n,ne.key,ne.side);ee.current=null,te(null),t&&L(t)},onDragEnd:()=>{ee.current=null,te(null)}}:{},ie=d(()=>new Set(J.filter(e=>void 0!==e.group&&S).map(n=>e[n.start].key)),[J,e,S]),le=e=>"pointer-events-none absolute inset-y-1 z-[3] w-0.5 rounded-full bg-blue-500 "+("before"===e?"-left-px":"-right-px"),oe=e=>ne?.key===e&&!("before"===ne.side&&ie.has(e)&&!ne.inGroup)&&/* @__PURE__ */y("span",{"aria-hidden":"true",className:le(ne.side)}),ae=e.length;c(()=>{if(!n)return;const e=document.getElementById(f(n,"tab"));e?.scrollIntoView?.({block:"nearest",inline:"nearest"})},[f,n,ae]);const se=B?Z.findIndex(e=>!e.pinned):-1,de=Z.some(e=>e.key===n)?n:Z[0]?.key,ce=e=>{const n=Z[(e+Z.length)%Z.length];n&&document.getElementById(f(n.key,"tab"))?.focus()},ue=(e,n)=>{const t=Z[e+n];if(!L||!t)return;const r=x(H,{kind:"tab",key:Z[e].key},t.key,n<0?"before":"after");r&&(L(r),setTimeout(()=>document.getElementById(f(Z[e].key,"tab"))?.focus(),0))},me=V?e.find(e=>e.key===V.key):void 0,fe=me&&O?O(me.key):[],pe=me?e.indexOf(me):-1,ye=e=>e.some(e=>!e.pinned),ge=e=>()=>{W(null),e()},he=(e,t)=>!!t&&e.key!==n&&t.key!==n,ke=(e,t)=>{const r=e.key===n,i=e.pinned?"auto":r?"active-full"===K?"15rem":e.copy||E&&e.icon?"minmax(4.25rem,20rem)":"minmax(4.25rem,15rem)":"minmax(4rem,15rem)";return he(e,t)?["auto",i]:[i]},be=(e,t)=>{const r=e.key===n,i=!!e.dirty,l=e.icon,a=r?R??"z-[1] border-transparent bg-gray-50 text-gray-900":"border-transparent text-gray-600 hover:bg-gray-200/70 hover:text-gray-900",s=he(e,t),d={type:"button",role:"tab",id:f(e.key,"tab"),"aria-selected":r,"aria-controls":k?.(e.key)?f(e.key,"panel"):void 0,tabIndex:e.key===de?0:-1,title:e.title,onClick:()=>$(e.key)},c={onContextMenu:n=>((e,n)=>{e.preventDefault(),W({x:e.clientX,y:e.clientY,key:n.key})})(n,e),onAuxClick:n=>((e,n)=>{1!==e.button||n.pinned||(e.preventDefault(),j(n.key))})(n,e),onMouseDown:e=>{1===e.button&&e.preventDefault()}},u=l&&
|
|
7
7
|
/* @__PURE__ */p("span",{className:"relative flex size-4 shrink-0 items-center justify-center text-gray-500 [&>svg]:size-4","aria-hidden":"true",children:[l,i&&!r&&!e.pinned&&
|
|
8
|
-
/* @__PURE__ */y("span",{className:"absolute -right-1 -top-1 hidden size-2 rounded-full bg-gray-500 ring-2 ring-gray-100 @max-[6.5rem]:block @max-[6.5rem]:group-hover:hidden"})]}),g=r&&!!
|
|
8
|
+
/* @__PURE__ */y("span",{className:"absolute -right-1 -top-1 hidden size-2 rounded-full bg-gray-500 ring-2 ring-gray-100 @max-[6.5rem]:block @max-[6.5rem]:group-hover:hidden"})]}),g=r&&!!E&&!!l;return e.pinned?/* @__PURE__ */p("div",{role:"presentation",className:`group relative flex flex-none items-center justify-center rounded-t-lg border border-b-0 transition-colors ${X} ${l?"w-10":""} ${a}`,...c,...re({kind:"tab",key:e.key},e.key),children:[oe(e.key),r&&/* @__PURE__ */y(C,{}),
|
|
9
9
|
/* @__PURE__ */p("button",{...d,className:`flex h-full items-center justify-center rounded-t-lg ${l?"w-full":"px-3"} ${w}`,children:[u,
|
|
10
10
|
/* @__PURE__ */y("span",{className:l?"sr-only":"whitespace-nowrap text-sm",children:e.title})]})]},e.key):/* @__PURE__ */p(m,{children:[s&&/* @__PURE__ */y("span",{"aria-hidden":"true",className:"mb-3 h-4 w-px shrink-0 self-end border-l border-gray-300"}),
|
|
11
|
-
/* @__PURE__ */p("div",{role:"presentation",className:`group relative flex items-center rounded-t-lg border border-b-0 text-sm transition-colors ${X} ${"active-full"===
|
|
12
|
-
/* @__PURE__ */y("button",{type:"button",tabIndex:-1,"aria-haspopup":"menu","aria-label":
|
|
11
|
+
/* @__PURE__ */p("div",{role:"presentation",className:`group relative flex items-center rounded-t-lg border border-b-0 text-sm transition-colors ${X} ${"active-full"===K&&r?"":"@container"} ${"active-full"===K?r?"flex-[0_0_15rem] min-w-0":N:r&&(e.copy||g)?"flex-[0_100_20rem]":v} ${r?"active-full"===K?"":"min-w-[4.25rem]":"min-w-[4rem]"} ${a}`,...c,...re({kind:"tab",key:e.key},e.key),children:[oe(e.key),r&&/* @__PURE__ */y(C,{}),g&&
|
|
12
|
+
/* @__PURE__ */y("button",{type:"button",tabIndex:-1,"aria-haspopup":"menu","aria-label":F.tabMenu,title:F.tabMenu,onClick:n=>{const t=n.currentTarget.getBoundingClientRect();E?.(e.key,t.left,t.bottom+4)},className:`ml-2 flex size-6 shrink-0 items-center justify-center rounded hover:bg-gray-200 @max-[5rem]:ml-2 ${w}`,children:u}),
|
|
13
13
|
/* @__PURE__ */p("button",{...d,className:`flex h-full min-w-0 flex-1 items-center gap-2 rounded-t-lg pr-1 text-left ${g?"pl-2":"pl-3"} ${w} ${r?g?"":"@max-[5rem]:pl-3":"@max-[6.5rem]:pr-3 @max-[4.5rem]:justify-center @max-[4.5rem]:px-0 @max-[4.5rem]:group-hover:pl-2 @max-[4.5rem]:group-hover:pr-3"}`,children:[!g&&u,
|
|
14
|
-
/* @__PURE__ */p("span",{className:`min-w-0 flex-1 overflow-hidden whitespace-nowrap [mask-image:linear-gradient(to_right,#000_calc(100%-1rem),transparent)] ${"active-full"===
|
|
15
|
-
/* @__PURE__ */y("span",{role:"img","aria-label":
|
|
16
|
-
/* @__PURE__ */p("span",{className:"mr-2 flex size-5 shrink-0 items-center justify-center "+(r?"":"@max-[6.5rem]:hidden @max-[6.5rem]:group-hover:flex"),children:[i&&/* @__PURE__ */y("span",{role:"img","aria-label":
|
|
17
|
-
/* @__PURE__ */y("button",{type:"button",tabIndex:-1,"aria-label":
|
|
14
|
+
/* @__PURE__ */p("span",{className:`min-w-0 flex-1 overflow-hidden whitespace-nowrap [mask-image:linear-gradient(to_right,#000_calc(100%-1rem),transparent)] ${"active-full"===K&&r?"pr-4":""} ${l?r?"@max-[5rem]:sr-only":"@max-[4.5rem]:sr-only":""}`,children:[e.title,e.favorite&&
|
|
15
|
+
/* @__PURE__ */y("span",{role:"img","aria-label":F.favorite,title:F.favorite,className:"ml-1 inline-flex align-[-0.125em] text-yellow-500",children:/* @__PURE__ */y(o,{name:"star","aria-hidden":"true",className:"size-3.5",fill:"currentColor",strokeWidth:1.5})})]})]}),r&&e.actions&&/* @__PURE__ */y(_,{node:e.actions}),r&&e.copy&&/* @__PURE__ */y(I,{text:e.copy,label:F.copy(e.copy),copiedLabel:F.copied}),
|
|
16
|
+
/* @__PURE__ */p("span",{className:"mr-2 flex size-5 shrink-0 items-center justify-center "+(r?"":"@max-[6.5rem]:hidden @max-[6.5rem]:group-hover:flex"),children:[i&&/* @__PURE__ */y("span",{role:"img","aria-label":F.unsaved,className:"size-2 rounded-full bg-gray-500 group-hover:hidden"}),
|
|
17
|
+
/* @__PURE__ */y("button",{type:"button",tabIndex:-1,"aria-label":F.closeTab?.(e.title)??`${F.close} ${e.title}`,onClick:()=>j(e.key),className:"size-5 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 "+(i?"hidden group-hover:flex":r?"flex":"flex opacity-0 group-hover:opacity-100 focus-visible:opacity-100"),children:/* @__PURE__ */y(z,{})})]})]})]},e.key)},xe=[];let ve,Ne=0,we=!B;for(const r of J){const i=Z.filter(n=>{const t=e.indexOf(n);return t>=r.start&&t<=r.end});if(we||Ne!==se||(we=!0,xe.push(/* @__PURE__ */y(m,{children:B},"rosh-after-pinned")),ve=void 0),Ne+=i.length,void 0===r.group||!S){for(const e of i)xe.push(be(e,ve)),ve=e;continue}ve=void 0;const l=r.group,a=S(l),s=r.end-r.start+1,d=Q===l,c=e[r.start].key,u=i.some(e=>e.key===n)?"shrink":"shrink-[100]",f=["auto",...i.flatMap((e,n)=>ke(e,n>0?i[n-1]:void 0))];xe.push(
|
|
18
18
|
/* @__PURE__ */p("div",{role:"group","aria-label":a.label,"data-tab-group":l,className:`relative mx-1 grid grid-flow-col items-end first:ml-0 ${u}`,style:{gridTemplateColumns:f.join(" ")},children:[
|
|
19
|
-
/* @__PURE__ */p("button",{type:"button",tabIndex:-1,"aria-expanded":d,title:
|
|
19
|
+
/* @__PURE__ */p("button",{type:"button",tabIndex:-1,"aria-expanded":d,title:F.groupToggle(a.label,s),onClick:()=>U(l),...re({kind:"group",key:c},c),className:`relative mb-1 mr-1 flex h-6 shrink-0 items-center gap-1 rounded-full bg-blue-100 px-2 text-xs font-medium text-blue-700 hover:bg-blue-200 ${w}`,children:[
|
|
20
20
|
/* @__PURE__ */y(o,{name:d?"chevron-right":"chevron-down","aria-hidden":"true",className:"size-3",strokeWidth:2}),a.icon&&/* @__PURE__ */y("span",{className:"flex size-3.5 items-center justify-center [&>svg]:size-3.5","aria-hidden":"true",children:a.icon}),
|
|
21
21
|
/* @__PURE__ */y("span",{className:d?"sr-only":"max-w-[12rem] truncate",children:a.label}),
|
|
22
|
-
/* @__PURE__ */y(t,{count:s,label:
|
|
23
|
-
/* @__PURE__ */y("span",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 z-0 h-0.5 bg-blue-500"})]},`rosh-group-${c}`))}return we||xe.push(/* @__PURE__ */y(m,{children:
|
|
22
|
+
/* @__PURE__ */y(t,{count:s,label:P.tabs(s),active:!0})]}),ne?.key===c&&"before"===ne.side&&!ne.inGroup&&/* @__PURE__ */y("span",{"aria-hidden":"true",className:le("before")}),i.map((e,n)=>be(e,n>0?i[n-1]:void 0)),
|
|
23
|
+
/* @__PURE__ */y("span",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 z-0 h-0.5 bg-blue-500"})]},`rosh-group-${c}`))}return we||xe.push(/* @__PURE__ */y(m,{children:B},"rosh-after-pinned")),/* @__PURE__ */p("div",{className:M??"relative flex h-10 shrink-0 items-end gap-3 bg-gray-100 px-3",children:[
|
|
24
24
|
/* @__PURE__ */y("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 h-px bg-gray-200"}),
|
|
25
|
-
/* @__PURE__ */y("div",{role:"tablist","aria-label":T,onKeyDown:e=>{const n=Z.findIndex(n=>document.getElementById(f(n.key,"tab"))===e.target);if(n<0)return;const t=e.shiftKey&&(e.ctrlKey||e.metaKey);if(t&&"ArrowRight"===e.key)ue(n,1);else if(t&&"ArrowLeft"===e.key)ue(n,-1);else if("ArrowRight"===e.key)ce(n+1);else if("ArrowLeft"===e.key)ce(n-1);else if("Home"===e.key)ce(0);else if("End"===e.key)ce(Z.length-1);else{if("Delete"!==e.key||Z[n].pinned)return;j(Z[n].key)}e.preventDefault()},className:"flex min-w-0 flex-1 items-end -mx-2 px-2 scroll-px-2 overflow-x-auto overflow-y-hidden [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:xe}),
|
|
25
|
+
/* @__PURE__ */y("div",{role:"tablist","aria-label":T,onKeyDown:e=>{const n=Z.findIndex(n=>document.getElementById(f(n.key,"tab"))===e.target);if(n<0)return;const t=e.shiftKey&&(e.ctrlKey||e.metaKey);if(t&&"ArrowRight"===e.key)ue(n,1);else if(t&&"ArrowLeft"===e.key)ue(n,-1);else if("ArrowRight"===e.key)ce(n+1);else if("ArrowLeft"===e.key)ce(n-1);else if("Home"===e.key)ce(0);else if("End"===e.key)ce(Z.length-1);else{if("Delete"!==e.key||Z[n].pinned)return;j(Z[n].key)}e.preventDefault()},className:"flex min-w-0 flex-1 items-end -mx-2 px-2 scroll-px-2 overflow-x-auto overflow-y-hidden [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:xe}),A&&/* @__PURE__ */y("div",{className:"flex shrink-0 items-center gap-2 self-center",children:A}),V&&me&&/* @__PURE__ */p(r,{portal:!0,style:{left:V.x,top:V.y},onClose:()=>W(null),children:[fe.length>0&&/* @__PURE__ */p(g,{children:[fe.map((e,n)=>/* @__PURE__ */p(i,{onClick:ge(e.onSelect),children:[e.icon,e.label]},n)),
|
|
26
26
|
/* @__PURE__ */y(l,{})]}),
|
|
27
|
-
/* @__PURE__ */y(i,{disabled:me.pinned,onClick:ge(()=>j(me.key)),children:
|
|
27
|
+
/* @__PURE__ */y(i,{disabled:me.pinned,onClick:ge(()=>j(me.key)),children:F.close}),
|
|
28
28
|
/* @__PURE__ */y(l,{}),
|
|
29
|
-
/* @__PURE__ */y(i,{disabled:!ye(e.filter(e=>e.key!==me.key)),onClick:ge(()=>D("others",me.key)),children:
|
|
30
|
-
/* @__PURE__ */y(i,{disabled:!ye(e.slice(pe+1)),onClick:ge(()=>D("right",me.key)),children:
|
|
31
|
-
/* @__PURE__ */y(i,{disabled:!ye(e),onClick:ge(()=>D("all",null)),children:
|
|
29
|
+
/* @__PURE__ */y(i,{disabled:!ye(e.filter(e=>e.key!==me.key)),onClick:ge(()=>D("others",me.key)),children:F.closeOthers}),
|
|
30
|
+
/* @__PURE__ */y(i,{disabled:!ye(e.slice(pe+1)),onClick:ge(()=>D("right",me.key)),children:F.closeRight}),
|
|
31
|
+
/* @__PURE__ */y(i,{disabled:!ye(e),onClick:ge(()=>D("all",null)),children:F.closeAll})]})]})}export{j as TabStrip};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{ImageFocusPoint as e}from"./chunk-CUJ537IY.js";import{FormField as i}from"./chunk-6KBDNYRW.js";import{Segmented as a}from"./chunk-
|
|
1
|
+
import{ImageFocusPoint as e}from"./chunk-CUJ537IY.js";import{FormField as i}from"./chunk-6KBDNYRW.js";import{Segmented as a}from"./chunk-ALZHFQRX.js";import{isVideoUrl as t,mediaPromptLine as r,mediaFileName as o,FilenameBadge as n,BusyOverlay as s,UploadGlyph as l,zoneFocusClass as c,dropzoneClass as d}from"./chunk-MPC3CHAO.js";import{TransferProgress as u}from"./chunk-ION3XGLN.js";import{useFileIntake as m,FileIntakeAlert as h}from"./chunk-TNGIXSTM.js";import{Icon as p}from"./chunk-ISVODSRP.js";import{useShellStrings as b}from"./chunk-NRHG4R2Q.js";import{useState as f,useRef as g,useEffect as v,useId as y}from"react";import{jsxs as k,jsx as x,Fragment as N}from"react/jsx-runtime";var j=["flex h-8 items-center justify-center rounded-(--radius-control) text-(--status-on-solid)","not-disabled:hover:bg-white/10 disabled:cursor-not-allowed disabled:opacity-60","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]"].join(" ");function w({value:w,onChange:L,onPick:R,onFile:C,label:$,hint:F,error:U,required:z,className:O,accept:P="image/*",maxSizeBytes:H,fit:I="cover",height:S,shape:q="rect",placeholder:A,cta:B,acceptHint:G,showFilename:X=!0,allowReplace:D=!0,allowRemove:K=!0,replaceLabel:M,removeLabel:Q,busy:T=!1,busyLabel:V,choosingLabel:W,pickFailedLabel:Y,progress:_,disabled:J=!1,kind:Z,onKindChange:E,focus:ee,onFocusChange:ie,focusLabel:ae}){const te=b().media,re="circle"===q,oe=S??(re?96:112),ne=B??te.cta,se=Z??(/video/.test(P)&&!/image/.test(P)?"video":"image"),le="string"==typeof Q&&Q?Q:te.remove,[ce,de]=f(!1),[ue,me]=f(!1),he=g(!0);v(()=>()=>{he.current=!1},[]);const pe=T||ce,be=ce&&!T?W??te.choosing:V??te.uploading,fe=U??(ue?Y??te.pickFailed:void 0),ge=e=>{if(!R)return;me(!1);const i=R(e);i&&"function"==typeof i.then&&(de(!0),i.then(e=>{he.current&&(de(!1),"string"==typeof e&&e&&L(e))},()=>{he.current&&(de(!1),me(!0))}))},ve=y(),ye=g(null),[ke,xe]=f(null);v(()=>()=>{ye.current&&URL.revokeObjectURL(ye.current)},[]);const Ne=J||pe,je=!!w&&(t(w,P)||w===ke),we=A??r(P,te),Le=M??(je||"video"===se?te.changeVideo:te.changeImage),Re=e=>{R?ge(e):C?C(e):(e=>{ye.current&&URL.revokeObjectURL(ye.current);const i=URL.createObjectURL(e);ye.current=i,xe(e.type.startsWith("video/")?i:null),L(i)})(e)},Ce=m({accept:P,maxSizeBytes:H,acceptHint:G,multiple:!1,disabled:Ne,onAccept:([e])=>Re(e)}),{dragOver:$e}=Ce,Fe=()=>{Ne||(R?ge():Ce.open())},Ue=w?o(w):"",ze=!re&&!je&&!!ie,Oe=J||!D&&!K?null:/* @__PURE__ */k("div",{"data-media-bar":"",className:[re?"absolute inset-0 flex items-center justify-center gap-1 p-1 text-(--status-on-solid)":"absolute inset-x-0 bottom-0 flex items-center gap-1 p-1 text-(--status-on-solid)","opacity-0 transition-opacity duration-(--motion-fast)","group-hover/media:opacity-100 group-focus-within/media:opacity-100 [@media(hover:none)]:opacity-100"].join(" "),style:{background:"var(--rosh-media-scrim-button)"},children:[D&&/* @__PURE__ */k("button",{id:ze?void 0:ve,type:"button","aria-labelledby":`${ve}-change`,onClick:()=>Fe(),disabled:pe,className:re?`w-8 shrink-0 ${j}`:`min-w-0 flex-1 gap-1 px-2 text-sm font-medium ${j}`,children:[
|
|
2
2
|
/* @__PURE__ */x(p,{name:"swap","aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
|
|
3
|
-
/* @__PURE__ */x("span",{id:`${ve}-change`,className:re?"sr-only":"truncate",children:Le})]}),
|
|
4
|
-
/* @__PURE__ */x(e,{value:ee??"",onChange:e=>ie?.(e),label:ae??te.focus,image:w,hint:null,id:ve,disabled:Ne,className:"[&_[data-image-focus-picture]]:rounded-none [&_[data-image-focus-picture]]:border-0"}):je?/* @__PURE__ */x("video",{src:w??void 0,muted:!0,playsInline:!0,preload:"metadata","aria-label":Ue||void 0,className:"h-full w-full",style:{objectFit:
|
|
3
|
+
/* @__PURE__ */x("span",{id:`${ve}-change`,className:re?"sr-only":"truncate",children:Le})]}),K&&/* @__PURE__ */x("button",{type:"button","aria-label":le,onClick:()=>{ye.current&&(URL.revokeObjectURL(ye.current),ye.current=null),xe(null),L("")},disabled:pe,className:`${re?"":"ml-auto "}w-8 shrink-0 ${j}`,children:/* @__PURE__ */x(p,{name:"trash","aria-hidden":"true",className:"h-4 w-4"})})]}),Pe=/* @__PURE__ */k("div",{...Ce.zoneProps,"data-media-frame":"",className:["group/media relative overflow-hidden border transition-colors",re?"shrink-0 rounded-full":"rounded-(--radius-control)",ze?"":"bg-gray-100",$e?"border-blue-500":"border-line"].join(" "),style:ze?void 0:re?{height:oe,width:oe}:{height:oe},children:[ze?
|
|
4
|
+
/* @__PURE__ */x(e,{value:ee??"",onChange:e=>ie?.(e),label:ae??te.focus,image:w,hint:null,id:ve,disabled:Ne,className:"[&_[data-image-focus-picture]]:rounded-none [&_[data-image-focus-picture]]:border-0"}):je?/* @__PURE__ */x("video",{src:w??void 0,muted:!0,playsInline:!0,preload:"metadata","aria-label":Ue||void 0,className:"h-full w-full",style:{objectFit:I}}):/* @__PURE__ */x("img",{src:w??void 0,alt:Ue,className:"h-full w-full",style:{objectFit:I,objectPosition:ee||void 0}}),X&&!re&&w&&/* @__PURE__ */x(n,{children:Ue}),Oe,pe&&/* @__PURE__ */x(s,{label:be,progress:_,rounded:re?"rounded-full":"rounded-md"})]}),He=/* @__PURE__ */k(N,{children:[
|
|
5
5
|
/* @__PURE__ */x("span",{className:"px-3 text-xs text-ink-faint",children:we}),
|
|
6
|
-
/* @__PURE__ */x("span",{className:"text-sm font-medium text-blue-600",children:ne}),
|
|
6
|
+
/* @__PURE__ */x("span",{className:"text-sm font-medium text-blue-600",children:ne}),G&&/* @__PURE__ */x("span",{className:"text-xs text-ink-faintest",children:G})]}),Ie=/* @__PURE__ */k("button",{type:"button",id:ve,onClick:()=>Fe(),disabled:Ne,"aria-label":"string"==typeof we?we:te.upload,"aria-busy":pe||void 0,"aria-invalid":!!fe||void 0,"aria-required":z||void 0,"aria-describedby":fe?`${ve}-error`:F?`${ve}-hint`:void 0,...Ce.zoneProps,"data-media-circle":"",className:["group/zone flex w-full items-center gap-4 rounded-lg text-left",Ne?"cursor-not-allowed opacity-60":"cursor-pointer",c(Ne)].join(" "),children:[
|
|
7
7
|
/* @__PURE__ */x("span",{className:["flex shrink-0 items-center justify-center rounded-full border-2 border-dashed text-ink-faintest transition-colors",$e?"border-accent-fill bg-accent-tint":"border-line-strong bg-surface-sunken group-hover/zone:bg-accent-tint"].join(" "),style:{height:oe,width:oe},children:/* @__PURE__ */x(l,{})}),
|
|
8
|
-
/* @__PURE__ */x("span",{className:"flex min-w-0 flex-col items-start gap-1 [&>span]:px-0",children:pe?/* @__PURE__ */x(u,{state:"busy",verb:be,pct:
|
|
9
|
-
/* @__PURE__ */x("span",{className:"text-ink-faintest",children:/* @__PURE__ */x(l,{})}),
|
|
10
|
-
return k(i,{label:$,htmlFor:ve,hint:F,error:fe,required:z,className:
|
|
8
|
+
/* @__PURE__ */x("span",{className:"flex min-w-0 flex-col items-start gap-1 [&>span]:px-0",children:pe?/* @__PURE__ */x(u,{state:"busy",verb:be,pct:_}):He})]}),Se=re?Ie:/* @__PURE__ */x("button",{type:"button",id:ve,onClick:()=>Fe(),disabled:Ne,"aria-label":"string"==typeof we?we:te.upload,"aria-busy":pe||void 0,"aria-invalid":!!fe||void 0,"aria-required":z||void 0,"aria-describedby":fe?`${ve}-error`:F?`${ve}-hint`:void 0,...Ce.zoneProps,className:d($e,Ne,c(Ne)),style:{minHeight:oe},children:pe?/* @__PURE__ */x(u,{state:"busy",verb:be,pct:_}):/* @__PURE__ */k(N,{children:[
|
|
9
|
+
/* @__PURE__ */x("span",{className:"text-ink-faintest",children:/* @__PURE__ */x(l,{})}),He]})});/* @__PURE__ */
|
|
10
|
+
return k(i,{label:$,htmlFor:ve,hint:F,error:fe,required:z,className:O,children:[E&&/* @__PURE__ */x("div",{"data-media-kind":"",className:"mb-2",children:/* @__PURE__ */x(a,{value:se,onChange:e=>E(e),options:[{value:"image",label:te.image,icon:/* @__PURE__ */x(p,{name:"image","aria-hidden":"true",className:"h-4 w-4"}),disabled:Ne},{value:"video",label:te.video,icon:/* @__PURE__ */x(p,{name:"play","aria-hidden":"true",className:"h-4 w-4"}),disabled:Ne}],block:!0,size:"md",label:"string"==typeof $&&$?$:te.upload})}),w?Pe:Se,!R&&/* @__PURE__ */x("input",{...Ce.inputProps}),
|
|
11
11
|
/* @__PURE__ */x(h,{rejections:Ce.rejections})]})}export{w as MediaUploadField};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import{nextEnabledIndex as e}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as t,filterOptionItems as n,optionMatches as r,groupedRows as l,OptionCheck as o,OptionSublabel as i}from"./chunk-K5YT5PMJ.js";import{END_ACTIONS_PAD as a,InputEndActionSlot as s,InputEndActionButton as c}from"./chunk-W6REY3SV.js";import{INPUT_BASE_ON as u,INPUT_BASE as d}from"./chunk-AYZY3YNC.js";import{Button_default as h}from"./chunk-MEP6CZJ3.js";import{Icon as p}from"./chunk-ISVODSRP.js";import{LoadingSpinner as m}from"./chunk-R2VKEMZH.js";import{Tooltip as f}from"./chunk-AJPQJ7TC.js";import{onOverlayOpen as b}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as g}from"./chunk-62LW225J.js";import{useDropdownPosition as v,MENU_MAX_HEIGHT as w}from"./chunk-TAHHZGRH.js";import{useBrowserLayoutEffect as y}from"./chunk-PU2GJVMG.js";import{registerModalEscapeInterceptor as x}from"./chunk-TWVUQUUD.js";import{GLASS_DIVIDER as k,glassStyle as j}from"./chunk-5FYDNH4Y.js";import{useShellStrings as $}from"./chunk-NRHG4R2Q.js";import{useState as N,useId as D,useRef as C,useMemo as S,useEffect as R}from"react";import{createPortal as M}from"react-dom";import{jsxs as W,jsx as E}from"react/jsx-runtime";function T(e,t){const n=e.length;if(0===n||t(e.join(", ")))return{shown:n,cut:!1};if(1===n)return{shown:1,cut:!0};let r=0;for(let l=1;l<n&&t(`${e.slice(0,l).join(", ")} +${n-l}`);l+=1)r=l;return{shown:r,cut:!1}}var A=["right-2","right-8","right-16"],F=[8,32,64];function z(z){const{options:H,placeholder:L,emptyOptionLabel:O,className:Y="",disabled:J,id:P,filter:G=!1,allowFreeText:I=!1,freeTextOption:U,onSearchChange:V,loading:Z=!1,error:B,onRetry:K,rightAdornment:Q,endAction:X,renderOption:q,clearable:_=!0,"aria-label":ee,"aria-labelledby":te,"aria-describedby":ne}=z,re=!0===z.multiple,le=z.multiple?z.value:z.value?[z.value]:[],oe=z.multiple?"":z.value,ie=e=>{z.multiple?z.onChange(e):z.onChange(e[0]??"")},ae=le.length>0,se=G&&ae&&!J,ce=re||G,ue=null!=U,de=I||ue,[he,pe]=N(!1),[me,fe]=N(-1),be=D(),ge=P??`${be}-input`,ve=`${be}-listbox`,we=e=>`${be}-opt-${e}`,[ye,xe]=N(""),ke=$(),je=O??ke.select.none,$e=e=>{xe(e),fe(-1),V?.(e)},Ne=C(null),De=C(null),Ce=C(null),Se=C(null),Re=C(he);Re.current=he;const Me=C(!1),We=e=>{Re.current&&(Re.current=!1,e&&I&&!ue&&et&&(re?le.includes(et)||ie([...le,et]):et!==oe&&ie([et])),pe(!1),$e(""))},Ee=(e,t)=>{if(!e.disabled){if(re)return ie(le.includes(e.value)?le.filter(t=>t!==e.value):[...le,e.value]),void(e===tt?$e(""):fe(t));ie([e.value]),We(!1)}},[Te,Ae]=N(null);y(()=>{if(!Q||he)return void Ae(null);const e=Se.current?.offsetWidth??0;Ae(e?e+F[Je]+6:null)});const Fe=v(De,he,ce?{popupRef:Ce}:{matchTriggerWidth:!0}),ze=S(()=>t(H),[H]),He=le.join("\0"),Le=S(()=>{const e=[],t=/* @__PURE__ */new Set;for(const n of ze)le.includes(n.value)&&!t.has(n.value)&&(t.add(n.value),e.push(n.label));if(de)for(const n of le)t.has(n)||e.push(n);return e},[ze,He,de]),Oe=Le.join(", "),Ye=_&&ae&&!J,Je=(Ye?1:0)+(X?1:0),[Pe,Ge]=N(null),Ie=C(null),Ue=C(""),Ve=C(()=>{});Ve.current=()=>{const e=De.current,t=Ie.current;if(!re||!e||!t)return;const n=getComputedStyle(e),r=e.clientWidth-(parseFloat(n.paddingLeft)||0)-(parseFloat(n.paddingRight)||0),l=[n.fontStyle,n.fontWeight,n.fontSize,n.fontFamily,n.letterSpacing].join("|"),o=`${r}|${l}|${Le.join("\0")}`;if(o===Ue.current)return;Ue.current=o;let i=null;r>0&&Le.length>0&&(t.style.fontStyle=n.fontStyle,t.style.fontWeight=n.fontWeight,t.style.fontSize=n.fontSize,t.style.fontFamily=n.fontFamily,t.style.letterSpacing=n.letterSpacing,i=T(Le,e=>(t.textContent=e,t.getBoundingClientRect().width<=r)),t.textContent=""),Ge(e=>e?.shown===i?.shown&&e?.cut===i?.cut?e:i)},y(()=>{Ve.current()}),R(()=>{const e=De.current;if(!re||!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Ve.current());return t.observe(e),()=>t.disconnect()},[re]);const Ze=Le.length,Be=!re||!Pe||Pe.shown>=Ze?Oe:0===Pe.shown?ke.select.selectedCount(Ze):`${Le.slice(0,Pe.shown).join(", ")} +${Ze-Pe.shown}`,Ke=re&&null!==Pe&&(Pe.shown<Ze||Pe.cut),Qe=he&&ae&&ce;R(()=>{if(!he)return;const e=e=>{const t=e.target;Ne.current?.contains(t)||Ce.current?.contains(t)||We(!0)};document.addEventListener("mousedown",e);const t=b(()=>We(!0));return()=>{document.removeEventListener("mousedown",e),t()}},[he,I,ye,He,z.onChange]),R(()=>{if(he)return x(e=>!("Escape"!==e.key||!Re.current)&&(We(!1),De.current?.blur(),!0),()=>Ce.current)},[he]);const Xe=S(()=>{const e=/* @__PURE__ */new Set;return n(H,t=>!e.has(t.value)&&(e.add(t.value),!0))},[H]),qe=S(()=>{if(V)return Xe;const e=ye.trim().toLowerCase();return e?n(Xe,t=>r(t,e)):Xe},[Xe,ye,V]),_e=S(()=>t(qe),[qe]),et=ye.trim(),tt=S(()=>ue&&et?ze.some(e=>e.label===et)||le.includes(et)?null:{value:et,label:et}:null,[ue,et,ze,He]),nt=S(()=>tt?[..._e,tt]:_e,[_e,tt]);/* @__PURE__ */
|
|
2
|
+
return W("div",{ref:Ne,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&(Ne.current?.contains(t)||Ce.current?.contains(t))||Me.current||document.activeElement!==De.current&&We(!0)},children:[(rt=/* @__PURE__ */E("input",{id:ge,ref:De,type:"text",autoComplete:"off",role:"combobox","aria-expanded":he,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-controls":he?ve:void 0,"aria-activedescendant":he&&me>=0&&me<nt.length?we(me):void 0,"aria-label":te?void 0:ee,"aria-labelledby":te,"aria-describedby":ne,value:he?ye:Be,onChange:e=>{$e(e.target.value),pe(!0)},onFocus:()=>{J||($e(""),pe(!0))},onKeyDown:t=>{if("ArrowDown"===t.key||"ArrowUp"===t.key){if(J)return;if(t.preventDefault(),!he)return void pe(!0);if(0===nt.length)return;const n="ArrowDown"===t.key?1:-1;return void fe(t=>e(nt,t,n))}"Enter"===t.key?(t.preventDefault(),he&&me>=0&&me<nt.length?Ee(nt[me],me):1!==_e.length||_e[0].disabled?I&&!ue&&et&&(re?(le.includes(et)||ie([...le,et]),$e("")):(ie([et]),We(!1),De.current?.blur())):Ee(_e[0],0)):"Escape"===t.key?(We(!1),De.current?.blur()):"Tab"===t.key&&We(!0)},placeholder:Qe?Be:L||je,className:`${se?u:d} ${Y} ${a[Je]}${J?"bg-surface-sunken text-ink-faintest cursor-not-allowed":""} truncate${Qe?" rosh-field-shows-choice":""}`,style:Te?{paddingRight:Te}:void 0,disabled:J}),re?/* @__PURE__ */E(f,{content:!he&&Ke?Oe:null,className:"block",children:rt}):rt),re&&
|
|
3
|
+
/* @__PURE__ */E("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */E("span",{ref:Ie,className:"whitespace-pre"})}),Je>0&&
|
|
4
|
+
/* @__PURE__ */W(s,{children:[Ye&&
|
|
5
|
+
/* @__PURE__ */E("span",{onMouseDown:e=>e.preventDefault(),className:"flex opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100",children:/* @__PURE__ */E(c,{action:{label:ke.select.clear,icon:/* @__PURE__ */E(p,{name:"close"}),onClick:()=>{ie([]),We(!1)}}})}),X&&/* @__PURE__ */E("span",{onMouseDown:e=>e.preventDefault(),className:"flex",children:/* @__PURE__ */E(c,{action:X})})]}),Q&&!he&&/* @__PURE__ */E("div",{ref:Se,className:`absolute top-1/2 -translate-y-1/2 ${A[Je]} flex items-center gap-1 flex-nowrap justify-end pointer-events-none`,children:Q}),he&&M(
|
|
6
|
+
/* @__PURE__ */W("div",{ref:Ce,onMouseDownCapture:()=>{Me.current=!0,setTimeout(()=>{Me.current=!1},0)},className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:g.popup,left:Fe?.left,right:Fe?.right,top:Fe?.top,bottom:Fe?.bottom,minWidth:Fe?.minWidth,width:Fe?.width,...ce&&{maxWidth:Fe?.maxWidth},visibility:Fe?void 0:"hidden",...j()},children:[re&&ae&&_&&!J&&
|
|
7
|
+
/* @__PURE__ */E("button",{type:"button",tabIndex:-1,onMouseDown:e=>{e.preventDefault(),ie([])},className:`block w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm text-gray-600 hover:bg-row-hover border-b ${k}`,children:ke.select.clearAll}),Z?
|
|
8
|
+
/* @__PURE__ */E(m,{size:"sm",padding:"py-2",label:ke.search.searching}):B?/* @__PURE__ */W("div",{role:"alert",className:"flex items-center gap-2 px-3 py-2 text-sm text-red-600",children:[
|
|
9
|
+
/* @__PURE__ */E("span",{className:"min-w-0 flex-1",children:B}),K&&/* @__PURE__ */E(h,{variant:"link",size:"sm",onMouseDown:e=>e.preventDefault(),onClick:K,className:"shrink-0",children:ke.list.retry})]}):null,
|
|
10
|
+
/* @__PURE__ */W("div",{id:ve,role:nt.length?"listbox":void 0,"aria-labelledby":nt.length?te??(ee?void 0:ge):void 0,"aria-label":nt.length&&!te?ee:void 0,"aria-multiselectable":!(!nt.length||!re)||void 0,className:"overflow-y-auto",style:{maxHeight:Fe?.maxHeight??w},children:[0===nt.length?Z||B?null:/* @__PURE__ */E("p",{className:"px-3 py-3 text-sm text-ink-faintest text-center",children:ke.select.noMatches}):0===_e.length?null:l(qe,(e,t)=>{const n=le.includes(e.value);/* @__PURE__ */
|
|
11
|
+
return W("button",{id:we(t),type:"button",role:"option","aria-selected":n,"aria-disabled":e.disabled||void 0,tabIndex:-1,onMouseDown:n=>{(e.disabled||re)&&n.preventDefault(),Ee(e,t)},className:"w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center justify-between gap-2 whitespace-nowrap "+(e.disabled?"cursor-not-allowed text-gray-400":`hover:bg-gray-50 ${n?"text-blue-600 font-medium":"text-gray-700"} ${t===me?"bg-gray-100":n?"bg-blue-50/50":""}`),children:[re&&/* @__PURE__ */E(o,{selected:n}),
|
|
12
|
+
/* @__PURE__ */E("span",{className:`min-w-0 ${ce?"flex-auto":"flex-1"} truncate`,children:q?q(e,{selected:n,active:t===me}):e.label}),e.sublabel&&/* @__PURE__ */E(i,{grows:ce,children:e.sublabel})]},e.value)},be),tt&&U&&
|
|
13
|
+
/* @__PURE__ */E("button",{id:we(_e.length),type:"button",role:"option","aria-selected":!1,tabIndex:-1,onMouseDown:e=>{re&&e.preventDefault(),Ee(tt,_e.length)},className:`w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 whitespace-nowrap text-ink hover:bg-row-hover ${_e.length?`border-t ${k}`:""} ${me===_e.length?"bg-gray-100":""}`,children:/* @__PURE__ */E("span",{className:"min-w-0 flex-1 truncate",children:U(tt.value)})},`${be}-typed`)]})]}),document.body)]});var rt}export{z as SearchableSelect,T as fitChoice};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import{SearchableSelect as e}from"./chunk-Y7D2CZ4H.js";import{labelClasses as a}from"./chunk-EQKUFYX6.js";import{Select_default as l}from"./chunk-EBODRYXS.js";import{isSafeLinkHref as t}from"./chunk-Z5TE3MEG.js";import{Input_default as r}from"./chunk-W6REY3SV.js";import{INPUT_SIZES as n}from"./chunk-AYZY3YNC.js";import{Button_default as i}from"./chunk-MEP6CZJ3.js";import{Icon as o}from"./chunk-ISVODSRP.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as u}from"./chunk-NRHG4R2Q.js";import{useId as d,useRef as c,useState as p,useEffect as m}from"react";import{jsx as f,jsxs as v,Fragment as g}from"react/jsx-runtime";function h(e){return"select"===e.type?e.options:"groups"===e.type?e.groups.flatMap(e=>e.options):[]}var b="address",x={kindOf:()=>b,targetOf:e=>e,readFilter:()=>null,withFilter:e=>e},k=e=>t(e.trim());function y(t){const{value:n,kinds:o,rules:y=x,filtersFor:w,label:C,readOnly:N,placeholder:O,className:j="",tidyAddress:F,addressAddon:E}=t,$=void 0!==t.onApply,D=u().link,R=y.isSafe??k,Y=d(),z=c(null),A=c(null),[S,T]=p({url:n}),P=$?S.url:n,[M,U]=p(!1),[W,Z]=p(null),[B,H]=p(null),[K,Q]=p(!1),V=c(null),G=c(()=>{});G.current=$?t.onCancel:()=>{},m(()=>{if($)return s(e=>{const a=z.current;return!!("Escape"===e.key&&a&&e.target instanceof Node&&a.contains(e.target))&&(G.current(),!0)},()=>z.current)},[$]),m(()=>{if(!$)return;const e=A.current;e?(e.focus(),e.select()):z.current?.querySelector("button, input")?.focus()},[]);const L=o??[{value:b,label:D.address,target:{type:"text"}}],X=W&&W.against===P?W.kind:y.kindOf(P),q=L.filter(e=>!e.hideWhenEmpty||h(e.target).length>0||e.value===X),I=q.find(e=>"text"===e.target.type),J=q.find(e=>e.value===X)??I??q[0];if(!J)return null;const _="text"!==J.target.type,ee=_?y.targetOf(P):P,ae=h(J.target),le=ae.find(e=>e.value===ee),te=e=>({value:e,label:D.unavailable(e)}),re="select"===J.target.type&&ee&&w?w(ee):null,ne=re?y.readFilter(P):null,ie=ne?re?.find(e=>e.param===ne.param):void 0,oe=B&&B.against===P?B.text:P,se=_?P:F?F(oe.trim()).trim():oe.trim(),ue=$&&F?se:oe,de=!_&&""!==ue.trim()&&!R(ue),ce=de&&(!$||M);_&&K&&Q(!1);const pe=(e,a)=>{$?T({url:e,name:a}):void 0===a?t.onChange(e):t.onChange(e,a)},me=(e,a)=>{Z(a=>a?{...a,against:e}:a),pe(e,a)},fe=e=>{if(!e)return me("");const a=ae.find(a=>a.value===e);me(e,a?.label)},ve=e=>{U(!1);const a=e.trim();a?R(e)?(H({text:e,against:a}),me(a)):H({text:e,against:P}):(H({text:e,against:""}),me(""))},ge=e=>{const a=e.relatedTarget;if(a&&(a===A.current||V.current?.contains(a)))return;if(Q(!1),$||!F||N)return;const l=F(oe.trim());l.trim()!==oe.trim()&&ve(l)},he=()=>{if(!$||!se)return;if(!_&&de)return void U(!0);const e=_&&S.url===se?S.name:void 0,a=t.onApply;void 0===e?a(se):a(se,e)},be=(e,a)=>a&&!e.some(e=>e.value===a)?[te(a),...e]:[...e],xe=(a,t,r,n,i)=>{const o=[];for(const e of r){const a=o[o.length-1],l={value:e.value,label:e.label};e.group?a&&"options"in a&&a.label===e.group?a.options.push(l):o.push({label:e.group,options:[l]}):o.push(l)}if(i){const l=r.some(e=>""===e.value);/* @__PURE__ */
|
|
2
|
+
return f(e,{"aria-label":a,value:t,options:o,disabled:N,clearable:l,placeholder:r.find(e=>""===e.value)?.label,onChange:n})}/* @__PURE__ */
|
|
3
|
+
return f(l,{size:"sm","aria-label":a,value:t,options:o,readOnly:N,onChange:n})};let ke;if("text"===J.target.type)ke=/* @__PURE__ */f(r,{ref:A,id:`${Y}-address`,size:"sm",type:"text",invalid:ce,"aria-label":D.address,"aria-describedby":ce?`${Y}-why`:void 0,placeholder:O??D.addressPlaceholder,spellCheck:!1,autoComplete:"off",value:oe,readOnly:N,onChange:e=>ve(e.target.value),onFocus:()=>Q(!0),onBlur:ge,onKeyDown:F&&!$?e=>{"Enter"===e.key&&e.currentTarget.blur()}:void 0});else{const e="groups"===J.target.type?J.target.groups.flatMap(e=>e.options.map(a=>({value:a.value,label:a.label,group:e.label}))):J.target.options.map(e=>({value:e.value,label:e.label})),a=[{value:"",label:J.target.placeholder},...be(e,ee)];ke=xe(J.label,ee,a,fe,e.length>10)}const ye=/* @__PURE__ */v(g,{children:[o&&xe(D.linkType,J.value,q.map(e=>({value:e.value,label:e.label})),e=>{H(null),U(!1);const a=q.find(a=>a.value===e);if(!a||"text"===a.target.type)return void Z({kind:e,against:P});const l=h(a.target)[0];Z({kind:e,against:l?l.value:""}),l?pe(l.value,l.label):pe("")},!1),ke,E&&K&&!N&&"text"===J.target.type&&/* @__PURE__ */f("div",{ref:V,onBlur:ge,children:E({url:oe,onChange:ve})}),re&&xe(D.filter,ne?.param??"",[{value:"",label:D.noFilter},...ne&&!ie?[te(ne.param)]:[],...re.map(e=>({value:e.param,label:e.label}))],e=>{if(!e)return me(ee,le?.label);const a=re?.find(a=>a.param===e),l=a?.values[0];l&&me(y.withFilter(ee,{param:e,value:l.value}),l.label)},!1),re&&ne&&xe(D.value,ne.value,be((ie?.values??[]).map(e=>({value:e.value,label:e.label})),ne.value),e=>{if(!ne)return;const a=ie?.values.find(a=>a.value===e);me(y.withFilter(ee,{param:ne.param,value:e}),a?.label)},(ie?.values.length??0)>10),ce&&/* @__PURE__ */f("p",{id:`${Y}-why`,role:"alert",className:"text-2xs leading-4 text-red-600",children:D.unsafe}),J.hint&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:J.hint}),re&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:D.filterHint})]});if(!$)/* @__PURE__ */
|
|
4
|
+
return f("div",{ref:z,className:`flex min-w-0 flex-auto flex-col gap-2 ${j}`.trim(),role:C?"group":void 0,"aria-label":C,children:ye});const we=t.onRemove;/* @__PURE__ */
|
|
5
|
+
return v("div",{ref:z,role:"dialog","aria-label":C??D.title,className:`flex min-w-0 flex-col gap-2 rounded-xl border border-line bg-surface p-3 shadow-lg ${j}`.trim(),onKeyDown:e=>{"Enter"!==e.key||e.defaultPrevented||e.target instanceof Element&&e.target.closest("button")||(e.preventDefault(),he())},children:[_?/* @__PURE__ */f("span",{className:a({inline:!0}),children:D.title}):/* @__PURE__ */f("label",{htmlFor:`${Y}-address`,className:a({inline:!0}),children:D.title}),ye,
|
|
6
|
+
/* @__PURE__ */v("div",{className:"flex items-center justify-between gap-2",children:[we?/* @__PURE__ */f(i,{variant:"ghost-danger",size:"sm","data-window-action":"remove",onClick:we,children:D.remove}):null,
|
|
7
|
+
/* @__PURE__ */v("span",{className:"ml-auto flex gap-1",children:[
|
|
8
|
+
/* @__PURE__ */f(i,{variant:"secondary",size:"sm","data-window-action":"cancel",onClick:()=>G.current(),children:D.cancel}),
|
|
9
|
+
/* @__PURE__ */f(i,{variant:"primary",size:"sm","data-window-action":"apply",onClick:he,disabled:N||""===se,children:D.apply})]})]})]})}function w({label:e,text:a,onTextChange:l,link:t,onLinkChange:i,kinds:s,rules:m,filtersFor:g,textPlaceholder:h,readOnly:b,className:x=""}){const k=u().link,[w,C]=p(!1),N=c(null),O=d(),j=()=>{C(!1),N.current?.focus()};/* @__PURE__ */
|
|
10
|
+
return v("div",{className:`flex min-w-0 flex-auto flex-col ${x}`.trim(),children:[
|
|
11
|
+
/* @__PURE__ */f(r,{size:"md",type:"text",className:"rounded-b-none","aria-label":k.text(e),placeholder:h,value:a,readOnly:b,onChange:e=>l(e.target.value)}),
|
|
12
|
+
/* @__PURE__ */v("button",{ref:N,type:"button","aria-label":k.linkOf(e,t),"aria-expanded":w,"aria-controls":w?O:void 0,disabled:b,onClick:()=>C(e=>!e),className:`flex w-full min-w-0 items-center gap-2 rounded-b-(--radius-control) border border-t-0 border-line-strong bg-surface-sunken ${n.md} text-left hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)] disabled:cursor-not-allowed disabled:opacity-60`,children:[
|
|
13
|
+
/* @__PURE__ */f(o,{name:"link",strokeWidth:1.5,className:"h-4 w-4 shrink-0 "+(t?"text-blue-600":"text-ink-faintest")}),
|
|
14
|
+
/* @__PURE__ */f("span",{className:"min-w-0 truncate "+(t?"text-blue-600":"text-ink-faintest"),children:t||k.addLink})]}),w&&/* @__PURE__ */f("div",{id:O,className:"mt-2",children:/* @__PURE__ */f(y,{value:t,label:k.linkOf(e,t),kinds:s,rules:m,filtersFor:g,onApply:(e,a)=>{void 0===a?i(e):i(e,a),j()},onRemove:t?()=>{i(""),j()}:void 0,onCancel:j})})]})}export{y as LinkPicker,w as TextLinkField};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{FormField as e}from"./chunk-6KBDNYRW.js";import{dropzoneClass as t,zoneFocusClass as a,CloseGlyph as r}from"./chunk-
|
|
1
|
+
import{FormField as e}from"./chunk-6KBDNYRW.js";import{dropzoneClass as t,zoneFocusClass as a,CloseGlyph as r}from"./chunk-MPC3CHAO.js";import{useFileIntake as n,humanSize as i,FileIntakeAlert as s}from"./chunk-TNGIXSTM.js";import{useShellStrings as l}from"./chunk-NRHG4R2Q.js";import{forwardRef as c,useId as m}from"react";import{jsxs as o,jsx as d}from"react/jsx-runtime";var p=c(function({files:c,onChange:p,accept:u,acceptHint:h,multiple:x=!0,maxSizeBytes:b,maxFiles:f,disabled:y=!1,label:g,hint:N,error:j,required:k,className:v=""},C){const $=m(),z=l().files,H=n({accept:u,acceptHint:h,maxSizeBytes:b,maxFiles:f,multiple:x,disabled:y,currentCount:c.length,onAccept:e=>p(x?[...c,...e]:e.slice(0,1))}),M=j?`${$}-error`:N?`${$}-hint`:void 0;/* @__PURE__ */
|
|
2
2
|
return o(e,{label:g,htmlFor:$,hint:N,error:j,required:k,className:v,children:[
|
|
3
|
-
/* @__PURE__ */o("button",{ref:
|
|
3
|
+
/* @__PURE__ */o("button",{ref:C,type:"button",id:$,disabled:y,onClick:H.open,"aria-invalid":!!j||void 0,"aria-required":k||void 0,"aria-describedby":M,...H.zoneProps,className:t(H.dragOver,y,a(y),"px-4 py-6"),children:[
|
|
4
4
|
/* @__PURE__ */o("span",{children:[
|
|
5
5
|
/* @__PURE__ */d("span",{className:"text-sm font-medium text-blue-600",children:x?z.chooseMany:z.chooseOne}),
|
|
6
6
|
/* @__PURE__ */d("span",{className:"text-sm text-gray-500",children:` ${x?z.dragMany:z.dragOne}`})]}),h&&/* @__PURE__ */d("span",{className:"text-xs text-gray-400",children:h})]}),
|
|
7
|
-
/* @__PURE__ */d("input",{...
|
|
7
|
+
/* @__PURE__ */d("input",{...H.inputProps}),c.length>0&&/* @__PURE__ */d("ul",{className:"mt-2 flex flex-col gap-1",children:c.map((e,t)=>/* @__PURE__ */o("li",{className:"flex items-center justify-between gap-3 rounded-md bg-gray-50 px-3 py-2",children:[
|
|
8
8
|
/* @__PURE__ */d("span",{className:"min-w-0 flex-1 truncate text-sm text-gray-800",title:e.name,children:e.name}),
|
|
9
9
|
/* @__PURE__ */d("span",{className:"shrink-0 text-xs tabular-nums text-gray-500",children:i(e.size,z)}),
|
|
10
|
-
/* @__PURE__ */d("button",{type:"button",disabled:y,onClick:()=>{
|
|
11
|
-
/* @__PURE__ */d(s,{rejections:
|
|
10
|
+
/* @__PURE__ */d("button",{type:"button",disabled:y,onClick:()=>{H.clearRejections(),p(c.filter((e,a)=>a!==t))},"aria-label":z.remove(e.name),className:"shrink-0 text-gray-400 hover:text-gray-600",children:/* @__PURE__ */d(r,{})})]},`${e.name}-${t}`))}),
|
|
11
|
+
/* @__PURE__ */d(s,{rejections:H.rejections})]})});export{p as FilePicker_default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{resolveColumnShares as e,COLUMN_SHARES_EQUAL as r,COLUMN_SHARE_MIN as t,COLUMN_COUNT_MAX as n}from"./chunk-PLGJOHEG.js";import{InputNumber_default as o}from"./chunk-
|
|
2
|
-
return f("div",{role:"group","aria-label":N?void 0:C,"aria-labelledby":N,"aria-describedby":z>1?A:void 0,className:`flex w-full min-w-0 flex-col gap-2 ${
|
|
1
|
+
import{resolveColumnShares as e,COLUMN_SHARES_EQUAL as r,COLUMN_SHARE_MIN as t,COLUMN_COUNT_MAX as n}from"./chunk-PLGJOHEG.js";import{InputNumber_default as o}from"./chunk-I7WAOKU2.js";import{textWidth as l}from"./chunk-UVCMV2TL.js";import{Tooltip as i}from"./chunk-AJPQJ7TC.js";import{useShellStrings as a}from"./chunk-NRHG4R2Q.js";import{useId as s,useRef as c,useState as u,useEffect as d,Fragment as h}from"react";import{jsxs as f,jsx as m}from"react/jsx-runtime";var p=(e,r,t)=>Math.min(t,Math.max(r,e)),g=e=>e.reduce((e,r)=>e+r,0),v=(e,r)=>e.length===r.length&&e.every((e,t)=>e===r[t]);var b="w-0.5",y=`${b} group-hover/widths:w-1 group-focus-visible/widths:w-1`;var w=["text-blue-700","text-gray-600"];function x({count:x,value:$,onChange:k,label:C,"aria-labelledby":N,readOnly:P=!1,disabled:M=!1,className:R=""}){const j=a().widths,A=s(),z=p(Math.round(x)||1,1,n),B=e($,z),K=B??[...r[z]??[]],O=[...K,100-g(K)],S=P||M,T=c(null),D=c({onChange:k,shown:K,locked:S,n:z,stored:B});D.current={onChange:k,shown:K,locked:S,n:z,stored:B};const H=r=>{const{onChange:t,shown:n,locked:o,n:l}=D.current;if(o)return!1;const i=e(r,l);return!(!i||v(i,n))&&(t(i),!0)},I=(e,r,n)=>{const o=e[r]+e[r+1],l=[...e];l[r]=p(Math.round(n),t,o-t),l[r+1]=o-l[r],H(l.slice(0,-1))&&(ne.current=null)},L=e=>r=>{if(r.altKey||r.ctrlKey||r.metaKey)return;const n=r.shiftKey?10:1,o=O[e]+O[e+1],l="ArrowRight"===r.key?O[e]+n:"ArrowLeft"===r.key?O[e]-n:"PageUp"===r.key?O[e]+10:"PageDown"===r.key?O[e]-10:"Home"===r.key?t:"End"===r.key?o-t:null;null!==l&&(r.preventDefault(),I(O,e,l))},U=c(null),[E,G]=u(null),J=()=>{U.current=null,G(null),document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")};d(()=>J,[]);const V=e=>r=>{if(0!==r.button||S)return;r.preventDefault();const t=T.current?.getBoundingClientRect().width??0;t<=0||(U.current={i:e,x:r.clientX,width:t,from:O,moved:!1,pointer:r.pointerId},G(e),r.currentTarget.setPointerCapture?.(r.pointerId),document.body.style.cursor="col-resize",document.body.style.userSelect="none")},W=e=>{const r=U.current;if(!r)return;if(0===e.buttons)return void J();const t=e.clientX-r.x;if(!r.moved){if(Math.abs(t)<3)return;r.moved=!0}I(r.from,r.i,r.from[r.i]+t/r.width*100)},F=e=>{const r=U.current;r&&(e.currentTarget.hasPointerCapture?.(r.pointer)&&e.currentTarget.releasePointerCapture(r.pointer),J())},Q=(e,r)=>{const{shown:n}=D.current,o=function(e,r,n){const o=e.length,l=[...e];if(o<2)return l;const i=p(Math.round(n),t,100-(o-1)*t);let a=i-l[r];l[r]=i;const s=[...Array.from({length:o-1-r},(e,t)=>r+1+t),...Array.from({length:r},(e,t)=>r-1-t)];if(a<0)return l[s[0]]-=a,l;for(const e of s){if(a<=0)break;const r=Math.min(a,l[e]-t);l[e]-=r,a-=r}return l}([...n,100-g(n)],e,r);return H(o.slice(0,-1))?o:null},[X,q]=u(0);d(()=>{const e=T.current;if(!e||"undefined"==typeof ResizeObserver)return;const r=new ResizeObserver(()=>q(e.getBoundingClientRect().width));return r.observe(e),()=>r.disconnect()},[]);const Y=c(null),[Z,_]=u(null),[ee,re]=u([]),te=(e,r)=>_(t=>r?e:t===e?null:t),ne=c(null),oe=(e,r)=>{const t=ne.current;if(!t||t.column!==e||t.share!==r)return!1;const{onChange:n,locked:o,stored:l}=D.current;var i,a;return o||(i=l,a=t.stored,void 0===i||void 0===a?i===a:v(i,a))||n(t.stored),!0},le=O.join(",");d(()=>{const e=null===Z?[]:function(e,r){if(!e)return[];const t=Array.from(e.querySelectorAll("input[data-widths-label]")),n=t[r]?.getBoundingClientRect();return n&&0!==n.width?null===l("","12px sans-serif")?[]:t.flatMap((e,t)=>{if(t===r)return[];const o=e.getBoundingClientRect(),i=getComputedStyle(e),a=(l(e.value,`${i.fontWeight} ${i.fontSize} ${i.fontFamily}`)??0)/2,s=(o.left+o.right)/2;return s+a>n.left&&s-a<n.right?[t]:[]}):[]}(Y.current,Z);re(r=>v(r,e)?r:e)},[Z,le,X]);const ie=j.hint(z,t),ae=O.slice(0,-1).map((e,r)=>g(O.slice(0,r+1)));/* @__PURE__ */
|
|
2
|
+
return f("div",{role:"group","aria-label":N?void 0:C,"aria-labelledby":N,"aria-describedby":z>1?A:void 0,className:`flex w-full min-w-0 flex-col gap-2 ${M?"opacity-60":""} ${R}`.trim(),children:[
|
|
3
3
|
/* @__PURE__ */f("div",{ref:Y,"data-widths-bar":"",className:"relative h-8",children:[
|
|
4
|
-
/* @__PURE__ */m("div",{ref:
|
|
5
|
-
/* @__PURE__ */m("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 rounded-(--radius-control) border border-line-strong"}),z>1&&
|
|
6
|
-
return m("div",{"data-widths-tip":"",className:"absolute inset-y-0 "+(n?"z-20":""),style:{left:`clamp(0px, calc(${l+e/2}% - ${a} / 2), calc(100% - ${a}))`,width:a},children:/* @__PURE__ */m(i,{content:ie,delay:600,describe:!1,className:"absolute inset-0",children:/* @__PURE__ */m(o,{appearance:"bare",value:e,display:()=>(e=>
|
|
4
|
+
/* @__PURE__ */m("div",{ref:T,"data-widths-track":"",className:"flex h-full w-full overflow-hidden rounded-(--radius-control) bg-surface",children:O.map((e,r)=>/* @__PURE__ */m("div",{"data-widths-segment":"",style:{flexBasis:`${e}%`},className:`flex min-w-0 shrink-0 grow-0 items-center justify-center overflow-hidden whitespace-nowrap text-xs font-medium tabular-nums ${w[r%2]} ${r%2==0?"bg-accent-tint":""}`,children:1===z&&/* @__PURE__ */m("span",{"data-widths-label":"",children:`${e}%`})},r))}),
|
|
5
|
+
/* @__PURE__ */m("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 rounded-(--radius-control) border border-line-strong"}),z>1&&O.map((e,r)=>/* @__PURE__ */f(h,{children:[(()=>{const n=Z===r,l=g(O.slice(0,r)),a=n?`max(${e}%, 40px)`:`${e}%`;/* @__PURE__ */
|
|
6
|
+
return m("div",{"data-widths-tip":"",className:"absolute inset-y-0 "+(n?"z-20":""),style:{left:`clamp(0px, calc(${l+e/2}% - ${a} / 2), calc(100% - ${a}))`,width:a},children:/* @__PURE__ */m(i,{content:ie,delay:600,describe:!1,className:"absolute inset-0",children:/* @__PURE__ */m(o,{appearance:"bare",value:e,display:()=>(e=>X>0&&X*e/100<36?String(e):`${e}%`)(e),suffix:"%",min:t,max:100-(z-1)*t,step:1,shiftStep:10,precision:0,allowEmpty:!1,reportWhileTyping:!1,readOnly:P,disabled:M,"aria-label":j.column(r+1),"aria-describedby":A,"data-widths-label":"",onChange:e=>{null===e||oe(r,e)||Q(r,e)},onRevert:e=>((e,r)=>{D.current.locked||null===r||oe(e,r)||Q(e,r)})(r,e),onFocus:()=>{ne.current={column:r,share:e,stored:D.current.stored},te(r,!0)},onBlur:()=>te(r,!1),className:`absolute inset-0 text-xs font-medium ${w[r%2]} ${ee.includes(r)&&!n?"opacity-0":""}`})})})})(),r<z-1&&/* @__PURE__ */m("div",{className:"absolute inset-y-0 z-10 w-3 -translate-x-1/2",style:{left:`${ae[r]}%`},children:/* @__PURE__ */m(i,{content:j.dragHint,delay:600,className:"relative flex h-full w-full",children:/* @__PURE__ */m("div",{role:"separator",tabIndex:M?-1:0,"aria-orientation":"vertical","aria-label":j.divider(r+1,r+2),"aria-valuenow":O[r],"aria-valuemin":t,"aria-valuemax":O[r]+O[r+1]-t,"aria-valuetext":j.dividerValue(r+1,O[r],r+2,O[r+1]),"aria-disabled":S||void 0,onKeyDown:S?void 0:L(r),onPointerDown:V(r),onPointerMove:W,onPointerUp:F,onPointerCancel:F,onLostPointerCapture:()=>{U.current&&J()},className:"group/widths flex h-full w-full touch-none justify-center rounded-(--radius-control) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(S?"cursor-default":"cursor-col-resize"),children:/* @__PURE__ */m("span",{"aria-hidden":"true","data-widths-line":"",className:"h-full rounded-full "+(S?`${b} bg-gray-300`:`bg-accent-fill transition-[width,background-color] duration-(--motion-fast) group-hover/widths:bg-blue-700 ${E===r?"w-1":y}`)})})})})]},r))]}),z>1&&/* @__PURE__ */m("span",{id:A,className:"sr-only",children:ie})]})}export{x as WidthsBar};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{AccessibleTable as e}from"./chunk-
|
|
1
|
+
import{AccessibleTable as e}from"./chunk-24BF22NF.js";import{arcPath as t}from"./chunk-VFC6QUEN.js";import{useHighlight as r}from"./chunk-CNYAHYE6.js";import{ChartTooltip as l}from"./chunk-WDQI3FV6.js";import{CHART_INK as a,resolveSeriesColor as n}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as o}from"./chunk-NRHG4R2Q.js";import{formatPlain as h,formatPercent as c}from"./chunk-C3QOHMR6.js";import{useState as u}from"react";import{jsx as s,jsxs as d}from"react/jsx-runtime";function m(e,t,r,l,a,n,i,o){if(l>=8)return;const h=e.reduce((e,t)=>e+p(t,8-l),0);if(h<=0)return;let c=t;e.forEach((e,t)=>{const u=p(e,8-l),s=u/h*r,d=`${i}/${e.key}`,f=0===l?t:a,b=0===l?e.key:n;o.push({id:d,label:e.label,value:u,depth:l,start:c,end:c+s,branch:f,branchKey:b}),e.children?.length&&m(e.children,c,s,l+1,f,b,d,o),c+=s})}function p(e,t){return t>0&&e.children?.length?e.children.reduce((e,r)=>e+p(r,t-1),0):Math.max(0,e.value??0)}function f({nodes:p,size:f=320,innerRadius:b=44,ringGap:v=2,formatValue:k,centerLabel:x,className:g,emptyLabel:y}){const M=i().charts,$=o(),j=k??(e=>h(e,$)),N=y??M.nothingToBreakDown,[F,w]=u(null),{highlighted:R}=r(),C=[];if(m(p,-Math.PI/2,2*Math.PI,0,0,"","",C),0===C.length)/* @__PURE__ */return s("p",{className:`text-sm text-gray-500 ${g??""}`,children:N});const E=Math.max(...C.map(e=>e.depth))+1,I=f/2,L=f/2,Q=(f/2-8-b)/E,z=C.filter(e=>0===e.depth).reduce((e,t)=>e+t.value,0),A=e=>`color-mix(in oklab, ${n(e.branch)} ${Math.max(16,100-24*e.depth).toFixed(0)}%, ${a.surface})`,B=e=>null!==F?e.id===F:null===R||e.branchKey===R,H=F?C.find(e=>e.id===F):void 0,V=e=>c(e.value/z*100,1,$);/* @__PURE__ */
|
|
2
2
|
return d("div",{className:`relative ${g??""}`,children:[
|
|
3
|
-
/* @__PURE__ */d("svg",{width:"100%",height:f,viewBox:`0 0 ${f} ${f}`,role:"img","aria-label":M.sunburst(j(
|
|
4
|
-
/* @__PURE__ */s(e,{caption:M.sunburst(j(
|
|
3
|
+
/* @__PURE__ */d("svg",{width:"100%",height:f,viewBox:`0 0 ${f} ${f}`,role:"img","aria-label":M.sunburst(j(z),E),onMouseLeave:()=>w(null),children:[C.map(e=>/* @__PURE__ */s("path",{d:t(I,L,b+e.depth*Q+v/2,b+(e.depth+1)*Q-v/2,e.start,e.end),fill:A(e),fillOpacity:B(e)?1:.45,stroke:a.surface,strokeWidth:1,onMouseEnter:()=>w(e.id)},e.id)),x&&/* @__PURE__ */s("text",{x:I,y:L+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:a.label,children:x})]}),H&&/* @__PURE__ */s("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */s(l,{title:H.label,rows:[{key:"value",label:M.value,color:A(H),value:j(H.value)},{key:"share",label:M.share,color:a.muted,value:V(H)}]})}),
|
|
4
|
+
/* @__PURE__ */s(e,{caption:M.sunburst(j(z),E),head:[M.tableLevel,M.tableItem,M.value,M.share],rows:C.map(e=>[e.depth+1,e.label,j(e.value),V(e)])})]})}export{f as SunburstChart};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{useOverlayTarget as e,usePopupAnchor as r,usePanelPosition as l,usePopupLevel as t,usePopupLevelBindings as i,windowScrimStyle as a,OverlayLayerProvider as o,scrimHasCorners as n,popupLayerStyle as s,POPUP_GUTTER as d}from"./chunk-CJ4OEY3T.js";import{CloseButton as c}from"./chunk-AH5MLH54.js";import{useDiscardGuard as m}from"./chunk-5YTZBYG4.js";import{dialogA11y as p}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as u}from"./chunk-DBQNYJZ6.js";import{useFocusTrap as f,useScrollLock as h}from"./chunk-DWGYC7OD.js";import{HEADING_TEXT as x,DESCRIPTION_TEXT as v,PANEL_SURFACE as b}from"./chunk-BWJZTHZ6.js";import{useHydrated as w}from"./chunk-KEFNQEXZ.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{useShellStrings as $}from"./chunk-NRHG4R2Q.js";import{useRef as g,useId as N,useState as j,useEffect as k}from"react";import{createPortal as C}from"react-dom";import{jsxs as Y,Fragment as Z,jsx as B}from"react/jsx-runtime";var E=`calc(100% - ${2*d}px)`,H="grid grid-cols-[minmax(0,1fr)_auto]",T="bg-black/30 backdrop-blur-sm",W={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-4xl","2xl":"max-w-6xl",full:"max-w-none"};function D({open:d,onClose:D,title:G,description:Q,role:A="dialog",children:J,footer:U,headerActions:_,blocking:F=!1,size:O="md",aside:R=!1,dirty:V=!1,initialFocus:z,"aria-label":I,"aria-labelledby":K,"aria-describedby":L,className:M=""}){const X=g(null),q=N(),P=N(),S=!F,ee="full"===O,re=ee||null!=_,le=Boolean(G||Q),te=N();$().dialog;const ie=e(w()),[ae,oe]=j(null),ne=m({open:d,dirty:V,onClose:D,title:G,layer:ae}),se=g(null),de=r(d&&null!==ie,se),ce=l(de,X),me=t(d&&null!==ie,se),pe=i(me,ae),ue=a(me),fe=null!==me.host;if(u(d),f(X,d&&null!==ie,z,pe),h(d),k(()=>{if(d)return y(()=>!pe.current?.(document.activeElement)&&(F||ne(),!0),()=>X.current)},[d,F,ne,pe]),!d||!ie)return null;/* @__PURE__ */
|
|
2
|
+
return Y(Z,{children:[/* @__PURE__ */B("span",{ref:se,hidden:!0,"data-popup-anchor":""}),C(
|
|
3
|
+
/* @__PURE__ */B(o,{value:ae,children:/* @__PURE__ */Y("div",{ref:oe,className:"fixed inset-0"+(R?" pointer-events-none opacity-0":fe?" pointer-events-none":""),style:s(me),role:"presentation","data-overlay-layer":"","data-aside":R?"":void 0,children:[!fe&&/* @__PURE__ */B("div",{className:`fixed inset-0 ${T}`,"aria-hidden":"true","data-popup-scrim":"system"}),ue&&/* @__PURE__ */B("div",{className:`fixed ${T}${R?"":" pointer-events-auto"}${n(me)?" rounded-(--radius-window)":""}`,style:ue,onClick:F?void 0:ne,"aria-hidden":"true","data-popup-scrim":"window"}),
|
|
4
|
+
/* @__PURE__ */B("div",{className:de?"fixed inset-0":"fixed inset-0 flex items-center justify-center p-4",onClick:F||fe?void 0:e=>{e.target===e.currentTarget&&ne()},children:/* @__PURE__ */Y("div",{ref:X,"data-popup-panel":"",style:de?{left:ce?.left??0,top:ce?.top??0,visibility:ce?void 0:"hidden",width:E,[ee?"height":"maxHeight"]:E}:void 0,...p({role:A,modal:!0,titleId:G?te:void 0,labelledBy:K,label:I}),"aria-describedby":L??(Q?P:J?q:void 0),className:(ee?`${de?"absolute":"relative h-full w-full max-h-full"} ${W[O]} ${H} grid-rows-[auto_minmax(0,1fr)_auto] overflow-hidden rounded-(--radius-popup) ${b}`:`${de?"absolute":"relative max-h-full w-full"} ${W[O]}${re?` ${H} content-start gap-x-2`:""} overflow-y-auto overscroll-contain rounded-(--radius-card) ${b} p-6`)+`${fe&&!R?" pointer-events-auto":""} ${M}`.trimEnd(),children:[ee?le&&
|
|
5
|
+
/* @__PURE__ */Y("div",{className:"col-start-1 row-start-1 flex min-h-(--row-height-window-bar) flex-col justify-center border-b border-line py-2 pl-6 pr-4",children:[G&&/* @__PURE__ */B("h2",{id:te,className:x,children:G}),Q&&/* @__PURE__ */B("p",{id:P,className:`${G?"mt-1 ":""}${v}`,children:Q})]}):G&&/* @__PURE__ */B("h2",{id:te,className:`${re?"col-start-1 row-start-1 ":S?"pr-8 ":""}${x}`,children:G}),!ee&&Q&&/* @__PURE__ */B("p",{id:P,className:`${re?"col-start-1 ":""}${G?"mt-1":S&&!re?"pr-8":""} ${v}`.trim(),children:Q}),J&&/* @__PURE__ */B("div",{id:q,className:ee?"col-span-2 row-start-2 min-h-0 overflow-auto":(re?"col-span-2 ":"")+"mt-2 text-sm text-gray-600",children:J}),U&&/* @__PURE__ */B("div",{className:ee?"col-span-2 row-start-3 flex flex-wrap justify-end gap-3 border-t border-line px-6 py-4":(re?"col-span-2 ":"")+"mt-6 flex flex-wrap justify-end gap-3",children:U}),re?
|
|
6
|
+
/* @__PURE__ */Y("div",{className:"col-start-2 row-start-1 flex items-center gap-1 "+(ee?(le?"border-b border-line ":"")+"pr-3":"-mr-3 -mt-3 self-start"),children:[_,S&&/* @__PURE__ */B(c,{onClose:ne})]}):S&&/* @__PURE__ */B(c,{onClose:ne,className:"absolute right-3 top-3"})]})})]})}),ie)]})}export{D as Dialog};
|
package/dist/data/DataTable.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{DataTable as default}from"../chunk-
|
|
2
|
+
export{DataTable as default}from"../chunk-2RLWGWOU.js";import"../chunk-CGZBDI6C.js";import"../chunk-Q2RNFBYS.js";import"../chunk-R2VKEMZH.js";import"../chunk-G3TC2GIA.js";import"../chunk-AJPQJ7TC.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-TAHHZGRH.js";import"../chunk-KEFNQEXZ.js";import"../chunk-PU2GJVMG.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-NRHG4R2Q.js";import"../chunk-C3QOHMR6.js";
|
package/dist/data/EntityList.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{EntityList as default}from"../chunk-
|
|
2
|
+
export{EntityList as default}from"../chunk-PWERFHOU.js";import"../chunk-XYVFJLAU.js";import"../chunk-ATMJ5ZPK.js";import"../chunk-G6DKCCWH.js";import"../chunk-U73K3ICC.js";import"../chunk-7OVMWXFM.js";import"../chunk-WNFZYTWW.js";import"../chunk-XGEN76DG.js";import"../chunk-ULJQYXHB.js";import"../chunk-SI26KESU.js";import"../chunk-CGZBDI6C.js";import"../chunk-4PJFL26P.js";import"../chunk-F3ZOO23R.js";import"../chunk-2QY5BJLA.js";import"../chunk-UGTRSRIW.js";import"../chunk-POBVGDZP.js";import"../chunk-RTK77DMP.js";import"../chunk-URHGHXDN.js";import"../chunk-5QFPTDQF.js";import"../chunk-MEP6CZJ3.js";import"../chunk-IVEM2BPC.js";import"../chunk-ISVODSRP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-G3TC2GIA.js";import"../chunk-AJPQJ7TC.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-TAHHZGRH.js";import"../chunk-KEFNQEXZ.js";import"../chunk-PU2GJVMG.js";import"../chunk-STKJA4PV.js";import"../chunk-I2NVBDKH.js";import"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-NRHG4R2Q.js";import"../chunk-C3QOHMR6.js";
|
package/dist/data/Gantt.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{Gantt as default}from"../chunk-
|
|
2
|
+
export{Gantt as default}from"../chunk-SP4S4HUJ.js";import"../chunk-ALZHFQRX.js";import"../chunk-EFKJLUYP.js";import"../chunk-NHKT5IH6.js";import"../chunk-36BRD5J3.js";import"../chunk-JRQMX4PK.js";import"../chunk-LF27WIN2.js";import"../chunk-R2VKEMZH.js";import"../chunk-AJPQJ7TC.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-TAHHZGRH.js";import"../chunk-KEFNQEXZ.js";import"../chunk-PU2GJVMG.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-NRHG4R2Q.js";import"../chunk-C3QOHMR6.js";
|
package/dist/data/Kanban.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{Kanban as default}from"../chunk-
|
|
2
|
+
export{Kanban as default}from"../chunk-MXRF5YVN.js";import"../chunk-R2VKEMZH.js";import"../chunk-KEFNQEXZ.js";import"../chunk-PU2GJVMG.js";import"../chunk-MRJKZWWV.js";import"../chunk-NRHG4R2Q.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ListLoadError as default}from"../chunk-
|
|
1
|
+
export{ListLoadError as default}from"../chunk-7OVMWXFM.js";import"../chunk-MEP6CZJ3.js";import"../chunk-IVEM2BPC.js";import"../chunk-ISVODSRP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-AJPQJ7TC.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-TAHHZGRH.js";import"../chunk-KEFNQEXZ.js";import"../chunk-PU2GJVMG.js";import"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-NRHG4R2Q.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{ResizableTable as default}from"../chunk-
|
|
2
|
+
export{ResizableTable as default}from"../chunk-WNFZYTWW.js";import"../chunk-XGEN76DG.js";import"../chunk-ULJQYXHB.js";import"../chunk-SI26KESU.js";import"../chunk-2QY5BJLA.js";import"../chunk-UGTRSRIW.js";import"../chunk-POBVGDZP.js";import"../chunk-ISVODSRP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-G3TC2GIA.js";import"../chunk-AJPQJ7TC.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-TAHHZGRH.js";import"../chunk-KEFNQEXZ.js";import"../chunk-PU2GJVMG.js";import"../chunk-STKJA4PV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-NRHG4R2Q.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{BADGE_X,CELL_X,statusColumn}from"../chunk-
|
|
1
|
+
export{BADGE_X,CELL_X,statusColumn}from"../chunk-WBUAO7T7.js";import"../chunk-LH7IKIGE.js";import"../chunk-UVCMV2TL.js";import"../chunk-AW7TOB6N.js";import"../chunk-EDRELF6L.js";import"../chunk-G3TC2GIA.js";import"../chunk-AJPQJ7TC.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-TAHHZGRH.js";import"../chunk-KEFNQEXZ.js";import"../chunk-PU2GJVMG.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{useColumnConfig}from"../chunk-
|
|
2
|
+
export{useColumnConfig}from"../chunk-XGEN76DG.js";import"../chunk-ULJQYXHB.js";import"../chunk-POBVGDZP.js";import"../chunk-KEFNQEXZ.js";import"../chunk-PU2GJVMG.js";import"../chunk-STKJA4PV.js";
|
package/dist/data/useSort.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{useSort}from"../chunk-
|
|
2
|
+
export{useSort}from"../chunk-22SVN2ZM.js";import"../chunk-ULJQYXHB.js";import"../chunk-POBVGDZP.js";import"../chunk-KEFNQEXZ.js";import"../chunk-PU2GJVMG.js";import"../chunk-STKJA4PV.js";
|
package/dist/format/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{slugify}from"../chunk-24AL3CDS.js";import{ENTRANCE_ATTR as t}from"../chunk-ZSEB7XW4.js";export{ENTRANCE_ATTR,ENTRANCE_DELAY_VAR,ENTRANCE_DURATION_VAR,ENTRANCE_FROM,ENTRANCE_FROM_ATTR,ENTRANCE_FROM_DEFAULT,ENTRANCE_KINDS,ENTRANCE_KINDS_WITH_FROM,ENTRANCE_STATE_ATTR,armEntrance,entranceAttrs,playEntrance,readEntrance}from"../chunk-ZSEB7XW4.js";export{HOVER_MOTION,MOTION_EASING,MOTION_GROUPS,MOTION_TIMING,motionSeconds,rotateDegrees}from"../chunk-AIJ3G6BD.js";export{hexWithAlpha,mixHex,rgbToHex}from"../chunk-CJSZW3OS.js";export{addShowWhenFacts,isShown,lazyShowWhenContext,showWhenFactReaders,showWhenFactsContext,showWhenOf,shownForOption,truthy,withRowRules,withRowsShownWhen,withShowWhen,withShowWhenFacts}from"../chunk-HCP7WOAL.js";export{gridColumnCount}from"../chunk-VNNVG4NR.js";export{
|
|
1
|
+
export{slugify}from"../chunk-24AL3CDS.js";import{ENTRANCE_ATTR as t}from"../chunk-ZSEB7XW4.js";export{ENTRANCE_ATTR,ENTRANCE_DELAY_VAR,ENTRANCE_DURATION_VAR,ENTRANCE_FROM,ENTRANCE_FROM_ATTR,ENTRANCE_FROM_DEFAULT,ENTRANCE_KINDS,ENTRANCE_KINDS_WITH_FROM,ENTRANCE_STATE_ATTR,armEntrance,entranceAttrs,playEntrance,readEntrance}from"../chunk-ZSEB7XW4.js";export{HOVER_MOTION,MOTION_EASING,MOTION_GROUPS,MOTION_TIMING,motionSeconds,rotateDegrees}from"../chunk-AIJ3G6BD.js";export{hexWithAlpha,mixHex,rgbToHex}from"../chunk-CJSZW3OS.js";export{addShowWhenFacts,isShown,lazyShowWhenContext,showWhenFactReaders,showWhenFactsContext,showWhenOf,shownForOption,truthy,withRowRules,withRowsShownWhen,withShowWhen,withShowWhenFacts}from"../chunk-HCP7WOAL.js";export{gridColumnCount}from"../chunk-VNNVG4NR.js";export{BORDER_LINE_STYLES}from"../chunk-NOMWJTN2.js";export{contrastRatio,hexToRgb,parseHexColor,readableInk,relativeLuminance}from"../chunk-S6OB6HJB.js";export{FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,focalFromRect,formatFocal,nudgeFocal,parseFocal}from"../chunk-25RR3GQW.js";export{escapeHtml}from"../chunk-G6DKCCWH.js";export{currencyDecimals,currencySymbol,formatBytes,formatMoney,setCurrencyFormats,timeAgo}from"../chunk-OJI4ROSD.js";export{DATE_FORMAT_OPTIONS,TZ_AUTO,dayKeyInZone,formatDate,formatDateTime,formatTime,getUserDateFormat,getUserTimezone,instantOnDayKey,knownZone,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile,userToday,userZone}from"../chunk-NHKT5IH6.js";export{EMPTY_VALUE}from"../chunk-36BRD5J3.js";export{fromDateKey,toDateKey}from"../chunk-JRQMX4PK.js";import"../chunk-LF27WIN2.js";export{ROOT_THEME_ATTRIBUTES,rootIsDark,watchRootTheme}from"../chunk-LNXBTK7Q.js";var e=["none","zoom-in","zoom-out","fade-in","fade-out","move-up","move-down","reveal","parallax"],o=["zoom-in","zoom-out"],n=(t,e,o,n)=>({default:t,min:e,max:o,step:n}),r=n(30,0,100,10),i=n(0,0,100,5),s=n(100,0,100,5),a=n(2,0,4,.5),m="data-motion-scroll",u="data-motion-pin",c="data-motion-pin-frame",l="data-motion-pin-above",f="--motion-zoom",h="--motion-origin",p="--motion-scroll-start",d="--motion-scroll-end",T="--motion-p",N="--motion-pin-on",E="--motion-pin-top",y="--motion-pin-length",R="--motion-pin-position",S="--motion-pin-stick",A="--motion-pin-track-position",g="--motion-pin-above-z",w=["track","stick"],x=/^\s*-?\d+(\.\d+)?\s*$/;function O(t,e){const o="number"==typeof e?e:"string"==typeof e&&x.test(e)?Number(e):Number.NaN;if(!Number.isFinite(o))return t.default;const n=Math.min(t.max,Math.max(t.min,o)),r=Math.round(Number((n/t.step).toFixed(6)));return Number((r*t.step).toFixed(3))}function F(t,o,n,a){const m=e.includes(t)?t:"none",u=O(i,n),c=O(s,a);return{effect:m,zoom:O(r,o),start:Math.min(u,c),end:Math.max(u,c)}}function _(t,e){if("none"===t.effect)return{attrs:{},style:{}};const n={};var r;return r=t.effect,o.includes(r)&&(n[f]=String(Number((1+t.zoom/100).toFixed(3))),e&&(n[h]=e)),t.start!==i.default&&(n[p]=String(t.start)),t.end!==s.default&&(n[d]=String(t.end)),{attrs:{[m]:t.effect},style:n}}function k(t,e){return{on:!0===t,length:O(a,e)}}function C(t){return t?{[S]:"1",[A]:"sticky"}:{[S]:"0",[A]:"relative"}}function v(t,e="track",o={}){if(!t.on)return{attrs:{},style:{}};const n=!0===o.above?{[l]:""}:{};if("stick"===e)return{attrs:{[u]:"stick",...n},style:{}};const r=t.length===a.default?{}:{[y]:String(t.length)};return{attrs:{[u]:"",...n},style:!0===o.stick?{...r,...C(!0)}:r}}function D(t,e,o,n){let r;if(e){const t=e.length*e.vh;r=t>0?((e.stop??0)-e.top)/t:1}else r=(t.vh-t.top)/(t.vh+t.height);const i=o/100,s=n/100,a=s>i?(r-i)/(s-i):r>=s?1:0;return Math.min(1,Math.max(0,Number(a.toFixed(4))))}var I=(t,e)=>{const o=Number.parseFloat(t);return Number.isFinite(o)?o:e};function M(e=document){const o=()=>{};if("undefined"==typeof window||"undefined"==typeof CSS)return o;if(CSS.supports("animation-timeline: view()"))return o;let n=0;const r=()=>{n=0;const o=window.innerHeight||document.documentElement.clientHeight,r=[];for(const n of e.querySelectorAll(`[${m}]`)){if(n.hasAttribute(t))continue;const e=getComputedStyle(n),m=n.closest(`[${u}]:not([${u}="stick"])`),l=m?getComputedStyle(m):null,f=!!l&&(0===I(l.getPropertyValue(N),1)||0!==I(l.getPropertyValue(S),0)),h=b(f&&m?m:n,o),T=m?.querySelector(`[${c}]`),E=m&&!f?{...b(m,o),length:I(l.getPropertyValue(y),a.default),stop:T?I(getComputedStyle(T).top,0):0}:null;r.push({el:n,p:D({top:h.top,height:h.height,vh:o},E,I(e.getPropertyValue(p),i.default),I(e.getPropertyValue(d),s.default))})}for(const{el:t,p:e}of r)t.style.setProperty(T,String(e))},l=()=>{n||(n=requestAnimationFrame(r))};return r(),window.addEventListener("scroll",l,{passive:!0}),window.addEventListener("resize",l,{passive:!0}),()=>{n&&cancelAnimationFrame(n),window.removeEventListener("scroll",l),window.removeEventListener("resize",l)}}function b(t,e,o=("undefined"==typeof window?0:window.scrollY)){let n=0;for(let e=t;e;e=e.offsetParent)n+=e.offsetTop;return{top:n-o,height:t.offsetHeight,vh:e}}var L=["none","nextImage","rotate","zoom","lift","mono"];function W(t){return L.filter(e=>t.includes(e))}export{L as HOVER_KINDS,l as PIN_ABOVE_ATTR,g as PIN_ABOVE_Z_VAR,u as PIN_ATTR,w as PIN_FORMS,c as PIN_FRAME_ATTR,a as PIN_LENGTH,y as PIN_LENGTH_VAR,N as PIN_ON_VAR,R as PIN_POSITION_VAR,S as PIN_STICK_VAR,E as PIN_TOP_VAR,A as PIN_TRACK_POSITION_VAR,m as SCROLL_ATTR,e as SCROLL_EFFECTS,o as SCROLL_EFFECTS_WITH_ZOOM,s as SCROLL_END,d as SCROLL_END_VAR,h as SCROLL_ORIGIN_VAR,T as SCROLL_PROGRESS_VAR,i as SCROLL_START,p as SCROLL_START_VAR,r as SCROLL_ZOOM,f as SCROLL_ZOOM_VAR,M as armScrollProgress,W as hoverKindsOf,b as layoutBox,v as pinAttrs,C as pinStickVars,k as readPin,F as readScroll,_ as scrollAttrs,D as scrollProgress};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{AlignmentGrid as default}from"../chunk-
|
|
2
|
+
export{AlignmentGrid as default}from"../chunk-MKHOXO5O.js";import"../chunk-IVEM2BPC.js";import"../chunk-AJPQJ7TC.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-TAHHZGRH.js";import"../chunk-KEFNQEXZ.js";import"../chunk-PU2GJVMG.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{borderSides,borderStartEach,BorderInput as default}from"../chunk-
|
|
2
|
+
export{borderSides,borderStartEach,BorderInput as default}from"../chunk-REFPTKRD.js";import"../chunk-3ZJAQSFS.js";import"../chunk-AZZ4NO2D.js";import"../chunk-VUBDHFG5.js";import"../chunk-I7WAOKU2.js";import"../chunk-GVAVIYE6.js";import"../chunk-X3LMTOMA.js";import"../chunk-2NMW66P5.js";export{BORDER_LINE_STYLES}from"../chunk-NOMWJTN2.js";import"../chunk-S6OB6HJB.js";import"../chunk-AYZY3YNC.js";import"../chunk-M5IZ7QLQ.js";import"../chunk-XNKNX5L3.js";import"../chunk-DWGYC7OD.js";import"../chunk-MYH5H43C.js";import"../chunk-RTK77DMP.js";import"../chunk-URHGHXDN.js";import"../chunk-5QFPTDQF.js";import"../chunk-IVEM2BPC.js";import"../chunk-ISVODSRP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-BWJZTHZ6.js";import"../chunk-AJPQJ7TC.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-TAHHZGRH.js";import"../chunk-KEFNQEXZ.js";import"../chunk-PU2GJVMG.js";import"../chunk-UQYNPYF4.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-NRHG4R2Q.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{BrandAssetEditor as default}from"../chunk-
|
|
2
|
+
export{BrandAssetEditor as default}from"../chunk-PTLVNC3V.js";import"../chunk-Y6FULJWJ.js";import"../chunk-CUJ537IY.js";import"../chunk-6KBDNYRW.js";import"../chunk-MI67DI3H.js";import"../chunk-25RR3GQW.js";import"../chunk-ALZHFQRX.js";import"../chunk-EFKJLUYP.js";import"../chunk-MPC3CHAO.js";import"../chunk-ION3XGLN.js";import"../chunk-TNGIXSTM.js";import"../chunk-EDRELF6L.js";import"../chunk-MEP6CZJ3.js";import"../chunk-IVEM2BPC.js";import"../chunk-ISVODSRP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-G3TC2GIA.js";import"../chunk-AJPQJ7TC.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-TAHHZGRH.js";import"../chunk-KEFNQEXZ.js";import"../chunk-PU2GJVMG.js";import"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-NRHG4R2Q.js";import"../chunk-C3QOHMR6.js";
|
package/dist/forms/Button.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{Button_default as default}from"../chunk-
|
|
2
|
+
export{Button_default as default}from"../chunk-MEP6CZJ3.js";import"../chunk-IVEM2BPC.js";import"../chunk-R2VKEMZH.js";import"../chunk-AJPQJ7TC.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-TAHHZGRH.js";import"../chunk-KEFNQEXZ.js";import"../chunk-PU2GJVMG.js";import"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";
|