efficient-shell 15.2.0 → 15.3.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 +10 -0
- package/dist/{Browser-42QAXKYW.js → Browser-SJKIWRIF.js} +19 -19
- package/dist/Calculator-NS2NGCHN.js +29 -0
- package/dist/{CurrencyConverter-VFTDSYQ3.js → CurrencyConverter-ES5SWCOZ.js} +9 -9
- package/dist/{Files-OAVWF6EW.js → Files-KM3OX5LC.js} +76 -76
- package/dist/{Notepad-LNNSVEFG.js → Notepad-VZ2Y3NAY.js} +9 -9
- package/dist/PdfViewer-AIAVQYZ6.js +1 -0
- package/dist/PomodoroTimer-BRSRBMEG.js +91 -0
- package/dist/{Preview-GDNUQKGN.js → Preview-YWS265UV.js} +24 -24
- package/dist/Sidebar-KAALEIIX.js +44 -0
- package/dist/{Stock-NNDDNQBJ.js → Stock-GMWRXTKR.js} +2 -2
- package/dist/{Weather-NGQALCXO.js → Weather-QSQ2TZKG.js} +17 -17
- package/dist/{WorldClock-LX4BQPZJ.js → WorldClock-YPP2KHIV.js} +7 -7
- package/dist/ai/index.js +42 -42
- 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/brand.css +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-ZC2FZLYX.js → chunk-345FP3IX.js} +4 -4
- package/dist/chunk-35Q7ZMQD.js +8 -0
- package/dist/{chunk-ZYWLX5EK.js → chunk-3AVXNZY5.js} +1 -1
- package/dist/chunk-3FININUU.js +1 -0
- package/dist/chunk-3H476JWK.js +4 -0
- package/dist/{chunk-TWSROAS7.js → chunk-4MDSZSLC.js} +1 -1
- package/dist/{chunk-DXTRHNP4.js → chunk-4NTAZLT3.js} +2 -2
- package/dist/{chunk-TVMDDQJP.js → chunk-52RSW6TO.js} +1 -1
- package/dist/{chunk-26I3OTGP.js → chunk-5B7CLXHC.js} +1 -1
- package/dist/{chunk-MDGM5NUO.js → chunk-5CGGHE2O.js} +9 -9
- package/dist/{chunk-SXNT73VT.js → chunk-5LB7LCEG.js} +19 -19
- package/dist/{chunk-CMC25URA.js → chunk-5LG6TOV6.js} +6 -6
- package/dist/{chunk-IIUFCTT6.js → chunk-5OXQ5M5S.js} +1 -1
- package/dist/{chunk-AVUH35GW.js → chunk-5QHNDAZ6.js} +1 -1
- package/dist/{chunk-52YTUQW3.js → chunk-5QRHQCRG.js} +1 -1
- package/dist/{chunk-T43ATI2N.js → chunk-5RCKE4X2.js} +6 -6
- package/dist/{chunk-LFGJUJRZ.js → chunk-5Y2JZL3I.js} +13 -13
- package/dist/{chunk-QIAJ3QNV.js → chunk-62UNBUTU.js} +1 -1
- package/dist/{chunk-NBV3XK3Q.js → chunk-7533CPNQ.js} +3 -3
- package/dist/{chunk-HBAATSUS.js → chunk-75NYUMNV.js} +1 -1
- package/dist/{chunk-BMZL5BHA.js → chunk-A3RD7AQ2.js} +1 -1
- package/dist/chunk-A4ROXNUF.js +2 -0
- package/dist/{chunk-2QUACZ6O.js → chunk-A7GOVTCI.js} +1 -1
- package/dist/{chunk-PAD65HG7.js → chunk-ABIWAS5K.js} +1 -1
- package/dist/{chunk-3TVMQCYR.js → chunk-AKEED2BC.js} +1 -1
- package/dist/chunk-APFDZ2HG.js +1 -0
- package/dist/{chunk-S3F2TY7X.js → chunk-ASNRA3ZL.js} +1 -1
- package/dist/chunk-B36ZROD7.js +8 -0
- package/dist/{chunk-QI2LJ7OL.js → chunk-B4Y5NGHR.js} +9 -9
- package/dist/{chunk-ZZKBCNK6.js → chunk-BTMZ5MUY.js} +11 -11
- package/dist/{chunk-NXPIX7NO.js → chunk-C75ICYHF.js} +1 -1
- package/dist/{chunk-JJ5W4BRW.js → chunk-CGX2IGQO.js} +1 -1
- package/dist/{chunk-HKXP3JJ5.js → chunk-CHWZGSYG.js} +1 -1
- package/dist/{chunk-2MUZFHZW.js → chunk-CIZAUBWA.js} +6 -6
- package/dist/{chunk-5JQCWXIQ.js → chunk-CMEPDSYB.js} +1 -1
- package/dist/{chunk-JHEHW5BE.js → chunk-D7MRZZVV.js} +3 -3
- package/dist/chunk-DEV3ZHPP.js +8 -0
- package/dist/chunk-DVKOVZJ2.js +13 -0
- package/dist/{chunk-7ZJ7VK2N.js → chunk-EJ5NIA42.js} +1 -1
- package/dist/{chunk-M5JEYZ3A.js → chunk-EJMCK7E3.js} +4 -4
- package/dist/{chunk-GBCLIWUQ.js → chunk-EULBBS5L.js} +1 -1
- package/dist/{chunk-7FYTL6SD.js → chunk-FAPZFMS3.js} +1 -1
- package/dist/chunk-FGP2IOFN.js +15 -0
- package/dist/{chunk-ABRCV7DQ.js → chunk-FHTL7ZZR.js} +1 -1
- package/dist/{chunk-JVITCC65.js → chunk-GGLS6JZ3.js} +1 -1
- package/dist/{chunk-KWBYE5MN.js → chunk-GGNQEZ2D.js} +8 -8
- package/dist/chunk-GML6FVPA.js +6 -0
- package/dist/{chunk-VQ3OSYTA.js → chunk-GUOAPXUY.js} +4 -4
- package/dist/{chunk-IJWRJPX6.js → chunk-HU5FTTW2.js} +7 -7
- package/dist/{chunk-SKPAIZSC.js → chunk-INQQUAIO.js} +4 -4
- package/dist/{chunk-ZQWKVLSY.js → chunk-JGN27L4Q.js} +12 -12
- package/dist/{chunk-BN37AISA.js → chunk-JIHDUZJZ.js} +3 -3
- package/dist/chunk-JRKD7SD3.js +24 -0
- package/dist/{chunk-FYHUCRLU.js → chunk-JWS77LQE.js} +1 -1
- package/dist/{chunk-6F3XQJR6.js → chunk-KERCZSIA.js} +1 -1
- package/dist/{chunk-ECZEJ6BE.js → chunk-KIIZNION.js} +6 -6
- package/dist/{chunk-L664TIIV.js → chunk-KJ4CHRRC.js} +7 -7
- package/dist/{chunk-HMTZP7NJ.js → chunk-KTI4ZJVX.js} +1 -1
- package/dist/{chunk-VIBGF2HJ.js → chunk-L2WQOJ3T.js} +1 -1
- package/dist/{chunk-3CIJFWB4.js → chunk-LFUXWZV7.js} +1 -1
- package/dist/{chunk-OCKOZV46.js → chunk-LGVVXYW7.js} +1 -1
- package/dist/{chunk-ZS36DB4X.js → chunk-MF7OELXP.js} +2 -2
- package/dist/{chunk-OCITNQGF.js → chunk-MQNSKFZY.js} +10 -10
- package/dist/{chunk-M6ODRWTM.js → chunk-NJY4HPNB.js} +5 -5
- package/dist/{chunk-QBR73AJX.js → chunk-OEWBWKKD.js} +11 -11
- package/dist/chunk-OHPDB4UN.js +14 -0
- package/dist/{chunk-LKNDLXL3.js → chunk-OHWP24DL.js} +1 -1
- package/dist/{chunk-VNKLIWNQ.js → chunk-OK2J6WSC.js} +1 -1
- package/dist/{chunk-3HPCQMYH.js → chunk-P56YLT73.js} +12 -12
- package/dist/{chunk-VTYALYW4.js → chunk-PCNFY6EK.js} +12 -12
- package/dist/{chunk-FM5ASDVN.js → chunk-PM6HY5BH.js} +1 -1
- package/dist/{chunk-ABAUJLI4.js → chunk-PO2KNVCC.js} +1 -1
- package/dist/chunk-PRN2QDX6.js +7 -0
- package/dist/{chunk-7M7GKYHS.js → chunk-QE2F4YQQ.js} +9 -9
- package/dist/chunk-QGWUZAG7.js +28 -0
- package/dist/{chunk-QJY52ZHG.js → chunk-QSFQTMWV.js} +1 -1
- package/dist/{chunk-YVI2XJCB.js → chunk-QSOBETAI.js} +5 -5
- package/dist/chunk-QXEZBS3H.js +6 -0
- package/dist/{chunk-32HTOZFT.js → chunk-QYOIS4BN.js} +3 -3
- package/dist/chunk-R6YVKP6D.js +3 -0
- package/dist/chunk-R72SBGYR.js +9 -0
- package/dist/{chunk-QMUW35QL.js → chunk-RIA6KKIB.js} +6 -6
- package/dist/{chunk-D3L2QCGF.js → chunk-RTZFWH5U.js} +1 -1
- package/dist/{chunk-HVWRF7N4.js → chunk-S6C7X6CR.js} +19 -19
- package/dist/{chunk-7T6NWAPG.js → chunk-SJUEGYT2.js} +1 -1
- package/dist/chunk-T5TKMIV2.js +1 -0
- package/dist/{chunk-JE4BGFDJ.js → chunk-TAB3K2WF.js} +1 -1
- package/dist/{chunk-4H4HJIWI.js → chunk-TAIH2VIW.js} +1 -1
- package/dist/{chunk-NTVACRKD.js → chunk-TALQMTCE.js} +3 -3
- package/dist/{chunk-KKZXGWSX.js → chunk-TEYG2W7A.js} +2 -2
- package/dist/{chunk-FZZBBZXZ.js → chunk-TMXMIRWG.js} +8 -8
- package/dist/{chunk-J43RRDEP.js → chunk-TSZPGDU3.js} +1 -1
- package/dist/{chunk-T65TAQLW.js → chunk-TXGVSWH6.js} +13 -13
- package/dist/{chunk-UA7SWROJ.js → chunk-U7PA4KNZ.js} +3 -3
- package/dist/{chunk-2M3KB4RH.js → chunk-UYM7562M.js} +2 -2
- package/dist/{chunk-JFTLFF52.js → chunk-V62FEHS4.js} +3 -3
- package/dist/{chunk-QQ6TGD7K.js → chunk-VANF2TL3.js} +47 -47
- package/dist/{chunk-PYGXSGXC.js → chunk-VB4ZPIZF.js} +1 -1
- package/dist/{chunk-K3OLOLFT.js → chunk-VHBRVW5O.js} +3 -3
- package/dist/chunk-W7HTHKN2.js +19 -0
- package/dist/{chunk-5R25GNE2.js → chunk-WNHDYTTI.js} +2 -2
- package/dist/{chunk-WHHHECBC.js → chunk-WSQ73CRR.js} +2 -2
- package/dist/{chunk-M4NT6HGJ.js → chunk-YEDAXZYO.js} +1 -1
- package/dist/{chunk-ILH7RDAD.js → chunk-YGNJIOOH.js} +10 -10
- package/dist/{chunk-C5Q4AKXO.js → chunk-YXMXATYP.js} +1 -1
- package/dist/{chunk-OEZC5N6J.js → chunk-ZVKUOJNS.js} +1 -1
- package/dist/data/DataTable.js +1 -1
- package/dist/data/EntityList.js +1 -1
- package/dist/data/Gantt.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/ListToolbar.js +1 -1
- package/dist/data/ResizableTable.js +1 -1
- package/dist/data/statusColumn.js +1 -1
- package/dist/forms/AlignmentGrid.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Button.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DatePicker.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/IconButton.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/Input.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.js +1 -1
- package/dist/forms/NumericKeypad.js +1 -1
- package/dist/forms/PictureTiles.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/RenameField.js +1 -1
- package/dist/forms/SearchInput.js +1 -1
- package/dist/forms/Segmented.js +1 -1
- package/dist/forms/Select.d.ts +6 -5
- package/dist/forms/Select.js +1 -1
- package/dist/forms/SidesInput.js +1 -1
- package/dist/forms/Slider.js +1 -1
- package/dist/forms/Snippet.js +1 -1
- package/dist/forms/SplitButton.js +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/UnitMenu.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +381 -381
- package/dist/map/index.js +5 -5
- package/dist/optionItems-Cxd85rTy.d.ts +26 -0
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/routine-index.json +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContextMenu.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/DropdownMenu.js +1 -1
- package/dist/shell/EditableGrid.js +1 -1
- package/dist/shell/FloatingBar.js +1 -1
- package/dist/shell/GlobalSearch.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/IconRail.js +1 -1
- package/dist/shell/ImageLightbox.js +1 -1
- package/dist/shell/ItemCount.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/Popover.js +1 -1
- package/dist/shell/PopupMenu.js +1 -1
- package/dist/shell/ResizeHandle.js +1 -1
- package/dist/shell/SearchableSelect.d.ts +3 -9
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/SidebarNav.js +1 -1
- package/dist/shell/SortableList.js +1 -1
- package/dist/shell/StatusBadge.js +1 -1
- package/dist/shell/Tabs.js +1 -1
- package/dist/shell/Tooltip.js +1 -1
- package/dist/shell/TopNav.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/discardGuard.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/AuthScreen.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DashboardTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/ErrorBoundary.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.js +1 -1
- package/dist/ui.css +0 -1
- package/dist/value-index.json +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-C7APPCLE.js +0 -29
- package/dist/PdfViewer-ADPTYOAO.js +0 -1
- package/dist/PomodoroTimer-AGSHX2JO.js +0 -91
- package/dist/Sidebar-SWLVNJ6L.js +0 -44
- package/dist/chunk-7QFXUNFA.js +0 -8
- package/dist/chunk-7YJBWOQG.js +0 -2
- package/dist/chunk-CIT4YPEO.js +0 -8
- package/dist/chunk-DTZDOXK3.js +0 -19
- package/dist/chunk-EQDYCSUX.js +0 -13
- package/dist/chunk-IBPJJO4N.js +0 -28
- package/dist/chunk-K5YT5PMJ.js +0 -5
- package/dist/chunk-M6T7N4SN.js +0 -14
- package/dist/chunk-MQERW3QR.js +0 -3
- package/dist/chunk-NJJG2VAW.js +0 -24
- package/dist/chunk-QVGASI5H.js +0 -9
- package/dist/chunk-QZYV4TDD.js +0 -1
- package/dist/chunk-S6IW2F4J.js +0 -8
- package/dist/chunk-TB7BO2XS.js +0 -6
- package/dist/chunk-UMLXFQVC.js +0 -1
- package/dist/chunk-XQMVECQM.js +0 -15
- package/dist/chunk-YX4QGW7Z.js +0 -4
- package/dist/chunk-Z2MP46QJ.js +0 -1
- package/dist/chunk-ZUQ72WER.js +0 -7
- /package/dist/{chunk-LPQQNPH5.js → chunk-TEQ5ZPAL.js} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{ColoredBadge as e}from"./chunk-
|
|
1
|
+
import{ColoredBadge as e}from"./chunk-L2WQOJ3T.js";import{Button_default as n}from"./chunk-A4ROXNUF.js";import{useShellStrings as i}from"./chunk-NRHG4R2Q.js";import{useId as t}from"react";import{jsx as m,jsxs as a}from"react/jsx-runtime";function s({items:s,heading:l,emptyText:r,className:c=""}){const o=i().media,d=t();return s.length?/* @__PURE__ */a("div",{className:c||void 0,children:[
|
|
2
2
|
/* @__PURE__ */m("p",{id:d,className:"text-xs font-medium text-ink-faint",children:l??o.usedIn(s.length)}),
|
|
3
3
|
/* @__PURE__ */m("ul",{"aria-labelledby":d,className:"mt-2 flex flex-col gap-1",children:s.map(i=>/* @__PURE__ */a("li",{className:"flex min-w-0 items-center gap-2 text-sm",children:[null!=i.kind&&/* @__PURE__ */m(e,{size:"xs",className:"flex-none",children:i.kind}),i.onOpen?/* @__PURE__ */m(n,{variant:"link",size:"sm",onClick:i.onOpen,className:"min-w-0 text-left",children:i.name}):/* @__PURE__ */m("span",{className:"min-w-0 break-words text-ink",children:i.name})]},i.key))})]}):/* @__PURE__ */m("p",{className:`text-sm text-ink-faint ${c}`.trim(),children:r??o.notUsed})}export{s as MediaUsedInList};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useInsideTooltip as e,Tooltip as n}from"./chunk-
|
|
1
|
+
import{useInsideTooltip as e,Tooltip as n}from"./chunk-CIZAUBWA.js";import{useRef as r,useState as t}from"react";import{jsx as c}from"react/jsx-runtime";var i="whitespace-nowrap";function l({children:i}){const l=e(),o=r(null),[a,s]=t(!1),m=/* @__PURE__ */c("span",{ref:o,className:"min-w-0 truncate",onMouseEnter:()=>{const e=o.current;s(!!e&&e.scrollWidth>e.clientWidth+1)},children:i});return l?m:/* @__PURE__ */c(n,{content:a?i:null,describe:!1,className:"relative inline-flex min-w-0 max-w-full",children:m})}export{l as OneLineLabel,i as TH_ONE_LINE};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import{AccessibleTable as e}from"./chunk-RTZFWH5U.js";import{polygonPoints as t}from"./chunk-VFC6QUEN.js";import{ChartDefs as r,maskId as l}from"./chunk-465RRWBY.js";import{useHighlight as a}from"./chunk-CNYAHYE6.js";import{angleScale as o}from"./chunk-2JWPNR2U.js";import{ChartTooltip as n}from"./chunk-WDQI3FV6.js";import{CHART_INK as i,resolveSeriesColorWithin as s}from"./chunk-TZFACUMR.js";import{useShellStrings as m,useShellLocale as c}from"./chunk-NRHG4R2Q.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{useId as p,useState as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";var k=3,g=e=>`${e.map(([e,t],r)=>`${0===r?"M":"L"}${e.toFixed(2)},${t.toFixed(2)}`).join(" ")} Z`;function x({axes:k,series:x,size:y=300,mode:b="area",grid:v="polygon",rings:M=4,formatValue:N,animate:j=!0,className:W,emptyLabel:$}){const F=m().charts,R=c(),C=N??(e=>h(e,R)),w=$??F.nothingToCompare,A=p(),[H,L]=u(null),{highlighted:Q}=a(),T=x;if(k.length<3||0===T.length)/* @__PURE__ */
|
|
2
|
+
return d("p",{className:`text-sm text-gray-500 ${W??""}`,children:w});const U=y/2,z=y/2,E=y/2-46,V=o(k.length),Y=k.map((e,t)=>null!=e.max&&Number.isFinite(e.max)&&e.max>0?e.max:Math.max(1,...T.map(e=>e.values[t]??0).filter(Number.isFinite))),Z=(e,t)=>{const r=Math.max(0,Math.min(1,t/Y[e])),l=V.center(e)-V.step/2;return[U+E*r*Math.cos(l),z+E*r*Math.sin(l)]},B=(e,t)=>null!==H?H!==e:null!==Q&&Q!==t,O=null!==H?T[H]:void 0;/* @__PURE__ */
|
|
3
|
+
return f("div",{className:`relative ${W??""}`,children:[
|
|
4
|
+
/* @__PURE__ */f("svg",{width:"100%",height:y,viewBox:`0 0 ${y} ${y}`,role:"img","aria-labelledby":A,onMouseLeave:()=>L(null),children:[
|
|
5
|
+
/* @__PURE__ */d("title",{id:A,children:F.acrossMeasures(T.map(e=>e.label),k.length)}),Array.from({length:M},(e,r)=>{const l=E*(r+1)/M;return"circle"===v?/* @__PURE__ */d("circle",{cx:U,cy:z,r:l,fill:"none",stroke:i.grid,strokeWidth:1},r):/* @__PURE__ */d("path",{d:g(t(U,z,l,k.length)),fill:"none",stroke:i.grid,strokeWidth:1},r)}),k.map((e,t)=>{const[r,l]=Z(t,Y[t]);/* @__PURE__ */
|
|
6
|
+
return f("g",{children:[
|
|
7
|
+
/* @__PURE__ */d("line",{x1:U,y1:z,x2:r,y2:l,stroke:i.grid,strokeWidth:1}),
|
|
8
|
+
/* @__PURE__ */d("text",{x:U+(E+18)*Math.cos(V.center(t)-V.step/2),y:z+(E+18)*Math.sin(V.center(t)-V.step/2)+4,textAnchor:"middle",fontSize:11,fill:i.label,children:e.label})]},e.key)}),
|
|
9
|
+
/* @__PURE__ */d(r,{id:A,reveal:!!j&&"center-out"}),T.map((e,t)=>{const r=s(t,3,e.color,e.tone),a=k.map((t,r)=>Z(r,e.values[r]??0));/* @__PURE__ */
|
|
10
|
+
return f("g",{opacity:B(t,e.key)?.3:1,onMouseEnter:()=>L(t),mask:j?`url(#${l(A)})`:void 0,children:["area"===b&&/* @__PURE__ */d("path",{d:g(a),fill:r,fillOpacity:.18,stroke:"none"}),
|
|
11
|
+
/* @__PURE__ */d("path",{d:g(a),fill:"none",stroke:r,strokeWidth:2,strokeLinejoin:"round"}),a.map(([e,t],l)=>/* @__PURE__ */d("circle",{cx:e,cy:t,r:3.5,fill:r,stroke:i.surface,strokeWidth:1.5},l))]},e.key)})]}),O&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:O.label,rows:k.map((e,t)=>({key:e.key,label:e.label,color:s(H,3,O.color,O.tone),value:C(O.values[t]??0)}))})}),
|
|
12
|
+
/* @__PURE__ */d("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:T.map((e,t)=>/* @__PURE__ */f("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
|
|
13
|
+
/* @__PURE__ */d("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:s(t,3,e.color,e.tone)}}),
|
|
14
|
+
/* @__PURE__ */d("span",{className:"flex-1 truncate",children:e.label})]},e.key))}),
|
|
15
|
+
/* @__PURE__ */d(e,{caption:F.acrossMeasures(T.map(e=>e.label),k.length),head:[F.tableSeries,...k.map(e=>e.label)],rows:T.map(e=>[e.label,...k.map((t,r)=>C(e.values[r]??0))])})]})}export{k as RADAR_SERIES_CAP,x as RadarChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{DropdownMenu as e}from"./chunk-
|
|
1
|
+
import{DropdownMenu as e}from"./chunk-NJY4HPNB.js";import{Fragment as t}from"react";import{jsxs as a,jsx as r,Fragment as n}from"react/jsx-runtime";var i="relative inline-flex items-center gap-2 px-4 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-40",s="bg-blue-50 text-blue-600",l="text-gray-600 hover:bg-gray-50 hover:text-gray-900";function c(){/* @__PURE__ */
|
|
2
2
|
return r("span",{className:"my-3 w-px shrink-0 bg-gray-200","aria-hidden":!0})}function m({item:e,active:t,caret:i}){/* @__PURE__ */
|
|
3
3
|
return a(n,{children:[e.icon&&/* @__PURE__ */r("span",{className:"h-4 w-4 shrink-0",children:e.icon}),
|
|
4
4
|
/* @__PURE__ */r("span",{className:"whitespace-nowrap",children:e.label}),null!=e.badge&&/* @__PURE__ */r("span",{className:"ml-0.5 inline-flex min-w-[1.25rem] items-center justify-center rounded-full bg-gray-100 px-2 text-2xs font-semibold leading-5 text-gray-600",children:e.badge}),i&&/* @__PURE__ */r("span",{className:"-ml-1 text-xs","aria-hidden":!0,children:"▾"}),t&&/* @__PURE__ */r("span",{className:"absolute inset-x-2 -bottom-px h-0.5 rounded-full bg-blue-600","aria-hidden":!0})]})}function d({items:n,activeKey:d,onSelect:o,brand:u,actions:b,linkAs:h,className:g}){/* @__PURE__ */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{client_default as a}from"./chunk-
|
|
1
|
+
import{client_default as a}from"./chunk-VANF2TL3.js";var t=()=>a.get("/auth/numbering-configs/").then(a=>a.data?.results??a.data??[]),e="uploaded:wallpaper";function r(a,t){return"string"!=typeof a||!a||"none"===a||a.startsWith("#")?"":a===e?t||"":a}var l=()=>a.get("/auth/me/wallpaper/").then(a=>a.data),n=(t,e)=>{const r=new FormData;r.append("wallpaper",t);const l=e?{onUploadProgress:a=>e(a.total?Math.round(a.loaded/a.total*100):null)}:void 0;return a.post("/auth/me/wallpaper/",r,l).then(a=>a.data)},p=()=>a.delete("/auth/me/wallpaper/").then(a=>a.data);function o(a){const t=a?.response?.status,e=a?.response?.data,r=Array.isArray(e?.wallpaper)?e.wallpaper[0]:void 0;return r||(413===t?"That picture is too large to use as a wallpaper.":415===t?"That file is not a picture this can use as a wallpaper.":"The wallpaper could not be saved. Please try again.")}export{e as WALLPAPER_PREF_TOKEN,p as deleteWallpaper,t as getNumberingConfigs,l as getWallpaper,n as uploadWallpaper,r as wallpaperSrc,o as wallpaperUploadError};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{Calendar as e}from"./chunk-PPHGBEJA.js";import{inputClasses as r,PLACEHOLDER_INK as t}from"./chunk-AYZY3YNC.js";import{calendarNames as a,userToday as n}from"./chunk-NHKT5IH6.js";import{fromDateKey as i,toDateKey as o}from"./chunk-JRQMX4PK.js";import{Icon as l}from"./chunk-ISVODSRP.js";import{onOverlayOpen as s}from"./chunk-PGN5ME7B.js";import{createShellPortal as d}from"./chunk-
|
|
2
|
-
return N("input",{ref:Z,type:"date",lang:ae,id:
|
|
1
|
+
import{Calendar as e}from"./chunk-PPHGBEJA.js";import{inputClasses as r,PLACEHOLDER_INK as t}from"./chunk-AYZY3YNC.js";import{calendarNames as a,userToday as n}from"./chunk-NHKT5IH6.js";import{fromDateKey as i,toDateKey as o}from"./chunk-JRQMX4PK.js";import{Icon as l}from"./chunk-ISVODSRP.js";import{onOverlayOpen as s}from"./chunk-PGN5ME7B.js";import{createShellPortal as d}from"./chunk-5QRHQCRG.js";import{Z_LAYERS as u}from"./chunk-62LW225J.js";import{useDropdownPosition as c}from"./chunk-TAHHZGRH.js";import{useBrowserLayoutEffect as m}from"./chunk-PU2GJVMG.js";import{registerModalEscapeInterceptor as p}from"./chunk-TWVUQUUD.js";import{useShellStrings as f,useShellLocale as b}from"./chunk-NRHG4R2Q.js";import{forwardRef as h,useState as v,useRef as g,useId as y,useEffect as x}from"react";import{jsx as N,jsxs as k}from"react/jsx-runtime";var j=/^\d{4}-\d{2}-\d{2}$/,w=/^(aria|data)-/,H=/* @__PURE__ */new Set(["aria-invalid","aria-required"]);function R(e){if(null==e||""===e)return"";if(e instanceof Date)return Number.isNaN(e.getTime())?"":o(e);if(j.test(e))return e;const r=new Date(e);return Number.isNaN(r.getTime())?"":o(r)}function C(e,r){const t=i(e);return t?r.longDate(t.getFullYear(),t.getMonth(),t.getDate()):""}var D=h(function({value:o,onChange:h,min:j,max:D,invalid:F,size:G,native:P,weekStartsOn:$,className:B="","aria-label":E,"aria-describedby":I,"aria-labelledby":S,id:q,name:O,disabled:Q,placeholder:T,required:W,clearable:z,form:J,title:M,tabIndex:U,autoFocus:Y,onFocus:A,onBlur:L,formatDisplay:V,...K},Z){const X=z??!W,_=R(o),ee=R(j),re=R(D),te=f().datePicker,ae=b(),ne=a(ae),[ie,oe]=v(!1),le=g(null),se=g(null),de=g(null),ue=y(),ce=y(),me=y(),pe=c(se,ie,{popupRef:de}),[fe,be]=v(!1);m(()=>{const e=!!q&&(se.current?.labels?.length??0)>0;e!==fe&&be(e)});const he=!E&&(!!S||fe);if(x(()=>{if(!ie)return;const e=e=>{const r=e.target;le.current?.contains(r)||de.current?.contains(r)||oe(!1)};document.addEventListener("pointerdown",e,!0);const r=s(()=>oe(!1));return()=>{document.removeEventListener("pointerdown",e,!0),r()}},[ie]),x(()=>{if(ie)return p(e=>"Escape"===e.key&&(oe(!1),se.current?.focus(),!0),()=>de.current)},[ie]),P)/* @__PURE__ */
|
|
2
|
+
return N("input",{ref:Z,type:"date",lang:ae,id:q,name:O,disabled:Q,"aria-label":E,"aria-describedby":I,"aria-invalid":F||void 0,value:_,min:ee||void 0,max:re||void 0,onChange:e=>h?.(i(e.target.value)),className:r({invalid:F,size:G,className:B}),"aria-labelledby":S,required:W,form:J,title:M,tabIndex:U,autoFocus:Y,onFocus:A,onBlur:L,...K});const ve=Object.fromEntries(Object.entries(K).filter(([e])=>w.test(e)&&!H.has(e))),ge=K["aria-required"],ye=!!W||!0===ge||"true"===ge,xe=[he?ce:void 0,ye?me:void 0,I].filter(Boolean).join(" ")||void 0,Ne=n(),ke=!!Ne&&(!ee||Ne>=ee)&&(!re||Ne<=re),je=T??te.placeholder;/* @__PURE__ */
|
|
3
3
|
return k("div",{ref:le,className:"relative",children:[
|
|
4
|
-
/* @__PURE__ */N("input",{ref:Z,type:"hidden",name:
|
|
5
|
-
/* @__PURE__ */k("button",{ref:se,type:"button",...ve,id:
|
|
6
|
-
/* @__PURE__ */N("span",{className:`min-w-0 truncate whitespace-nowrap ${_?"text-ink-strongest":t}`,children:_?V?V(_):
|
|
7
|
-
/* @__PURE__ */N(l,{name:"date",className:`h-4 w-4 shrink-0 ${t}`,strokeWidth:"1.75","aria-hidden":"true"})]}),he&&/* @__PURE__ */N("span",{id:ce,className:"sr-only",children:_?
|
|
8
|
-
/* @__PURE__ */k("div",{ref:de,id:ue,role:"dialog","aria-label":
|
|
9
|
-
/* @__PURE__ */N(e,{value:_||null,min:ee||null,max:re||null,weekStartsOn
|
|
4
|
+
/* @__PURE__ */N("input",{ref:Z,type:"hidden",name:O,form:J,value:_}),
|
|
5
|
+
/* @__PURE__ */k("button",{ref:se,type:"button",...ve,id:q,disabled:Q,title:M,tabIndex:U,autoFocus:Y,onFocus:A,onBlur:L,"aria-haspopup":"dialog","aria-expanded":ie,"aria-controls":ie?ue:void 0,"aria-labelledby":S,"aria-describedby":xe,"aria-label":E?`${E}${_?`, ${C(_,ne)}`:""}`:void 0,onClick:()=>oe(e=>!e),className:`${r({invalid:F,size:G,className:B})} flex items-center justify-between gap-2 text-left`,children:[
|
|
6
|
+
/* @__PURE__ */N("span",{className:`min-w-0 truncate whitespace-nowrap ${_?"text-ink-strongest":t}`,children:_?V?V(_):C(_,ne):je}),
|
|
7
|
+
/* @__PURE__ */N(l,{name:"date",className:`h-4 w-4 shrink-0 ${t}`,strokeWidth:"1.75","aria-hidden":"true"})]}),he&&/* @__PURE__ */N("span",{id:ce,className:"sr-only",children:_?C(_,ne):je}),ye&&/* @__PURE__ */N("span",{id:me,className:"sr-only",children:te.required}),ie&&d(
|
|
8
|
+
/* @__PURE__ */k("div",{ref:de,id:ue,role:"dialog","aria-label":E??te.dialog,className:"fixed w-72 rounded-xl border border-gray-200 bg-white p-3 shadow-lg",style:{zIndex:u.popup,left:pe?.left,right:pe?.right,top:pe?.top,bottom:pe?.bottom,maxWidth:pe?.maxWidth,visibility:pe?void 0:"hidden"},children:[
|
|
9
|
+
/* @__PURE__ */N(e,{value:_||null,min:ee||null,max:re||null,weekStartsOn:$,onSelect:e=>{oe(!1),se.current?.focus(),h?.(i(e))}}),(X||ke)&&/* @__PURE__ */k("div",{className:"mt-2 flex justify-between border-t border-gray-100 pt-2",children:[X&&/* @__PURE__ */N("button",{type:"button",onClick:()=>{oe(!1),se.current?.focus(),h?.(null)},className:"rounded-(--radius-control) px-2 py-1 text-sm text-gray-500 hover:bg-gray-100 hover:text-gray-700",children:te.clear}),ke&&/* @__PURE__ */N("button",{type:"button",onClick:()=>{oe(!1),se.current?.focus(),h?.(i(Ne))},className:"ml-auto rounded-(--radius-control) px-2 py-1 text-sm font-medium text-blue-600 hover:bg-blue-50",children:te.today})]})]}),document.body)]})});export{D as DatePicker_default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{PopupMenuDivider as n}from"./chunk-P56YLT73.js";import{Icon as t}from"./chunk-ISVODSRP.js";import{jsxs as e,jsx as o}from"react/jsx-runtime";var r=n=>Array.isArray(n.options),i=n=>Boolean(n.hideHeading)&&0===n.options.length;function s(n){const t=[];for(const e of n)r(e)?t.push(...e.options):t.push(e);return t}function a(n,t){const e=[];for(const o of n){if(!r(o)){t(o)&&e.push(o);continue}const n=o.options.filter(t);n.length&&e.push({...o,options:n})}return e}function u(t,s,a,u=""){const l=[];let c=0;return t.forEach((t,p)=>{if(!r(t))return l.push(s(t,c)),void(c+=1);if(t.hideHeading){if(i(t))return;const r=c>0,u=c;return c+=t.options.length,void l.push(
|
|
2
|
+
/* @__PURE__ */e("div",{role:"group","aria-label":t.label,children:[r&&/* @__PURE__ */o("div",{"aria-hidden":"true","data-option-group-divider":"",children:/* @__PURE__ */o(n,{})}),t.options.map((n,t)=>s(n,u+t))]},`${a}-group-${p}`))}const d=`${a}-group-${p}`,h=c;c+=t.options.length,l.push(
|
|
3
|
+
/* @__PURE__ */e("div",{role:"group","aria-labelledby":d,children:[
|
|
4
|
+
/* @__PURE__ */o("div",{id:d,role:"presentation","data-option-group-heading":"",className:`truncate px-3 pb-1 pt-2 text-xs font-semibold text-gray-500 ${u}`.trim(),children:t.label}),t.options.map((n,t)=>s(n,h+t))]},d))}),l}function l({selected:n}){/* @__PURE__ */
|
|
5
|
+
return o(t,{name:"check","aria-hidden":"true",className:"h-4 w-4 shrink-0 "+(n?"":"invisible"),strokeWidth:2.5})}function c(n,t){return n.label.toLowerCase().includes(t)||(n.sublabel?.toLowerCase().includes(t)??!1)}function p({children:n,grows:t=!1}){/* @__PURE__ */
|
|
6
|
+
return o("span",{className:`min-w-0 ${t?"shrink":"max-w-[45%] shrink-0"} truncate text-xs text-ink-faintest`,children:n})}export{l as OptionCheck,p as OptionSublabel,a as filterOptionItems,s as flattenOptionItems,i as groupDrawsNothing,u as groupedRows,r as isOptionGroup,c as optionMatches};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{InputNumber_default as e,stepRounding as r}from"./chunk-
|
|
2
|
-
return s("div",{id:
|
|
3
|
-
/* @__PURE__ */d("div",{className:"w-30 shrink-0",children:/* @__PURE__ */d(e,{value:v,onChange:b,min:g,max:x,step:w,...r(w),placeholder:y,prefix:/* @__PURE__ */d("span",{"data-radius-mark":"","aria-hidden":"true",children:
|
|
4
|
-
/* @__PURE__ */d("div",{ref:
|
|
1
|
+
import{InputNumber_default as e,stepRounding as r}from"./chunk-TEYG2W7A.js";import{IconButton_default as a}from"./chunk-APFDZ2HG.js";import{Icon as i}from"./chunk-ISVODSRP.js";import{Tooltip as n}from"./chunk-CIZAUBWA.js";import{useShellStrings as l}from"./chunk-NRHG4R2Q.js";import{useState as t,useRef as o}from"react";import{jsxs as s,jsx as d}from"react/jsx-runtime";var u={tl:"",tr:"rotate-90",br:"rotate-180",bl:"-rotate-90"},c=["tl","tr","bl","br"];function m({label:m,value:f,corners:p,onChange:h,radius:v=null,onRadiusChange:b,radiusLabel:k,radiusMin:g=0,radiusMax:x,radiusStep:w=1,radiusPlaceholder:y,radiusUnit:A,units:j,disabled:R=!1,disabledReason:N,id:C,className:D=""}){const I=l(),K=function(e){const r=c.map(r=>e.find(e=>e.value===r));for(const a of e){if(c.includes(a.value))continue;const e=r.findIndex(e=>void 0===e);-1===e?r.push(a):r[e]=a}return r.filter(e=>void 0!==e)}(p),[M,S]=t(0),G=o(null);/* @__PURE__ */
|
|
2
|
+
return s("div",{id:C,role:"group","aria-label":m,className:`flex min-w-0 flex-wrap items-center gap-2 ${D}`.trim(),children:[b&&
|
|
3
|
+
/* @__PURE__ */d("div",{className:"w-30 shrink-0",children:/* @__PURE__ */d(e,{value:v,onChange:b,min:g,max:x,step:w,...r(w),placeholder:y,prefix:/* @__PURE__ */d("span",{"data-radius-mark":"","aria-hidden":"true",children:I.corners.radiusMark}),suffix:A??I.corners.unit,units:j,steppers:"compact",disabled:R,"aria-label":k??I.corners.radius})}),
|
|
4
|
+
/* @__PURE__ */d("div",{ref:G,"data-corners-grid":"",className:"grid shrink-0 grid-cols-2 gap-1",onKeyDown:e=>{if(e.altKey||e.ctrlKey||e.metaKey)return;const r=Array.from(G.current?.querySelectorAll("button[data-corner]")??[]),a=r.indexOf(document.activeElement);if(-1===a)return;const i=a%2,n=Math.floor(a/2),l="ArrowRight"===e.key?2*n+1:"ArrowLeft"===e.key?2*n:"ArrowDown"===e.key?2+i:"ArrowUp"===e.key?i:null;null!==l&&(e.preventDefault(),l<r.length&&r[l].focus())},children:K.map((e,r)=>{const l=f.includes(e.value),t=R||!0===e.disabled,o=t&&(!0===e.disabled&&e.title||(R?N:void 0))||void 0,s=/* @__PURE__ */d(a,{"aria-pressed":l,"aria-label":e.label,"aria-disabled":t||void 0,disabledReason:o,"data-corner":e.value,size:"sm",tabIndex:r===M?0:-1,onFocus:()=>S(r),onClick:()=>{t||h(l?f.filter(r=>r!==e.value):[...f,e.value])},children:/* @__PURE__ */d(i,{name:"corner",strokeWidth:2,className:["h-4 w-4",u[e.value]??""].filter(Boolean).join(" ")})},e.value);return o?s:/* @__PURE__ */d(n,{content:e.title??e.label,children:s},e.value)})})]})}export{m as CornersInput};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import{buildQuerySections as e,buildEmptySections as t,flattenRows as r,DEFAULT_MAGNIFIER as n,stepIndex as a,nextGroupIndex as s,SEE_ALL_ICON as l,resultTypeKey as o}from"./chunk-HGOWQO63.js";import{useDismissPopupsOnOpen as i}from"./chunk-DBQNYJZ6.js";import{SpinnerRing as c,LoadingSpinner as d}from"./chunk-R2VKEMZH.js";import{createShellPortal as u}from"./chunk-
|
|
1
|
+
import{buildQuerySections as e,buildEmptySections as t,flattenRows as r,DEFAULT_MAGNIFIER as n,stepIndex as a,nextGroupIndex as s,SEE_ALL_ICON as l,resultTypeKey as o}from"./chunk-HGOWQO63.js";import{useDismissPopupsOnOpen as i}from"./chunk-DBQNYJZ6.js";import{SpinnerRing as c,LoadingSpinner as d}from"./chunk-R2VKEMZH.js";import{createShellPortal as u}from"./chunk-5QRHQCRG.js";import{Z_LAYERS as p}from"./chunk-62LW225J.js";import{glassStyle as m}from"./chunk-5FYDNH4Y.js";import{useShellStrings as h}from"./chunk-NRHG4R2Q.js";import{useState as f,useRef as y,useEffect as g,useMemo as x,useId as b,useCallback as k}from"react";import{jsxs as v,jsx as w}from"react/jsx-runtime";function N(e){if(Array.isArray(e))return{results:e,truncatedTypes:[]};if(e&&"object"==typeof e&&Array.isArray(e.results)){const{results:t,truncatedTypes:r}=e;return{results:t,truncatedTypes:Array.isArray(r)?r:[]}}return{results:[],truncatedTypes:[]}}var A=[];function C(e,t,r){const[n,a]=f([]),[s,l]=f(A),[o,i]=f(!1),[c,d]=f("none"),u=y(function(){let e=0,t=null;const r=()=>{e+=1,t?.abort(),t=null};return{begin:()=>{r();const n=e,a=new AbortController;return t=a,{signal:a.signal,isCurrent:()=>n===e}},cancel:r}}());g(()=>{const n=u.current;if(e.length<r||!t||0===t.length)return n.cancel(),a(e=>0===e.length?e:[]),l(A),d("none"),void i(!1);i(!0);const s=setTimeout(async()=>{const r=n.begin(),s=await async function(e,t,r){const n=await Promise.all(e.map(async e=>{try{return{failed:!1,...N(await e(t,{signal:r}))}}catch(e){const t=r.aborted||function(e){if(!e||"object"!=typeof e)return!1;const{name:t,code:r}=e;return"AbortError"===t||"CanceledError"===t||"ERR_CANCELED"===r}(e);return{failed:!t,results:[],truncatedTypes:[]}}}));return{results:n.flatMap(e=>e.results),truncatedTypes:Array.from(new Set(n.flatMap(e=>e.truncatedTypes))),failed:n.filter(e=>e.failed).length}}(t,e,r.signal);r.isCurrent()&&(a(s.results),l(s.truncatedTypes),d(0===s.failed?"none":s.failed>=t.length?"all":"some"),i(!1))},250);return()=>{clearTimeout(s),n.cancel()}},[e,t,r]);return{results:n,truncatedTypes:s,loading:o,failure:c,reset:k(()=>{u.current.cancel(),a(e=>0===e.length?e:[]),l(A),d("none"),i(!1)},[])}}var L=(e,t)=>`${e}-opt-${t}`;function E(e,t){if("seeAll"===e.kind)return l;if("action"===e.kind)return e.icon??n;if(e.icon)return e.icon;const r=t?.[o(e.result)];return r||n}function j({sections:e,activeIdx:t,listId:r,label:n,typeIcons:a,groupCount:s,groupLabel:l,onHover:o,onPick:i}){let c=0;/* @__PURE__ */
|
|
2
2
|
return w("div",{id:r,role:"listbox","aria-label":n,className:"py-1",children:e.map(e=>/* @__PURE__ */v("div",{role:"group","aria-label":l(e.title,e.count,!!e.truncated),children:[
|
|
3
3
|
/* @__PURE__ */v("div",{"aria-hidden":"true",className:"flex items-center justify-between px-4 pt-2 pb-1 text-2xs font-semibold uppercase tracking-wide text-ink-faintest",children:[
|
|
4
4
|
/* @__PURE__ */w("span",{children:e.title}),
|
|
5
5
|
/* @__PURE__ */w("span",{className:"font-medium normal-case tracking-normal",children:s(e.count,!!e.truncated)})]}),e.rows.map(e=>{const n=c++,s=n===t,l="action"===e.kind||"seeAll"===e.kind?void 0:e.badge,d="action"===e.kind||"seeAll"===e.kind?void 0:e.sub,u="seeAll"===e.kind;/* @__PURE__ */
|
|
6
|
-
return v("div",{id:
|
|
6
|
+
return v("div",{id:L(r,n),role:"option","aria-selected":s,className:"flex items-center gap-3 w-full px-4 py-3 text-left cursor-pointer transition-colors "+(s?"bg-blue-50":"hover:bg-gray-50"),onMouseDown:e=>e.preventDefault(),onClick:()=>i(e),onMouseEnter:()=>o(n),children:[
|
|
7
7
|
/* @__PURE__ */w("svg",{className:"h-4 w-4 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:/* @__PURE__ */w("path",{strokeLinecap:"round",strokeLinejoin:"round",d:E(e,a)})}),
|
|
8
8
|
/* @__PURE__ */v("div",{className:"flex-1 min-w-0",children:[
|
|
9
|
-
/* @__PURE__ */w("p",{className:"text-sm font-medium truncate "+(u?"text-blue-600":"text-gray-900"),children:e.label}),d&&/* @__PURE__ */w("p",{className:"text-xs text-gray-400 truncate",children:d})]}),l&&/* @__PURE__ */w("span",{className:"shrink-0 rounded-full bg-gray-100 px-2 py-0.5 text-3xs font-medium text-ink-faint",children:l})]},e.key)})]},e.key))})}var
|
|
10
|
-
/* @__PURE__ */v("div",{"data-global-search":"",className:"fixed inset-0 flex items-start justify-center pt-[15vh]",style:{zIndex:p.overlay},onClick:()=>
|
|
9
|
+
/* @__PURE__ */w("p",{className:"text-sm font-medium truncate "+(u?"text-blue-600":"text-gray-900"),children:e.label}),d&&/* @__PURE__ */w("p",{className:"text-xs text-gray-400 truncate",children:d})]}),l&&/* @__PURE__ */w("span",{className:"shrink-0 rounded-full bg-gray-100 px-2 py-0.5 text-3xs font-medium text-ink-faint",children:l})]},e.key)})]},e.key))})}var T="react-os-shell:open-global-search";function D(){"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(T))}function R({providers:l,typeIcons:o,typeLabels:N,listRoutes:A,placeholder:E,quickActions:D,onSelect:R,recent:I,onRecord:K,favorites:H,hotkey:M=!0}={}){const $=h().search,B=E??$.placeholder,[P,Q]=f(!1),[G,W]=f(""),[z,F]=f(0),S=y(null),{results:Y,truncatedTypes:J,loading:O,failure:V,reset:Z}=C(G,l,2);g(()=>{const e=e=>{M&&!e.defaultPrevented&&(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),Q(e=>!e)),"Escape"===e.key&&P&&Q(!1)},t=()=>Q(!0);return window.addEventListener("keydown",e),window.addEventListener(T,t),()=>{window.removeEventListener("keydown",e),window.removeEventListener(T,t)}},[P,M]),i(P);const[q,U]=f(!1);P!==q&&(U(P),P&&(W(""),F(0),Z())),g(()=>{P?setTimeout(()=>S.current?.focus(),50):W("")},[P]),g(()=>{F(0)},[Y]);const _=G.length>=2,X=x(()=>_?e(Y,D,G,$.actions,{truncatedTypes:J,listRoutes:A,typeLabels:N,seeAllLabel:$.seeAll}):t({recent:I,favorites:H,actions:D,typeLabels:N},$),[_,Y,J,A,N,D,G,I,H,$]),ee=x(()=>r(X),[X]),te=Math.min(z,Math.max(ee.length-1,0)),re=b(),ne=ee.length>0;g(()=>{P&&0!==ee.length&&document.getElementById(L(re,te))?.scrollIntoView?.({block:"nearest"})},[P,te,ee.length,re]);const ae=k(e=>{Q(!1),"action"!==e.kind?("result"!==e.kind&&"recent"!==e.kind||K?.(e.result),R?.(e.result)):e.action.onSelect()},[R,K]);return P?u(
|
|
10
|
+
/* @__PURE__ */v("div",{"data-global-search":"",className:"fixed inset-0 flex items-start justify-center pt-[15vh]",style:{zIndex:p.overlay},onClick:()=>Q(!1),children:[
|
|
11
11
|
/* @__PURE__ */w("div",{"data-global-search-backdrop":"",className:"absolute inset-0 bg-black/50 backdrop-blur-sm"}),
|
|
12
12
|
/* @__PURE__ */v("div",{className:"relative z-10 w-full max-w-xl rounded-(--radius-popup) overflow-hidden",onClick:e=>e.stopPropagation(),style:m(),children:[
|
|
13
13
|
/* @__PURE__ */v("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-gray-200",children:[
|
|
14
14
|
/* @__PURE__ */w("svg",{className:"h-5 w-5 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */w("path",{strokeLinecap:"round",strokeLinejoin:"round",d:n})}),
|
|
15
|
-
/* @__PURE__ */w("input",{ref:
|
|
15
|
+
/* @__PURE__ */w("input",{ref:S,type:"text",value:G,onChange:e=>{W(e.target.value),F(0)},onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),F(a(te,1,ee.length))):"ArrowUp"===e.key?(e.preventDefault(),F(a(te,-1,ee.length))):"Tab"===e.key&&ee.length>0?(e.preventDefault(),F(s(X.map(e=>e.rows.length),te,e.shiftKey?-1:1))):"Enter"===e.key&&ee[te]&&ae(ee[te])},placeholder:B,role:"combobox","aria-expanded":ne,"aria-controls":ne?re:void 0,"aria-activedescendant":ne?L(re,te):void 0,"aria-autocomplete":"list",className:"flex-1 text-sm bg-transparent border-0 rosh-focus-ring placeholder-gray-400"}),O&&/* @__PURE__ */w("span",{"data-global-search-spinner":"",role:"status","aria-label":$.searching,className:"flex shrink-0",children:/* @__PURE__ */w(c,{className:"h-4 w-4",ink:"text-ink-faint"})}),
|
|
16
16
|
/* @__PURE__ */w("kbd",{className:"hidden sm:inline-flex items-center rounded border border-line-strong px-2 py-0.5 text-2xs font-medium text-ink-faintest",children:$.escBadge})]}),
|
|
17
|
-
/* @__PURE__ */v("div",{className:"max-h-[50vh] overflow-y-auto",children:[O&&0===ee.length&&/* @__PURE__ */w(d,{size:"sm",padding:"py-6",label:$.searching}),!O&&"all"===
|
|
17
|
+
/* @__PURE__ */v("div",{className:"max-h-[50vh] overflow-y-auto",children:[O&&0===ee.length&&/* @__PURE__ */w(d,{size:"sm",padding:"py-6",label:$.searching}),!O&&"all"===V&&_&&/* @__PURE__ */w("div",{role:"alert",className:"px-4 py-3 text-center text-sm text-red-600",children:$.searchFailed}),!O&&_&&0===ee.length&&"all"!==V&&/* @__PURE__ */w("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:$.noResults}),ne&&/* @__PURE__ */w(j,{sections:X,activeIdx:te,listId:re,label:$.listLabel,typeIcons:o,groupCount:$.groupCount,groupLabel:$.groupLabel,onHover:F,onPick:ae}),!O&&"some"===V&&_&&/* @__PURE__ */w("div",{role:"status",className:"px-4 py-2 text-xs text-amber-600",children:$.partialFailure}),!O&&!_&&0===ee.length&&/* @__PURE__ */w("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:$.minChars(2)})]}),
|
|
18
18
|
/* @__PURE__ */v("div",{className:"flex items-center justify-between px-4 py-2 border-t border-line-subtle bg-surface-sunken text-2xs text-ink-faintest",children:[
|
|
19
19
|
/* @__PURE__ */v("div",{className:"flex items-center gap-3",children:[
|
|
20
20
|
/* @__PURE__ */v("span",{className:"flex items-center gap-1",children:[
|
|
@@ -24,4 +24,4 @@ return v("div",{id:C(r,n),role:"option","aria-selected":s,className:"flex items-
|
|
|
24
24
|
/* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:$.enterKey}),` ${$.open}`]}),X.length>1&&/* @__PURE__ */v("span",{className:"flex items-center gap-1",children:[
|
|
25
25
|
/* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:$.tabKey}),` ${$.nextGroup}`]})]}),
|
|
26
26
|
/* @__PURE__ */v("span",{className:"flex items-center gap-1",children:[
|
|
27
|
-
/* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:$.escKey}),` ${$.close}`]})]})]})]}),document.body):null}export{
|
|
27
|
+
/* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:$.escKey}),` ${$.close}`]})]})]})]}),document.body):null}export{R as GlobalSearch,D as openGlobalSearch};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-ISVODSRP.js";import{Tooltip as t}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-ISVODSRP.js";import{Tooltip as t}from"./chunk-CIZAUBWA.js";import{useShellStrings as n}from"./chunk-NRHG4R2Q.js";import{useId as i}from"react";import{jsx as a,jsxs as r}from"react/jsx-runtime";var l=['input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled]):not(.es-default-reset)",'[tabindex]:not([tabindex="-1"])'].join(", "),s=e=>l.split(", ").map(t=>`${e} ${t}`).join(", ");function o({label:o,onReset:d,changed:c=!0,view:u="desktop",detail:b,name:p,tip:m,defaultAction:h,disabled:f,className:k}){const j=n().settingView,y=i(),N=["es-default-reset"];if(c&&N.push("is-changed"),k&&N.push(k),!c&&h)return N.push("is-pressable"),/* @__PURE__ */a(t,{content:h.title,children:/* @__PURE__ */a("button",{type:"button",className:N.join(" "),"aria-label":h.title,disabled:f,onClick:h.onPress,children:h.icon})});if(!c)/* @__PURE__ */return a("span",{className:N.join(" "),"aria-hidden":"true"});const x="desktop"===u,A=p??(x?j.resetName(o):j.inheritName(o)),S=b?j.backTo(b):x?j.backToDefault:j.backToAuto,g=m??(b?j.tip(A,S):A);
|
|
2
2
|
/* @__PURE__ */
|
|
3
|
-
return r(t,{content:
|
|
4
|
-
/* @__PURE__ */a("button",{type:"button",className:N.join(" "),"aria-label":
|
|
5
|
-
/* @__PURE__ */a("span",{id:y,hidden:!0,children:
|
|
3
|
+
return r(t,{content:g,describe:!1,children:[
|
|
4
|
+
/* @__PURE__ */a("button",{type:"button",className:N.join(" "),"aria-label":A,"aria-describedby":y,disabled:f,onClick:e=>{d(),function(e){const t=e.currentTarget,n=t.closest(".es-field");let i=n?.querySelector(s(".es-field-ctl"))??n?.querySelector(s(".es-field-head"))??null,a=n?null:t.parentElement;for(let e=0;!i&&a&&e<4;e+=1,a=a.parentElement)i=[...a.querySelectorAll(l)].find(e=>e!==t&&!e.closest('[aria-hidden="true"]'))??null;i?.focus()}(e)},children:/* @__PURE__ */a(e,{name:"revert",size:15,"aria-hidden":"true"})}),
|
|
5
|
+
/* @__PURE__ */a("span",{id:y,hidden:!0,children:S})]})}export{o as SettingReset};
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import{Segmented as e}from"./chunk-
|
|
1
|
+
import{Segmented as e}from"./chunk-TALQMTCE.js";import{calendarNames as t,formatDate as n}from"./chunk-NHKT5IH6.js";import{toDateKey as r,fromDateKey as a,DAY_MS as o}from"./chunk-JRQMX4PK.js";import{LoadingSpinner as i}from"./chunk-R2VKEMZH.js";import{useBrowserLayoutEffect as s}from"./chunk-PU2GJVMG.js";import{useShellStrings as l,useShellLocale as d}from"./chunk-NRHG4R2Q.js";import{useState as c,useRef as u,useId as h,useMemo as m}from"react";import{jsx as f,Fragment as p,jsxs as b}from"react/jsx-runtime";var g={day:32,week:16,month:4},y=44;function w(e){const t="string"==typeof e?a(e.slice(0,10)):null;return t?Math.round(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())/o):null}function x(e){return new Date(e*o).toISOString().slice(0,10)}function v(e){return new Date(e*o)}function k(e){return((e+3)%7+7)%7}function N(e){return e-k(e)}function D(e){const t=v(e);return Math.round(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),1)/o)}function M(e){const t=v(e);return Math.round(Date.UTC(t.getUTCFullYear(),t.getUTCMonth()+1,1)/o)}function C(e){return Math.round(Date.UTC(v(e).getUTCFullYear(),0,1)/o)}function $(e){return Math.round(Date.UTC(v(e).getUTCFullYear()+1,0,1)/o)}var T={day:3,week:7,month:14},U={day:28,week:84,month:182};function j(e,t,n){return(e-t.startDay)*g[n]}function P(e,t,n){return j(e,t,n)+g[n]/2}function R(e,t,n,r){const a=[];let o=e.startDay;if(n(o)!==o){const n=Math.min(r(o),e.endDay);a.push({startDay:o,endDay:n,x:j(o,e,t),width:(n-o)*g[t]}),o=n}for(;o<e.endDay;){const n=Math.min(r(o),e.endDay);a.push({startDay:o,endDay:n,x:j(o,e,t),width:(n-o)*g[t]}),o=n}return a}function S(e,t,n,r){if(null===e&&null===t)return{kind:"none"};if(null===e)return{kind:"milestone",day:t,cx:j(t,n,r)+g[r]/2};const a=null===t?e:Math.min(e,t),o=null===t?e:Math.max(e,t);return{kind:"bar",startDay:a,endDay:o,x:j(a,n,r),width:(o-a+1)*g[r]}}function X(e){return"bar"===e.kind?{inX:e.x,outX:e.x+e.width}:"milestone"===e.kind?{inX:e.cx-9,outX:e.cx+9}:null}function I(e,t,n,r,a=44,o=10){let i;if(n-e>=2*o){const a=e+o;i=[[e,t],[a,t],[a,r],[n,r]]}else{const s=t+(r>=t?1:-1)*a/2,l=e+o,d=n-o;i=[[e,t],[l,t],[l,s],[d,s],[d,r],[n,r]]}return i.filter((e,t)=>0===t||e[0]!==i[t-1][0]||e[1]!==i[t-1][1])}function z(e){return e.map(([e,t],n)=>`${0===n?"M":"L"}${e} ${t}`).join(" ")}function Y(e,t,n=5){return`${e},${t} ${e-n},${t-n} ${e-n},${t+n}`}function F(e,t,n,r){if("move"===e)return{start:null===t?null:t+r,end:null===n?null:n+r};if("start"===e){if(null===t)return{start:t,end:n};const e=t+r;return{start:null===n?e:Math.min(e,n),end:n}}if(null===n)return{start:t,end:n};const a=n+r;return{start:t,end:null===t?a:Math.max(a,t)}}var H=24;function Q({rows:a,groups:o=[],dependencies:j=[],scale:Q,onScaleChange:A,onRowClick:K,onRowChange:L,readOnly:E=!1,today:W,isLoading:G=!1,emptyState:J,labelHeader:O,labelWidth:V=240,className:Z=""}){const q=l().gantt,B=d(),_=t(B),ee=!!L&&!E,[te,ne]=c(null),re=u(!1),ae=u(null),oe=h(),ie=w(W)??w(r(/* @__PURE__ */new Date)),se=m(()=>{const e=/* @__PURE__ */new Map;for(const t of a){const n=w(t.start),r=w(t.end);e.set(t.id,te&&te.id===t.id?F(te.mode,te.start,te.end,te.delta):{start:n,end:r})}return e},[a,te]),le=m(()=>{const e=[ie];for(const t of a){const n=w(t.start),r=w(t.end);null!==n&&e.push(n),null!==r&&e.push(r)}return function(e,t){const n=e.filter(e=>Number.isFinite(e)),r=n.length?Math.min(...n):0,a=n.length?Math.max(...n):0;let o=r-T[t],i=a+1+T[t];const s=U[t]-(i-o);return s>0&&(o-=Math.floor(s/2),i+=Math.ceil(s/2)),"week"===t?(o=N(o),i=N(i-1)+7):"month"===t&&(o=D(o),i=M(i-1)),{startDay:o,endDay:i}}(e,Q)},[a,Q,ie]),de=m(()=>function(e,t){return"day"===t?{major:R(e,t,D,M),minor:R(e,t,e=>e,e=>e+1)}:"week"===t?{major:R(e,t,D,M),minor:R(e,t,N,e=>N(e)+7)}:{major:R(e,t,C,$),minor:R(e,t,D,M)}}(le,Q),[le,Q]),ce=function(e,t){return(e.endDay-e.startDay)*g[t]}(le,Q),ue=m(()=>function(e,t){const n=new Set(t.map(e=>e.id)),r=/* @__PURE__ */new Map,a=[];for(const t of e)if(null!=t.groupId&&n.has(t.groupId)){const e=r.get(t.groupId)??[];e.push(t),r.set(t.groupId,e)}else a.push(t);const o=a.map(e=>({kind:"row",row:e}));for(const e of t){o.push({kind:"group",group:e});for(const t of r.get(e.id)??[])o.push({kind:"row",row:t})}return o}(a,o),[a,o]),he=m(()=>{const e=/* @__PURE__ */new Map;return ue.forEach((t,n)=>{if("row"!==t.kind)return;const r=se.get(t.row.id);e.set(t.row.id,{shape:S(r.start,r.end,le,Q),line:n})}),e},[ue,se,le,Q]),me=m(()=>{const e=[];for(const t of j){const n=he.get(t.from),r=he.get(t.to);if(!n||!r)continue;const a=X(n.shape),o=X(r.shape);if(!a||!o)continue;const i=n.line*y+22,s=r.line*y+22,l=I(a.outX,i,o.inX,s);e.push({key:`${t.from}>${t.to}`,d:z(l),head:Y(o.inX,s)})}return e},[j,he]),fe=!G&&(a.length>0||o.length>0);s(()=>{const e=ae.current;if(!e)return;const t=e.clientWidth-V;e.scrollLeft=Math.max(0,P(ie,le,Q)-t/4)},[Q,fe]);if(G)/* @__PURE__ */return f(i,{size:"sm",padding:"p-4",label:q.loading});if(!fe)/* @__PURE__ */return f(p,{children:J??/* @__PURE__ */f("div",{className:"text-sm text-ink-faint p-4",children:q.empty})});const pe=(e,t,n)=>{L?.(e.id,{start:null===t?null:x(t),end:null===n?null:x(n)})},be=(e,t,n)=>{if(re.current=!1,ee&&0===e.button){e.stopPropagation();try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}ne({id:t.id,mode:n,originX:e.clientX,start:w(t.start),end:w(t.end),delta:0})}},ge=e=>{if(!te)return;const t=function(e,t){const n=Math.round(e/g[t]);return 0===n?0:n}(e.clientX-te.originX,Q);t!==te.delta&&ne({...te,delta:t})},ye=e=>{if(te){if(0!==te.delta){const t=F(te.mode,te.start,te.end,te.delta);re.current=!0,pe(e,t.start,t.end)}ne(null)}},we=(e,t)=>{if("Enter"===e.key||" "===e.key)return e.preventDefault(),void K?.(t);if(!ee||"ArrowLeft"!==e.key&&"ArrowRight"!==e.key)return;e.preventDefault();const n="ArrowRight"===e.key?1:-1,r=F(e.shiftKey?"end":"move",w(t.start),w(t.end),n);pe(t,r.start,r.end)},xe=e=>{re.current?re.current=!1:K?.(e)},ve=e=>n(x(e),{locale:B}),ke=(e,t)=>{const n=v(e.startDay),r=n.getUTCFullYear(),a=n.getUTCMonth();return"major"===t?"month"===Q?String(r):"week"===Q?_.shortMonthYear(r,a):_.monthYear(r,a):"month"===Q?_.monthsShort[a]:String(n.getUTCDate())},Ne=ue.length*y,De=P(ie,le,Q),Me=De>=0&&De<=ce,Ce=de.minor.find(e=>e.startDay<=ie&&ie<e.endDay),$e=Ce?De-Ce.x:0,Te=!!Ce&&$e<=Ce.width/2;/* @__PURE__ */
|
|
2
2
|
return b("div",{className:`flex min-h-0 flex-col ${Z}`,children:[
|
|
3
3
|
/* @__PURE__ */b("div",{className:"flex items-center justify-end gap-2 pb-2",children:[
|
|
4
|
-
/* @__PURE__ */f("button",{type:"button",onClick:()=>{const e=ae.current;if(!e)return;const t=e.clientWidth-
|
|
5
|
-
/* @__PURE__ */f("div",{ref:ae,"data-gantt-scroller":"",className:"relative min-h-0 flex-1 overflow-auto grid-scroll rounded-(--radius-card) border border-line bg-surface",children:/* @__PURE__ */b("div",{className:"relative",style:{width:
|
|
4
|
+
/* @__PURE__ */f("button",{type:"button",onClick:()=>{const e=ae.current;if(!e)return;const t=e.clientWidth-V;e.scrollTo?.({left:Math.max(0,P(ie,le,Q)-t/4),behavior:"smooth"})},className:"min-h-8 rounded-(--radius-control) border border-line bg-surface px-3 text-xs font-medium text-ink hover:bg-row-hover",children:q.today}),A&&/* @__PURE__ */f(e,{size:"sm",label:q.scale,value:Q,onChange:A,options:[{value:"day",label:q.day},{value:"week",label:q.week},{value:"month",label:q.month}]})]}),
|
|
5
|
+
/* @__PURE__ */f("div",{ref:ae,"data-gantt-scroller":"",className:"relative min-h-0 flex-1 overflow-auto grid-scroll rounded-(--radius-card) border border-line bg-surface",children:/* @__PURE__ */b("div",{className:"relative",style:{width:V+ce,minHeight:48+Ne},children:[
|
|
6
6
|
/* @__PURE__ */b("div",{className:"sticky top-0 z-20 flex border-b border-line bg-surface",style:{height:48},children:[
|
|
7
|
-
/* @__PURE__ */f("div",{className:"sticky left-0 z-10 flex shrink-0 items-end border-r border-line bg-surface px-3 pb-1 text-xs font-medium text-ink-muted",style:{width:
|
|
8
|
-
/* @__PURE__ */b("div",{className:"relative shrink-0",style:{width:ce},"aria-hidden":!0,children:[de.major.map(e=>/* @__PURE__ */f("div",{className:"absolute top-0 border-l border-line-subtle text-xs font-medium leading-6 text-ink",style:{left:e.x,width:e.width,height:H},children:/* @__PURE__ */f("span",{className:"sticky inline-block whitespace-nowrap px-2",style:{left:
|
|
7
|
+
/* @__PURE__ */f("div",{className:"sticky left-0 z-10 flex shrink-0 items-end border-r border-line bg-surface px-3 pb-1 text-xs font-medium text-ink-muted",style:{width:V},children:O??q.task}),
|
|
8
|
+
/* @__PURE__ */b("div",{className:"relative shrink-0",style:{width:ce},"aria-hidden":!0,children:[de.major.map(e=>/* @__PURE__ */f("div",{className:"absolute top-0 border-l border-line-subtle text-xs font-medium leading-6 text-ink",style:{left:e.x,width:e.width,height:H},children:/* @__PURE__ */f("span",{className:"sticky inline-block whitespace-nowrap px-2",style:{left:V},children:ke(e,"major")})},`M${e.startDay}`)),de.minor.map(e=>/* @__PURE__ */f("div",{"data-gantt-tick":"minor",className:`absolute truncate border-l border-line-subtle text-2xs leading-6 text-ink-faint ${"day"===Q?"text-center":"px-1"} ${e.startDay===ie&&"day"===Q?"font-semibold text-danger":""}`,style:{left:e.x,width:e.width,top:H,height:H},children:ke(e,"minor")},`m${e.startDay}`)),Me&&Ce&&"day"!==Q&&
|
|
9
9
|
/* @__PURE__ */b("div",{className:"pointer-events-none absolute flex items-center text-2xs "+(Te?"":"flex-row-reverse"),style:{left:Te?Ce.x:De-(Ce.width-$e),width:2*(Te?$e:Ce.width-$e),top:H,height:H},children:[Te&&/* @__PURE__ */f("span",{className:"invisible shrink-0 whitespace-nowrap px-1",children:ke(Ce,"minor")}),
|
|
10
10
|
/* @__PURE__ */f("span",{className:"min-w-0 flex-1"}),
|
|
11
11
|
/* @__PURE__ */f("span",{"data-gantt-today-label":"",className:"shrink-0 whitespace-nowrap rounded-(--radius-control) bg-danger px-1 font-medium leading-4 text-on-accent",children:q.today}),
|
|
12
12
|
/* @__PURE__ */f("span",{className:"min-w-0 flex-1"}),Te&&/* @__PURE__ */f("span",{className:"invisible min-w-0 shrink overflow-hidden",children:/* @__PURE__ */f("span",{className:"inline-block whitespace-nowrap px-1",children:ke(Ce,"minor")})})]})]})]}),
|
|
13
|
-
/* @__PURE__ */b("div",{className:"pointer-events-none absolute",style:{left:
|
|
13
|
+
/* @__PURE__ */b("div",{className:"pointer-events-none absolute",style:{left:V,top:48,width:ce,height:Ne},"aria-hidden":!0,children:["day"===Q&&de.minor.filter(e=>k(e.startDay)>=5).map(e=>/* @__PURE__ */f("div",{className:"absolute inset-y-0 bg-surface-sunken",style:{left:e.x,width:e.width}},`w${e.startDay}`)),de.minor.map(e=>/* @__PURE__ */f("div",{className:"absolute inset-y-0 w-px bg-line-subtle",style:{left:e.x}},`g${e.startDay}`))]}),
|
|
14
14
|
/* @__PURE__ */f("div",{role:"list",children:ue.map(e=>{if("group"===e.kind)/* @__PURE__ */
|
|
15
15
|
return b("div",{role:"listitem",className:"flex",style:{height:y},children:[
|
|
16
|
-
/* @__PURE__ */f("div",{className:"sticky left-0 z-10 flex shrink-0 items-center border-r border-b border-line bg-surface-sunken px-3 text-sm font-semibold text-ink",style:{width:
|
|
16
|
+
/* @__PURE__ */f("div",{className:"sticky left-0 z-10 flex shrink-0 items-center border-r border-b border-line bg-surface-sunken px-3 text-sm font-semibold text-ink",style:{width:V},children:/* @__PURE__ */f("span",{className:"truncate",children:e.group.label})}),
|
|
17
17
|
/* @__PURE__ */f("div",{className:"shrink-0 border-b border-line-subtle",style:{width:ce}})]},`g:${e.group.id}`);const t=e.row,n=he.get(t.id).shape,r=function(e,t){return e.done?{className:"border text-ink-muted",style:{background:"var(--status-neutral-soft)",borderColor:"var(--status-neutral-line)"}}:e.tone?{className:"text-on-accent",style:{background:`var(--status-${e.tone}-solid)`}}:{className:t?"bg-identity-3":"bg-accent-fill text-on-accent"}}(t,"milestone"===n.kind),a=te?.id===t.id,o=t.done?`, ${q.done}`:"";/* @__PURE__ */
|
|
18
18
|
return b("div",{role:"listitem",className:"flex",style:{height:y},"data-gantt-row":t.id,children:[
|
|
19
|
-
/* @__PURE__ */f("div",{className:"sticky left-0 z-10 flex shrink-0 border-r border-b border-line-subtle bg-surface",style:{width:
|
|
19
|
+
/* @__PURE__ */f("div",{className:"sticky left-0 z-10 flex shrink-0 border-r border-b border-line-subtle bg-surface",style:{width:V},children:/* @__PURE__ */f("button",{type:"button",tabIndex:"none"===n.kind&&K?0:-1,onClick:()=>K?.(t),className:`flex w-full min-w-0 items-center px-3 text-left text-sm hover:bg-row-hover ${t.done?"text-ink-faint line-through":"text-ink"} ${K?"cursor-pointer":"cursor-default"}`,children:/* @__PURE__ */f("span",{className:"truncate",children:t.label})})}),
|
|
20
20
|
/* @__PURE__ */b("div",{className:"relative shrink-0 border-b border-line-subtle",style:{width:ce},children:["bar"===n.kind&&/* @__PURE__ */b(p,{children:[
|
|
21
|
-
/* @__PURE__ */f("div",{role:"button",tabIndex:0,"data-gantt-bar":t.id,"aria-label":q.barName(t.label,ve(n.startDay),ve(n.endDay))+o,"aria-describedby":ee?oe:void 0,onKeyDown:e=>we(e,t),onClick:()=>xe(t),onPointerDown:e=>be(e,t,"move"),onPointerMove:ge,onPointerUp:()=>ye(t),onPointerCancel:()=>ne(null),className:`group/bar absolute rounded-(--radius-control) shadow-sm rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${r.className} ${ee?a?"cursor-grabbing":"cursor-grab":
|
|
21
|
+
/* @__PURE__ */f("div",{role:"button",tabIndex:0,"data-gantt-bar":t.id,"aria-label":q.barName(t.label,ve(n.startDay),ve(n.endDay))+o,"aria-describedby":ee?oe:void 0,onKeyDown:e=>we(e,t),onClick:()=>xe(t),onPointerDown:e=>be(e,t,"move"),onPointerMove:ge,onPointerUp:()=>ye(t),onPointerCancel:()=>ne(null),className:`group/bar absolute rounded-(--radius-control) shadow-sm rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${r.className} ${ee?a?"cursor-grabbing":"cursor-grab":K?"cursor-pointer":""} ${a?"opacity-80":""}`,style:{...r.style,left:n.x,width:n.width,top:10,height:24,touchAction:ee?"none":void 0},children:ee&&/* @__PURE__ */b(p,{children:[
|
|
22
22
|
/* @__PURE__ */f("span",{"aria-hidden":!0,"data-gantt-handle":"start",className:"absolute inset-y-0 left-0 w-2 cursor-ew-resize rounded-l-(--radius-control) group-hover/bar:bg-scrim-soft",onPointerDown:e=>be(e,t,"start")}),
|
|
23
23
|
/* @__PURE__ */f("span",{"aria-hidden":!0,"data-gantt-handle":"end",className:"absolute inset-y-0 right-0 w-2 cursor-ew-resize rounded-r-(--radius-control) group-hover/bar:bg-scrim-soft",onPointerDown:e=>be(e,t,"end")})]})}),
|
|
24
24
|
/* @__PURE__ */f("span",{"aria-hidden":!0,className:"pointer-events-none absolute whitespace-nowrap text-xs leading-none text-ink-muted",style:{left:n.x+n.width+16,top:16},children:t.label})]}),"milestone"===n.kind&&/* @__PURE__ */b(p,{children:[
|
|
25
|
-
/* @__PURE__ */f("div",{role:"button",tabIndex:0,"data-gantt-bar":t.id,"data-gantt-milestone":"","aria-label":q.milestoneName(t.label,ve(n.day))+o,"aria-describedby":ee?oe:void 0,onKeyDown:e=>we(e,t),onClick:()=>xe(t),onPointerDown:e=>be(e,t,"move"),onPointerMove:ge,onPointerUp:()=>ye(t),onPointerCancel:()=>ne(null),className:`absolute rotate-45 rounded-sm shadow-sm rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${r.className} ${ee?a?"cursor-grabbing":"cursor-grab":
|
|
25
|
+
/* @__PURE__ */f("div",{role:"button",tabIndex:0,"data-gantt-bar":t.id,"data-gantt-milestone":"","aria-label":q.milestoneName(t.label,ve(n.day))+o,"aria-describedby":ee?oe:void 0,onKeyDown:e=>we(e,t),onClick:()=>xe(t),onPointerDown:e=>be(e,t,"move"),onPointerMove:ge,onPointerUp:()=>ye(t),onPointerCancel:()=>ne(null),className:`absolute rotate-45 rounded-sm shadow-sm rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${r.className} ${ee?a?"cursor-grabbing":"cursor-grab":K?"cursor-pointer":""}`,style:{...r.style,left:n.cx-9/Math.SQRT2,top:22-9/Math.SQRT2,width:18/Math.SQRT2,height:18/Math.SQRT2,touchAction:ee?"none":void 0}}),
|
|
26
26
|
/* @__PURE__ */f("span",{"aria-hidden":!0,className:"pointer-events-none absolute whitespace-nowrap text-xs leading-none text-ink-muted",style:{left:n.cx+9+16,top:16},children:t.label})]})]})]},t.id)})}),
|
|
27
|
-
/* @__PURE__ */f("svg",{className:"pointer-events-none absolute overflow-visible text-ink-faint",style:{left:
|
|
27
|
+
/* @__PURE__ */f("svg",{className:"pointer-events-none absolute overflow-visible text-ink-faint",style:{left:V,top:48,width:ce,height:Ne},width:ce,height:Ne,"aria-hidden":!0,children:me.map(e=>/* @__PURE__ */b("g",{"data-gantt-arrow":e.key,children:[
|
|
28
28
|
/* @__PURE__ */f("path",{d:e.d,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinejoin:"round"}),
|
|
29
|
-
/* @__PURE__ */f("polygon",{points:e.head,fill:"currentColor"})]},e.key))}),Me&&/* @__PURE__ */f("div",{"data-gantt-today":"",className:"pointer-events-none absolute z-0 w-0.5 -translate-x-1/2 bg-danger",style:{left:
|
|
29
|
+
/* @__PURE__ */f("polygon",{points:e.head,fill:"currentColor"})]},e.key))}),Me&&/* @__PURE__ */f("div",{"data-gantt-today":"",className:"pointer-events-none absolute z-0 w-0.5 -translate-x-1/2 bg-danger",style:{left:V+De,top:48,height:Ne},"aria-hidden":!0}),ee&&/* @__PURE__ */f("span",{id:oe,hidden:!0,children:q.moveHint})]})})]})}export{Q as Gantt};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{useSidebarSheet as e}from"./chunk-QWK6DRSN.js";import{resolveSeverity as t,severityWord as n}from"./chunk-TZFNWAED.js";import{ItemCount as r}from"./chunk-
|
|
1
|
+
import{useSidebarSheet as e}from"./chunk-QWK6DRSN.js";import{resolveSeverity as t,severityWord as n}from"./chunk-TZFNWAED.js";import{ItemCount as r}from"./chunk-PO2KNVCC.js";import{Icon as l}from"./chunk-ISVODSRP.js";import{useBrowserState as a}from"./chunk-KEFNQEXZ.js";import{useShellStrings as i}from"./chunk-NRHG4R2Q.js";import{useId as o,useRef as c,useEffect as s,Children as u,isValidElement as d}from"react";import{jsx as m,jsxs as h,Fragment as p}from"react/jsx-runtime";function f({children:e,count:t,countLabel:n}){return null==t?/* @__PURE__ */m("p",{className:"px-3 pb-1 pt-1 text-xs font-semibold uppercase tracking-wide text-gray-500",children:e}):/* @__PURE__ */h("p",{className:"flex items-center justify-between gap-2 px-3 pb-1 pt-1 text-xs font-semibold uppercase tracking-wide text-gray-500",children:[
|
|
2
2
|
/* @__PURE__ */m("span",{className:"min-w-0 truncate",children:e}),
|
|
3
|
-
/* @__PURE__ */m(r,{count:t,label:n,showZero:!0})]})}function b(e){return"flex min-w-0 flex-1 items-center justify-between gap-2 rounded-r-lg border-l-2 h-8 px-3 text-sm "+(e?"border-blue-500 bg-accent-tint font-medium text-blue-700":"border-line text-ink hover:bg-gray-100")}function x({label:l,count:a,countLabel:u,active:d,onClick:f,icon:x,trailing:g,severity:w,depth:k=0}){const y=t(w,"SidebarNavItem"),N=i().severity,v=y?n(y,N):void 0,j=e(),S=o(),
|
|
3
|
+
/* @__PURE__ */m(r,{count:t,label:n,showZero:!0})]})}function b(e){return"flex min-w-0 flex-1 items-center justify-between gap-2 rounded-r-lg border-l-2 h-8 px-3 text-sm "+(e?"border-blue-500 bg-accent-tint font-medium text-blue-700":"border-line text-ink hover:bg-gray-100")}function x({label:l,count:a,countLabel:u,active:d,onClick:f,icon:x,trailing:g,severity:w,depth:k=0}){const y=t(w,"SidebarNavItem"),N=i().severity,v=y?n(y,N):void 0,j=e(),S=o(),C=c(null),I=c(l);I.current=l,s(()=>{if(j&&d)return j.report(S,()=>I.current,C.current)},[j,d,S]);const E=/* @__PURE__ */h(p,{children:[null!=x&&/* @__PURE__ */m("span",{"aria-hidden":"true",className:"shrink-0 h-4 w-4",children:x}),y&&
|
|
4
4
|
/* @__PURE__ */m("span",{"aria-hidden":"true",title:v,className:`shrink-0 h-1.5 w-1.5 rounded-full ${y.fill}`}),
|
|
5
5
|
/* @__PURE__ */m("span",{className:"min-w-0 truncate mr-auto",title:"string"==typeof l?l:void 0,children:l}),y&&/* @__PURE__ */m("span",{className:"sr-only",children:v}),null!=a&&/* @__PURE__ */m(r,{count:a,label:u,active:d}),null!=g&&/* @__PURE__ */m("span",{className:"shrink-0",children:g})]});/* @__PURE__ */
|
|
6
|
-
return m("button",1===k?{ref:
|
|
6
|
+
return m("button",1===k?{ref:C,type:"button",onClick:f,className:"flex w-full pl-5 text-left",children:/* @__PURE__ */m("span",{className:b(d),children:E})}:{ref:C,type:"button",onClick:f,className:"flex w-full items-center justify-between gap-2 rounded-lg h-8 px-3 text-sm text-left "+(d?"bg-accent-tint font-medium text-blue-700":"text-ink hover:bg-gray-100"),children:E})}function g({label:e,count:t,countLabel:n,children:i,defaultExpanded:c=!0,storageKey:s}){const p=o(),[f,b]=a(()=>{if(s){let e=null;try{e=window.localStorage.getItem(s)}catch{}if("1"===e||"0"===e)return"1"===e}return c},c),x=!f&&u.toArray(i).some(e=>d(e)&&!0===e.props.active);/* @__PURE__ */
|
|
7
7
|
return h("div",{children:[
|
|
8
8
|
/* @__PURE__ */h("button",{type:"button",onClick:()=>{const e=!f;if(b(e),s)try{window.localStorage.setItem(s,e?"1":"0")}catch{}},"aria-expanded":f,"aria-controls":p,className:"flex w-full items-center gap-2 rounded-lg h-8 px-3 text-sm font-medium text-left "+(x?"bg-accent-tint text-blue-700":"text-ink-strong hover:bg-gray-100"),children:[
|
|
9
9
|
/* @__PURE__ */m("span",{className:"min-w-0 truncate",title:e,children:e}),
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import{Dialog as e}from"./chunk-5RCKE4X2.js";import{Icon as r}from"./chunk-ISVODSRP.js";import{HEADING_TEXT as n}from"./chunk-BWJZTHZ6.js";import{buttonClasses as t}from"./chunk-UQYNPYF4.js";import{useShellStrings as o,splitAround as l}from"./chunk-NRHG4R2Q.js";import{createContext as i,useContext as s,useState as c,useRef as a,useCallback as u,useEffect as d}from"react";import{jsxs as m,jsx as h,Fragment as f}from"react/jsx-runtime";var p=i(()=>Promise.resolve(!1)),g=()=>s(p),b=()=>Promise.resolve(!1),v=e=>b(e),y=()=>Promise.resolve(!1),x=e=>y(e),N=()=>Promise.resolve(null),k=e=>N(e),w={danger:{icon:"text-red-600 bg-red-100",button:t({variant:"danger"})},warning:{icon:"text-yellow-600 bg-yellow-100",button:t({variant:"warning"})},info:{icon:"text-blue-600 bg-accent-tint-strong",button:t({variant:"primary"})}},C=t({variant:"secondary"}),P=t({variant:"primary"}),L="w-full rounded-md border border-line-strong h-8 px-3 text-sm";function j(){/* @__PURE__ */
|
|
2
|
+
return h(r,{name:"warning",className:"h-5 w-5",strokeWidth:1.5,"aria-hidden":"true"})}function E({children:r}){const[t,i]=c(!1),[s,g]=c({message:""}),[v,x]=c(0),k=a(),E=a(null),F=a(0),T=a([]),$=a(null),R=a(null),D=u(e=>{E.current=e.id,k.current=e.resolve,x(e.id),g(e.options),i(!0)},[]),K=u(e=>{const r="string"==typeof e?{message:e}:e;return new Promise(e=>{const n={id:++F.current,options:r,resolve:e};null===E.current?D(n):T.current.push(n)})},[D]),[W,H]=c(!1),[Q,S]=c({message:""}),[V,Y]=c(""),Z=a(),B=u(e=>(S(e),Y(""),H(!0),new Promise(e=>{Z.current=e})),[]),[G,I]=c(!1),[J,O]=c({}),[U,X]=c(""),q=a(),z=u(e=>{const r="string"==typeof e?{message:e}:e;return O(r),X(r.defaultValue??""),I(!0),new Promise(e=>{q.current=e})},[]);d(()=>{b=K,y=B,N=z},[K,B,z]);const A=(e,r)=>{if(E.current!==e)return;const n=k.current,t=T.current.shift();t?D(t):(E.current=null,k.current=void 0,i(!1)),n?.(r)},M=e=>{H(!1),Y(""),Z.current?.(e)},_=e=>{if(e){const e=U.trim();if(!e&&!J.allowEmpty)return I(!1),void q.current?.(null);I(!1),q.current?.(e)}else I(!1),q.current?.(null)},ee=s.variant||(s.confirmLabel?.toLowerCase().includes("delete")||s.message.toLowerCase().includes("delete")?"danger":"info"),re=w[ee],ne=w["warning"===Q.variant?"warning":"danger"],te=Q.confirmWord,oe=null==te||V===te,le=o().dialog,[ie,se]=l(le.typeToConfirm);/* @__PURE__ */
|
|
3
|
+
return m(p.Provider,{value:K,children:[r,
|
|
4
|
+
/* @__PURE__ */h(e,{open:t,onClose:()=>A(v,!1),initialFocus:$,footer:/* @__PURE__ */m(f,{children:[
|
|
5
|
+
/* @__PURE__ */h("button",{ref:$,type:"button",onClick:()=>A(v,!1),className:C,children:s.cancelLabel||le.cancel}),
|
|
6
|
+
/* @__PURE__ */h("button",{type:"button",onClick:()=>A(v,!0),className:re.button,children:s.confirmLabel||le.ok})]}),children:/* @__PURE__ */m("div",{className:"flex gap-4",children:[
|
|
7
|
+
/* @__PURE__ */h("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${re.icon}`,children:/* @__PURE__ */h(j,{})}),
|
|
8
|
+
/* @__PURE__ */m("div",{className:"flex-1",children:[
|
|
9
|
+
/* @__PURE__ */h("h2",{className:n,children:s.title||le.confirmTitle}),
|
|
10
|
+
/* @__PURE__ */h("p",{className:"mt-2 text-sm text-gray-600",children:s.message})]})]})}),
|
|
11
|
+
/* @__PURE__ */h(e,{open:W,onClose:()=>M(!1),initialFocus:null!=te?void 0:R,footer:/* @__PURE__ */m(f,{children:[
|
|
12
|
+
/* @__PURE__ */h("button",{ref:R,type:"button",onClick:()=>M(!1),className:C,children:Q.cancelLabel||le.destructiveCancel}),
|
|
13
|
+
/* @__PURE__ */h("button",{type:"button",onClick:()=>M(!0),disabled:!oe,className:ne.button,children:te??Q.confirmLabel??le.destructiveConfirm})]}),children:/* @__PURE__ */m("div",{className:"flex gap-4",children:[
|
|
14
|
+
/* @__PURE__ */h("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${ne.icon}`,children:/* @__PURE__ */h(j,{})}),
|
|
15
|
+
/* @__PURE__ */m("div",{className:"flex-1",children:[
|
|
16
|
+
/* @__PURE__ */h("h2",{className:`${n} pr-6`,children:Q.title||le.destructiveTitle}),
|
|
17
|
+
/* @__PURE__ */h("p",{className:"mt-2 text-sm text-gray-600",children:Q.message}),null!=te&&/* @__PURE__ */m(f,{children:[
|
|
18
|
+
/* @__PURE__ */m("p",{className:"mt-3 text-sm text-gray-700",children:[ie,
|
|
19
|
+
/* @__PURE__ */h("kbd",{className:"rounded border border-line-strong bg-surface-sunken px-2 py-0.5 text-xs font-bold text-red-600 font-mono",children:te}),se]}),
|
|
20
|
+
/* @__PURE__ */h("input",{autoFocus:!0,type:"text",value:V,onChange:e=>Y(e.target.value),onKeyDown:e=>{"Enter"===e.key&&V===te&&M(!0)},placeholder:te,className:`mt-2 ${L} focus:border-red-500`})]})]})]})}),
|
|
21
|
+
/* @__PURE__ */m(e,{open:G,onClose:()=>_(!1),title:J.title||le.promptTitle,footer:/* @__PURE__ */m(f,{children:[
|
|
22
|
+
/* @__PURE__ */h("button",{type:"button",onClick:()=>_(!1),className:C,children:J.cancelLabel||le.cancel}),
|
|
23
|
+
/* @__PURE__ */h("button",{type:"button",onClick:()=>_(!0),disabled:!J.allowEmpty&&!U.trim(),className:P,children:J.confirmLabel||le.ok})]}),children:[J.message&&/* @__PURE__ */h("p",{className:"text-sm text-gray-600",children:J.message}),
|
|
24
|
+
/* @__PURE__ */h("input",{autoFocus:!0,type:"text",value:U,onChange:e=>X(e.target.value),onKeyDown:e=>{"Enter"===e.key?_(!0):"Escape"===e.key&&_(!1)},onFocus:e=>e.target.select(),placeholder:J.placeholder,className:`mt-3 ${L} focus:border-blue-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-accent)]`})]})]})}export{E as ConfirmProvider,v as confirm,x as confirmDestructive,k as prompt,g as useConfirm};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{SidebarLayout as e}from"./chunk-
|
|
1
|
+
import{SidebarLayout as e}from"./chunk-TMXMIRWG.js";import{Avatar as t}from"./chunk-SCNQK5NF.js";import{ItemCount as r}from"./chunk-PO2KNVCC.js";import{Button_default as a}from"./chunk-A4ROXNUF.js";import{useState as i}from"react";import{jsx as l,jsxs as n}from"react/jsx-runtime";var s=[{id:"inbox",label:"Inbox",count:12},{id:"starred",label:"Starred",count:3},{id:"sent",label:"Sent"},{id:"drafts",label:"Drafts",count:1},{id:"archive",label:"Archive"},{id:"trash",label:"Trash"}],d=[{id:1,from:"Marco Reyes",subject:"Q3 roadmap review",preview:"Sharing the deck ahead of Thursday — let me know what you think before the review.",time:"9:14",unread:!0},{id:2,from:"Priya Patel",subject:"Design handoff",preview:"The Figma file is ready for engineering. I exported every icon at 1x and 2x.",time:"8:02",unread:!0},{id:3,from:"GitHub",subject:"[acme/web] PR #482 merged",preview:"Your pull request was merged into main by the release bot after all checks passed.",time:"Yest"},{id:4,from:"Sara Lind",subject:"Lunch Friday?",preview:"A few of us are heading to the new place on 5th at noon if you want to join.",time:"Yest"}];function c(){const[c,o]=i(1),m=d.find(e=>e.id===c)??d[0];/* @__PURE__ */
|
|
2
2
|
return l("div",{className:"h-full",children:/* @__PURE__ */l(e,{side:"left",defaultWidth:200,sidebar:/* @__PURE__ */n("div",{className:"flex h-full flex-col p-2",children:[
|
|
3
3
|
/* @__PURE__ */l(a,{block:!0,className:"mb-2",children:"Compose"}),s.map((e,t)=>/* @__PURE__ */n("button",{className:"flex items-center justify-between rounded-md px-3 py-2 text-left text-sm "+(0===t?"bg-blue-50 font-medium text-blue-700":"text-gray-700 hover:bg-gray-100"),children:[
|
|
4
4
|
/* @__PURE__ */l("span",{children:e.label}),null!=e.count&&/* @__PURE__ */l(r,{count:e.count,active:0===t})]},e.id))]}),children:/* @__PURE__ */n("div",{className:"flex h-full",children:[
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{appendKey as r,backspace as a}from"./chunk-VEPVOHCV.js";import{Button_default as e}from"./chunk-
|
|
1
|
+
import{appendKey as r,backspace as a}from"./chunk-VEPVOHCV.js";import{Button_default as e}from"./chunk-A4ROXNUF.js";import{useShellStrings as n}from"./chunk-NRHG4R2Q.js";import{jsxs as i,jsx as c}from"react/jsx-runtime";var o=["1","2","3","4","5","6","7","8","9",".","0"];function l({value:l,onChange:s,onEnter:t,enterLabel:m,enterDisabled:d,className:h=""}){const p=n().keypad,u=r=>{r!==l&&s(r)};/* @__PURE__ */
|
|
2
2
|
return i("div",{className:`grid grid-cols-3 gap-3 ${h}`.trim(),children:[o.map(a=>/* @__PURE__ */c(e,{size:"touch-xl",variant:"secondary",onClick:()=>u(r(l,a)),children:a},a)),
|
|
3
3
|
/* @__PURE__ */c(e,{size:"touch-xl",variant:"secondary","aria-label":p.backspace,onClick:()=>u(a(l)),children:"⌫"}),t&&/* @__PURE__ */c(e,{size:"touch-xl",variant:"primary",className:"col-span-3",disabled:d,onClick:t,children:m??p.enter})]})}export{l as NumericKeypad};
|
|
@@ -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":
|
|
3
|
-
/* @__PURE__ */f("div",{ref:
|
|
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"}),
|
|
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=>
|
|
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-TEYG2W7A.js";import{textWidth as l}from"./chunk-UVCMV2TL.js";import{Tooltip as i}from"./chunk-CIZAUBWA.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),S=B??[...r[z]??[]],T=[...S,100-g(S)],D=P||M,K=c(null),O=c({onChange:k,shown:S,locked:D,n:z,stored:B});O.current={onChange:k,shown:S,locked:D,n:z,stored:B};const E=r=>{const{onChange:t,shown:n,locked:o,n:l}=O.current;if(o)return!1;const i=e(r,l);return!(!i||v(i,n))&&(t(i),!0)},G=(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],E(l.slice(0,-1))&&(ne.current=null)},H=e=>r=>{if(r.altKey||r.ctrlKey||r.metaKey)return;const n=r.shiftKey?10:1,o=T[e]+T[e+1],l="ArrowRight"===r.key?T[e]+n:"ArrowLeft"===r.key?T[e]-n:"PageUp"===r.key?T[e]+10:"PageDown"===r.key?T[e]-10:"Home"===r.key?t:"End"===r.key?o-t:null;null!==l&&(r.preventDefault(),G(T,e,l))},I=c(null),[L,U]=u(null),W=()=>{I.current=null,U(null),document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")};d(()=>W,[]);const V=e=>r=>{if(0!==r.button||D)return;r.preventDefault();const t=K.current?.getBoundingClientRect().width??0;t<=0||(I.current={i:e,x:r.clientX,width:t,from:T,moved:!1,pointer:r.pointerId},U(e),r.currentTarget.setPointerCapture?.(r.pointerId),document.body.style.cursor="col-resize",document.body.style.userSelect="none")},F=e=>{const r=I.current;if(!r)return;if(0===e.buttons)return void W();const t=e.clientX-r.x;if(!r.moved){if(Math.abs(t)<3)return;r.moved=!0}G(r.from,r.i,r.from[r.i]+t/r.width*100)},X=e=>{const r=I.current;r&&(e.currentTarget.hasPointerCapture?.(r.pointer)&&e.currentTarget.releasePointerCapture(r.pointer),W())},q=(e,r)=>{const{shown:n}=O.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 E(o.slice(0,-1))?o:null},[J,Q]=u(0);d(()=>{const e=K.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}=O.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=T.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,J]);const ie=j.hint(z,t),ae=T.slice(0,-1).map((e,r)=>g(T.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
|
+
/* @__PURE__ */f("div",{ref:Y,"data-widths-bar":"",className:"relative h-8",children:[
|
|
4
|
+
/* @__PURE__ */m("div",{ref:K,"data-widths-track":"",className:"flex h-full w-full overflow-hidden rounded-(--radius-control) bg-surface",children:T.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&&T.map((e,r)=>/* @__PURE__ */f(h,{children:[(()=>{const n=Z===r,l=g(T.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=>J>0&&J*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)=>{O.current.locked||null===r||oe(e,r)||q(e,r)})(r,e),onFocus:()=>{ne.current={column:r,share:e,stored:O.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":T[r],"aria-valuemin":t,"aria-valuemax":T[r]+T[r+1]-t,"aria-valuetext":j.dividerValue(r+1,T[r],r+2,T[r+1]),"aria-disabled":D||void 0,onKeyDown:D?void 0:H(r),onPointerDown:V(r),onPointerMove:F,onPointerUp:X,onPointerCancel:X,onLostPointerCapture:()=>{I.current&&W()},className:"group/widths flex h-full w-full touch-none justify-center rounded-(--radius-control) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(D?"cursor-default":"cursor-col-resize"),children:/* @__PURE__ */m("span",{"aria-hidden":"true","data-widths-line":"",className:"h-full rounded-full "+(D?`${b} bg-gray-300`:`bg-accent-fill transition-[width,background-color] duration-(--motion-fast) group-hover/widths:bg-blue-700 ${L===r?"w-1":y}`)})})})})]},r))]}),z>1&&/* @__PURE__ */m("span",{id:A,className:"sr-only",children:ie})]})}export{x as WidthsBar};
|
|
@@ -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-TALQMTCE.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-TAIH2VIW.js";import{TransferProgress as u}from"./chunk-TAB3K2WF.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 j}from"react/jsx-runtime";var N=["flex h-8 items-center justify-center rounded-(--radius-control) text-(--status-on-solid)","not-disabled:hover:bg-white/10 disabled:cursor-not-allowed disabled:opacity-60","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]"].join(" ");function w({value:w,onChange:L,onPick:R,onFile:C,label:$,hint:F,error:U,required:z,className:I,accept:P="image/*",maxSizeBytes:O,fit:T="cover",height:H,shape:S="rect",placeholder:q,cta:A,acceptHint:B,showFilename:W=!0,allowReplace:K=!0,allowRemove:V=!0,replaceLabel:D,removeLabel:G,busy:M=!1,busyLabel:Q,choosingLabel:Y,pickFailedLabel:_,progress:E,disabled:J=!1,kind:X,onKindChange:Z,focus:ee,onFocusChange:ie,focusLabel:ae}){const te=b().media,re="circle"===S,oe=H??(re?96:112),ne=A??te.cta,se=X??(/video/.test(P)&&!/image/.test(P)?"video":"image"),le="string"==typeof G&&G?G:te.remove,[ce,de]=f(!1),[ue,me]=f(!1),he=g(!0);v(()=>()=>{he.current=!1},[]);const pe=M||ce,be=ce&&!M?Y??te.choosing:Q??te.uploading,fe=U??(ue?_??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 je=J||pe,Ne=!!w&&(t(w,P)||w===ke),we=q??r(P,te),Le=D??(Ne||"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:O,acceptHint:B,multiple:!1,disabled:je,onAccept:([e])=>Re(e)}),{dragOver:$e}=Ce,Fe=()=>{je||(R?ge():Ce.open())},Ue=w?o(w):"",ze=!re&&!Ne&&!!ie,Ie=J||!K&&!V?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:[K&&/* @__PURE__ */k("button",{id:ze?void 0:ve,type:"button","aria-labelledby":`${ve}-change`,onClick:()=>Fe(),disabled:pe,className:re?`w-8 shrink-0 ${N}`:`min-w-0 flex-1 gap-1 px-2 text-sm font-medium ${N}`,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:
|
|
4
|
-
/* @__PURE__ */x(e,{value:ee??"",onChange:e=>ie?.(e),label:ae??te.focus,image:w,hint:null,id:ve,disabled:
|
|
3
|
+
/* @__PURE__ */x("span",{id:`${ve}-change`,className:re?"sr-only":"truncate",children:Le})]}),V&&/* @__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 ${N}`,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:je,className:"[&_[data-image-focus-picture]]:rounded-none [&_[data-image-focus-picture]]:border-0"}):Ne?/* @__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:T}}):/* @__PURE__ */x("img",{src:w??void 0,alt:Ue,className:"h-full w-full",style:{objectFit:T,objectPosition:ee||void 0}}),W&&!re&&w&&/* @__PURE__ */x(n,{children:Ue}),Ie,pe&&/* @__PURE__ */x(s,{label:be,progress:E,rounded:re?"rounded-full":"rounded-md"})]}),Oe=/* @__PURE__ */k(j,{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}),B&&/* @__PURE__ */x("span",{className:"text-xs text-ink-faintest",children:B})]}),Te=/* @__PURE__ */k("button",{type:"button",id:ve,onClick:()=>Fe(),disabled:je,"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",je?"cursor-not-allowed opacity-60":"cursor-pointer",c(je)].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:I,children:[Z&&/* @__PURE__ */x("div",{"data-media-kind":"",className:"mb-2",children:/* @__PURE__ */x(a,{value:se,onChange:e=>Z(e),options:[{value:"image",label:te.image,icon:/* @__PURE__ */x(p,{name:"image","aria-hidden":"true",className:"h-4 w-4"}),disabled:
|
|
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:E}):Oe})]}),He=re?Te:/* @__PURE__ */x("button",{type:"button",id:ve,onClick:()=>Fe(),disabled:je,"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,je,c(je)),style:{minHeight:oe},children:pe?/* @__PURE__ */x(u,{state:"busy",verb:be,pct:E}):/* @__PURE__ */k(j,{children:[
|
|
9
|
+
/* @__PURE__ */x("span",{className:"text-ink-faintest",children:/* @__PURE__ */x(l,{})}),Oe]})});/* @__PURE__ */
|
|
10
|
+
return k(i,{label:$,htmlFor:ve,hint:F,error:fe,required:z,className:I,children:[Z&&/* @__PURE__ */x("div",{"data-media-kind":"",className:"mb-2",children:/* @__PURE__ */x(a,{value:se,onChange:e=>Z(e),options:[{value:"image",label:te.image,icon:/* @__PURE__ */x(p,{name:"image","aria-hidden":"true",className:"h-4 w-4"}),disabled:je},{value:"video",label:te.video,icon:/* @__PURE__ */x(p,{name:"play","aria-hidden":"true",className:"h-4 w-4"}),disabled:je}],block:!0,size:"md",label:"string"==typeof $&&$?$:te.upload})}),w?Pe:He,!R&&/* @__PURE__ */x("input",{...Ce.inputProps}),
|
|
11
11
|
/* @__PURE__ */x(h,{rejections:Ce.rejections})]})}export{w as MediaUploadField};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Card as e}from"./chunk-RKSCB5BJ.js";import{Textarea_default as a}from"./chunk-PB7G6CJ7.js";import{Radio_default as l}from"./chunk-NI5FXWK5.js";import{Select_default as r}from"./chunk-
|
|
1
|
+
import{Card as e}from"./chunk-RKSCB5BJ.js";import{Textarea_default as a}from"./chunk-PB7G6CJ7.js";import{Radio_default as l}from"./chunk-NI5FXWK5.js";import{Select_default as r}from"./chunk-W7HTHKN2.js";import{FormField as n}from"./chunk-6KBDNYRW.js";import{Checkbox_default as i}from"./chunk-CGZBDI6C.js";import{Input_default as c}from"./chunk-D7MRZZVV.js";import{Button_default as o}from"./chunk-A4ROXNUF.js";import{useState as t}from"react";import{jsx as m,jsxs as d}from"react/jsx-runtime";function s(){const[s,h]=t("pro"),[u,p]=t(!0),[f,g]=t("us");/* @__PURE__ */
|
|
2
2
|
return m("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */d("form",{className:"mx-auto max-w-2xl space-y-5",onSubmit:e=>e.preventDefault(),children:[
|
|
3
3
|
/* @__PURE__ */d("div",{children:[
|
|
4
4
|
/* @__PURE__ */m("h1",{className:"text-xl font-semibold text-gray-900",children:"Account settings"}),
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{GROUP_COLORS as e,BADGE_PILL as o}from"./chunk-
|
|
1
|
+
import{GROUP_COLORS as e,BADGE_PILL as o}from"./chunk-ABIWAS5K.js";import{Icon as i}from"./chunk-ISVODSRP.js";import{OneLineLabel as r}from"./chunk-FAPZFMS3.js";import{useShellStrings as s}from"./chunk-NRHG4R2Q.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";function l({colorClass:l,tone:c,children:a,size:m="sm",capitalize:p=!1,closable:u=!1,onClose:f,closeLabel:h,className:x=""}){const d=l??e[c??"neutral"],y="xs"===m?"px-2 py-0.5 text-3xs":"md"===m?"px-3 py-0.5 text-xs":"px-2 py-0.5 text-xs",b=p?"capitalize":"",g=s().badge,j=h??("string"==typeof a?g.removeItem(a):g.remove),k="xs"===m?"h-2.5 w-2.5":"h-3 w-3";/* @__PURE__ */
|
|
2
2
|
return t("span",{className:[o,"font-medium",y,b,d,x].filter(Boolean).join(" "),children:[
|
|
3
3
|
/* @__PURE__ */n(r,{children:a}),u&&/* @__PURE__ */n("button",{type:"button",onClick:f,"aria-label":j,className:"-mr-0.5 ml-1 inline-flex shrink-0 items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-strong)]",children:/* @__PURE__ */n(i,{name:"close",look:"mini",className:k,"aria-hidden":"true"})})]})}export{l as ColoredBadge};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{layoutFlow as e}from"./chunk-FAERBT6Y.js";import{Button_default as t}from"./chunk-
|
|
1
|
+
import{layoutFlow as e}from"./chunk-FAERBT6Y.js";import{Button_default as t}from"./chunk-A4ROXNUF.js";import{Icon as n}from"./chunk-ISVODSRP.js";import{CHART_INK as r,STATUS_VARS as o,SERIES_VARS as i}from"./chunk-TZFACUMR.js";import{useMemo as l,useRef as a,useId as c}from"react";import{jsxs as d,jsx as s}from"react/jsx-runtime";var h={downloadPng:"Download PNG",downloadSvg:"Download SVG",toPdf:"Add to the PDF"},m={label:"var(--ink-strong)",note:r.label,line:r.label},f={step:i[0],decision:o.warning,start:r.muted,end:r.muted};function u(e,t){return`${(e.title??"flowchart").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"flowchart"}.${t}`}function g(e){const t=new Map(e.nodes.map(e=>[e.id,e.label]));return e.edges.map(e=>`${t.get(e.from)} to ${t.get(e.to)}${e.label?` (${e.label})`:""}`).join("; ")}function w({node:e}){const t=f[e.kind],n=e.x+e.width/2,r=e.y+e.height/2,o=e.note?[...e.lines,e.note]:e.lines,i=r-15*(o.length-1)/2,l="decision"===e.kind?/* @__PURE__ */s("polygon",{points:`${n},${e.y} ${e.x+e.width},${r} ${n},${e.y+e.height} ${e.x},${r}`}):/* @__PURE__ */s("rect",{x:e.x,y:e.y,width:e.width,height:e.height,rx:"step"===e.kind?4:e.height/2});/* @__PURE__ */
|
|
2
2
|
return d("g",{fill:t,fillOpacity:.14,stroke:t,strokeWidth:1,children:[l,o.map((t,r)=>{const l=void 0!==e.note&&r===o.length-1;/* @__PURE__ */
|
|
3
3
|
return s("text",{x:n,y:i+15*r,textAnchor:"middle",dominantBaseline:"central",fontSize:l?11:12.5,fontWeight:l?400:600,fill:l?m.note:m.label,fillOpacity:1,stroke:"none",children:t},r)})]})}function p(e){const t=e.cloneNode(!0),n=[e,...Array.from(e.querySelectorAll("*"))],r=[t,...Array.from(t.querySelectorAll("*"))],o=e.ownerDocument.defaultView;n.forEach((e,t)=>{for(const n of["fill","stroke"]){const i=e.getAttribute(n);i&&i.includes("var(")&&o&&r[t].setAttribute(n,o.getComputedStyle(e).getPropertyValue(n)||i)}});const i=o?.getComputedStyle(e).getPropertyValue("--viz-surface").trim();if(i){const n=e.ownerDocument.createElementNS("http://www.w3.org/2000/svg","rect");n.setAttribute("width","100%"),n.setAttribute("height","100%"),n.setAttribute("fill",i),t.insertBefore(n,t.firstChild)}return t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t.setAttribute("font-family","system-ui, -apple-system, Segoe UI, sans-serif"),(new XMLSerializer).serializeToString(t)}function b(e,t){const n=URL.createObjectURL(e),r=document.createElement("a");r.href=n,r.download=t,r.click(),setTimeout(()=>URL.revokeObjectURL(n),1e3)}function y({spec:r,labels:o,onToPdf:i,bare:f=!1,className:y}){const k={...h,...o},v=l(()=>e(r),[r]),x=a(null),$=r.title??"Flowchart",A=`flow-arrow-${c().replace(/:/g,"")}`;/* @__PURE__ */
|
|
4
4
|
return d("figure",{className:`my-2 ${y??""}`,children:[
|