efficient-shell 12.11.0 → 12.13.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/dist/{Browser-6O7SDMZ5.js → Browser-OFC3QRX3.js} +16 -16
- package/dist/Calculator-RP4UPGG7.js +29 -0
- package/dist/{CurrencyConverter-KBY2OXQ2.js → CurrencyConverter-HZWRB62S.js} +11 -11
- package/dist/Files-HBJGKKO2.js +141 -0
- package/dist/{Notepad-GF5GBZGV.js → Notepad-77VJ4DK4.js} +9 -9
- package/dist/{PdfViewer-L4FJS3M6.js → PdfViewer-BFP2WCMQ.js} +1 -1
- package/dist/PomodoroTimer-ME3BMHKR.js +91 -0
- package/dist/{Preview-KVV6SE3C.js → Preview-DXEYBUYC.js} +35 -35
- package/dist/{Sidebar-QOGK5LJ2.js → Sidebar-FU7TD5FQ.js} +32 -32
- package/dist/{Stock-O7AQ2WUN.js → Stock-WK45DFIC.js} +2 -2
- package/dist/{Weather-WHXA5TTP.js → Weather-BVKZQI4R.js} +15 -15
- package/dist/{WorldClock-CZCIVYKB.js → WorldClock-L3BQXXQX.js} +6 -6
- package/dist/ai/index.d.ts +1 -1
- package/dist/ai/index.js +56 -56
- package/dist/apps/index.d.ts +60 -2
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/charts/FlowChart.js +1 -1
- package/dist/charts/PieChart.js +1 -1
- package/dist/charts/RadarChart.js +1 -1
- package/dist/charts/RadialBarChart.js +1 -1
- package/dist/charts/SpecChart.js +1 -1
- package/dist/charts/TimeSeriesChart.js +1 -1
- package/dist/{chunk-VWNHSLFY.js → chunk-3FNBUOZK.js} +1 -1
- package/dist/{chunk-MPTOEXED.js → chunk-3ZQT26GZ.js} +1 -1
- package/dist/{chunk-67BWG353.js → chunk-44VAZ2EL.js} +9 -9
- package/dist/{chunk-OSQ5NRV3.js → chunk-45HQXTA6.js} +1 -1
- package/dist/{chunk-A2JYBUPB.js → chunk-4NLCXHWN.js} +6 -6
- package/dist/chunk-4WWK6FHD.js +1 -0
- package/dist/chunk-4XS4DO4T.js +2 -0
- package/dist/{chunk-2WNTDGOP.js → chunk-5EKNXSQG.js} +1 -1
- package/dist/{chunk-RLGPIJHB.js → chunk-5NCR64CE.js} +1 -1
- package/dist/chunk-5POLDDQW.js +14 -0
- package/dist/{chunk-LFWRHBTM.js → chunk-5T4WTFBC.js} +1 -1
- package/dist/{chunk-ZC6MXV4L.js → chunk-5ZQY42QX.js} +1 -1
- package/dist/{chunk-J4IT5C3A.js → chunk-654DGV5Q.js} +1 -1
- package/dist/{chunk-5YPCZLBW.js → chunk-6BNLDGST.js} +1 -1
- package/dist/{chunk-HD7OBASH.js → chunk-6TIJH2M6.js} +1 -1
- package/dist/{chunk-457SK2XV.js → chunk-6VB4TBU6.js} +5 -5
- package/dist/chunk-7ADTFFEM.js +5 -0
- package/dist/{chunk-QSK2OWT3.js → chunk-7ARBBWPQ.js} +2 -2
- package/dist/chunk-AADOAA5N.js +2 -0
- package/dist/{chunk-RAQBZUU2.js → chunk-AG6Y62TP.js} +61 -61
- package/dist/chunk-ASM2VLQ2.js +2 -0
- package/dist/{chunk-Y4YXZIES.js → chunk-AXFNOY2L.js} +9 -9
- package/dist/{chunk-J7BMSKOM.js → chunk-B7HTKDT3.js} +6 -6
- package/dist/{chunk-PHJFGLXB.js → chunk-BET6KEY2.js} +8 -8
- package/dist/{chunk-7Q4DE4CT.js → chunk-BFCIOWYI.js} +1 -1
- package/dist/{chunk-RGKSJBXJ.js → chunk-BGBSEPPH.js} +8 -8
- package/dist/{chunk-2X4U3VX2.js → chunk-BM5QI2L6.js} +5 -5
- package/dist/{chunk-HRDR56SK.js → chunk-CU3ZE25J.js} +1 -1
- package/dist/chunk-EAIHBASJ.js +28 -0
- package/dist/{chunk-2NZBQOA6.js → chunk-EAXPSAHZ.js} +9 -9
- package/dist/{chunk-22LU6FKN.js → chunk-EKDXJQIP.js} +10 -10
- package/dist/{chunk-KPHYWZXL.js → chunk-EO6MOQOZ.js} +9 -9
- package/dist/{chunk-C3E6XFIC.js → chunk-EQ2KTDOU.js} +3 -3
- package/dist/{chunk-5WCHUZ6O.js → chunk-FSZ3TNAR.js} +1 -1
- package/dist/chunk-FYNPQAFI.js +1 -0
- package/dist/{chunk-QIMMZVWV.js → chunk-GCVIUXKL.js} +1 -1
- package/dist/{chunk-KFS7WSCC.js → chunk-GFOJM52T.js} +5 -5
- package/dist/{chunk-LS6VU6F7.js → chunk-GOKJZKLV.js} +1 -1
- package/dist/{chunk-BUZ5AJLR.js → chunk-HLZJLFVR.js} +5 -5
- package/dist/chunk-HYQBYMJX.js +3 -0
- package/dist/chunk-I2DIQQOR.js +2 -0
- package/dist/{chunk-F7BXUVN4.js → chunk-I5UM6UZF.js} +5 -5
- package/dist/{chunk-Z334LCCX.js → chunk-ICZUWLVU.js} +1 -1
- package/dist/chunk-ITGFHWYG.js +13 -0
- package/dist/chunk-J2YURAQY.js +13 -0
- package/dist/chunk-J7CHHY7O.js +6 -0
- package/dist/{chunk-MTP3MBZA.js → chunk-JB3JD2XK.js} +13 -13
- package/dist/{chunk-T3NLFOLW.js → chunk-JOAKKXTL.js} +14 -6
- package/dist/{chunk-TVVSFXWY.js → chunk-JZKACEXW.js} +8 -8
- package/dist/chunk-KCAUYEYR.js +7 -0
- package/dist/{chunk-RHD4V6CE.js → chunk-LMUB2EAD.js} +9 -9
- package/dist/chunk-LRKFMR4K.js +3 -0
- package/dist/{chunk-UMZJRZFN.js → chunk-LTN4AQYG.js} +1 -1
- package/dist/{chunk-6ITEA6SX.js → chunk-LTUVKDTO.js} +1 -1
- package/dist/chunk-LZKPV3XR.js +3 -0
- package/dist/chunk-M2VCZAMQ.js +4 -0
- package/dist/{chunk-OW5LQWPU.js → chunk-MFZPTS7W.js} +2 -2
- package/dist/chunk-MLPXTFDS.js +1 -0
- package/dist/{chunk-6BK3KRT5.js → chunk-MXITMJCT.js} +16 -16
- package/dist/{chunk-PICRPJBL.js → chunk-NBUL37WB.js} +1 -1
- package/dist/{chunk-W5B7UNMJ.js → chunk-NGQZI7HP.js} +1 -1
- package/dist/{chunk-NAWIVFAN.js → chunk-NHIP2S4E.js} +8 -8
- package/dist/{chunk-RIF6BFEH.js → chunk-NOEAEXIZ.js} +1 -1
- package/dist/chunk-NORR52Z3.js +4 -0
- package/dist/chunk-OP4VQWSH.js +2 -0
- package/dist/{chunk-FOCQEWUH.js → chunk-P3GBQBDC.js} +1 -1
- package/dist/{chunk-5S4YF5XA.js → chunk-P44RCA6Z.js} +2 -2
- package/dist/chunk-P6FGTDDX.js +2 -0
- package/dist/{chunk-TDMZFQRB.js → chunk-PDCCNHTP.js} +1 -1
- package/dist/{chunk-POOPWYJL.js → chunk-Q64F2EXW.js} +6 -6
- package/dist/{chunk-UD4NESX7.js → chunk-QCOXJXGZ.js} +1 -1
- package/dist/{chunk-ICNGLA5O.js → chunk-QGFAQVUO.js} +4 -4
- package/dist/{chunk-63J2MBXV.js → chunk-QQ5XCRZM.js} +10 -10
- package/dist/{chunk-DVYIZP7X.js → chunk-QULE4LAC.js} +14 -14
- package/dist/{chunk-Q3RJMQYE.js → chunk-RAOM3WIQ.js} +1 -1
- package/dist/{chunk-M4MN2GOE.js → chunk-RKYWKMUK.js} +1 -1
- package/dist/{chunk-3RDJFCIZ.js → chunk-SEMV4NCH.js} +1 -1
- package/dist/{chunk-5Z6XJPAX.js → chunk-SWB32OKH.js} +1 -1
- package/dist/{chunk-5QVCBAK2.js → chunk-SXHNZFUY.js} +1 -1
- package/dist/chunk-SXUSAHDF.js +2 -0
- package/dist/chunk-TCMAWDBL.js +19 -0
- package/dist/{chunk-NDAZPAQL.js → chunk-TJCJLKJB.js} +1 -1
- package/dist/chunk-U35TIWEP.js +23 -0
- package/dist/{chunk-NOC4WIME.js → chunk-UYTFNR4W.js} +2 -2
- package/dist/{chunk-QBSIM4JB.js → chunk-VCNTSE3H.js} +1 -1
- package/dist/{chunk-LFW3CQMF.js → chunk-W4NVTD5Q.js} +4 -4
- package/dist/{chunk-JOD5ISTB.js → chunk-W7DYKTHE.js} +1 -1
- package/dist/{chunk-CINGDJPM.js → chunk-WMIU2VR5.js} +2 -2
- package/dist/{chunk-BJAJOIVY.js → chunk-WQV7VQ5Z.js} +1 -1
- package/dist/{chunk-VN3A43SA.js → chunk-XDJQWP5K.js} +1 -1
- package/dist/{chunk-NOCOLZ2W.js → chunk-XJW65EIG.js} +1 -1
- package/dist/{chunk-5G4CB3E6.js → chunk-Y23BITKG.js} +1 -1
- package/dist/{chunk-C7M7KYNY.js → chunk-YFDS6KF3.js} +1 -1
- package/dist/{chunk-WDAOTHX5.js → chunk-YMJOFWW6.js} +3 -3
- package/dist/{chunk-KZ7RR7EU.js → chunk-YPZXE67U.js} +1 -1
- package/dist/chunk-YYW4VNWL.js +1 -0
- package/dist/{chunk-CRRC72EE.js → chunk-ZICGXJUB.js} +7 -7
- package/dist/{chunk-IIMFLLYT.js → chunk-ZLFZJX6M.js} +9 -9
- package/dist/{chunk-OAFFHLJ4.js → chunk-ZV6WLVD3.js} +6 -6
- package/dist/data/EntityList.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/ResizableTable.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Calendar.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DatePicker.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/Input.js +1 -1
- package/dist/forms/InputNumber.d.ts +13 -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/PositionInput.js +1 -1
- package/dist/forms/RenameField.js +1 -1
- package/dist/forms/Select.d.ts +1 -1
- package/dist/forms/Select.js +1 -1
- package/dist/forms/SidesInput.js +1 -1
- package/dist/forms/Slider.js +1 -1
- package/dist/forms/Snippet.js +1 -1
- package/dist/forms/SplitButton.js +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.d.ts +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/UnitMenu.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/mediaLibraryMenu.js +1 -1
- package/dist/forms/textAlign.d.ts +1 -1
- package/dist/forms/textAlign.js +1 -1
- package/dist/icons/efficient-glyphs.d.ts +1 -0
- package/dist/icons/efficient-glyphs.js +1 -1
- package/dist/icons/efficient-looks.d.ts +2 -0
- package/dist/icons/efficient-looks.js +1 -1
- package/dist/icons/efficient-meanings.d.ts +2 -1
- package/dist/icons/efficient-meanings.js +1 -1
- package/dist/icons/efficient.d.ts +1 -0
- package/dist/icons/efficient.js +1 -1
- package/dist/icons/glyphs/AccordionIcon.d.ts +8 -0
- package/dist/icons/glyphs/AccordionIcon.js +1 -0
- package/dist/icons/glyphs/TabsIcon.js +1 -1
- package/dist/icons/index.d.ts +2 -2
- package/dist/icons/index.js +1 -1
- package/dist/icons/looks/AccordionMiniIcon.d.ts +8 -0
- package/dist/icons/looks/AccordionMiniIcon.js +1 -0
- package/dist/icons/looks/AccordionSolidIcon.d.ts +8 -0
- package/dist/icons/looks/AccordionSolidIcon.js +1 -0
- package/dist/icons/looks/TabsMiniIcon.js +1 -1
- package/dist/icons/looks/TabsSolidIcon.js +1 -1
- package/dist/icons/looks/map.js +1 -1
- package/dist/icons/payment.js +1 -1
- package/dist/icons/sets.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +192 -192
- package/dist/map/index.js +3 -3
- package/dist/markdown/index.js +1 -1
- package/dist/names-Cj_F68_V.d.ts +23 -0
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/Banner.js +1 -1
- package/dist/shell/Breadcrumbs.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/EmptyState.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/ImageLightbox.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.d.ts +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/PageHeader.js +1 -1
- package/dist/shell/PopupMenu.js +1 -1
- package/dist/shell/ProductionTimeline.js +1 -1
- package/dist/shell/Result.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/SidebarNav.js +1 -1
- package/dist/shell/SortableList.js +1 -1
- package/dist/shell/StepChain.js +1 -1
- package/dist/shell/Stepper.js +1 -1
- package/dist/shell/TopNav.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/FormLayoutPage.js +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-ALPNISJT.js +0 -29
- package/dist/Files-3NTP7YKY.js +0 -126
- package/dist/PomodoroTimer-NGQPYDI3.js +0 -91
- package/dist/chunk-3C5NKOVF.js +0 -1
- package/dist/chunk-4GTXRVDF.js +0 -3
- package/dist/chunk-5RT5XDHG.js +0 -6
- package/dist/chunk-5UZYIM2W.js +0 -2
- package/dist/chunk-6BQUSUNK.js +0 -14
- package/dist/chunk-7XGUX3TH.js +0 -3
- package/dist/chunk-AMSE4PMQ.js +0 -4
- package/dist/chunk-B6RQI2PT.js +0 -2
- package/dist/chunk-BR7L5NE3.js +0 -13
- package/dist/chunk-EHVBJUQI.js +0 -28
- package/dist/chunk-HV4VQ5XV.js +0 -13
- package/dist/chunk-INFL4YZF.js +0 -2
- package/dist/chunk-KRUI4LVW.js +0 -4
- package/dist/chunk-KVU5IQOZ.js +0 -7
- package/dist/chunk-OSNHRKX6.js +0 -5
- package/dist/chunk-PEIRPNXT.js +0 -23
- package/dist/chunk-PY7GHIYF.js +0 -19
- package/dist/chunk-PYBPJL5R.js +0 -1
- package/dist/chunk-RQ4KY6UZ.js +0 -2
- package/dist/chunk-T23TIJ4P.js +0 -1
- package/dist/chunk-TKFINWY6.js +0 -3
- package/dist/chunk-YMD2F3NL.js +0 -1
- package/dist/names-bEzx4RQ8.d.ts +0 -23
- /package/dist/{chunk-MBXCXFQO.js → chunk-27ZJQUDS.js} +0 -0
- /package/dist/{chunk-BDUWYLPI.js → chunk-NQJXHV4K.js} +0 -0
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import{Dialog as e}from"./chunk-
|
|
2
|
-
return m(t,{name:"warning",className:"h-5 w-5",strokeWidth:1.5,"aria-hidden":"true"})}function
|
|
3
|
-
return m(t,{name:"close",className:"h-5 w-5",strokeWidth:1.5,"aria-hidden":"true"})}function
|
|
4
|
-
return d(f.Provider,{value:
|
|
5
|
-
/* @__PURE__ */m(e,{open:r,onClose:()=>
|
|
6
|
-
/* @__PURE__ */m("button",{ref:
|
|
7
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>
|
|
1
|
+
import{Dialog as e}from"./chunk-7ADTFFEM.js";import{Icon as t}from"./chunk-JOAKKXTL.js";import{buttonClasses as r}from"./chunk-UQYNPYF4.js";import{useShellStrings as n,splitAround as o}from"./chunk-TJSJVC6P.js";import{createContext as l,useContext as i,useState as s,useRef as a,useCallback as c,useEffect as u}from"react";import{jsxs as d,jsx as m,Fragment as h}from"react/jsx-runtime";var f=l(()=>Promise.resolve(!1)),b=()=>i(f),g=()=>Promise.resolve(!1),p=e=>g(e),v=()=>Promise.resolve(!1),y=e=>v(e),x=()=>Promise.resolve(null),N=e=>x(e),k={danger:{icon:"text-red-600 bg-red-100",button:r({variant:"danger"})},warning:{icon:"text-yellow-600 bg-yellow-100",button:r({variant:"warning"})},info:{icon:"text-blue-600 bg-accent-tint-strong",button:r({variant:"primary"})}},w=r({variant:"secondary"}),C=r({variant:"primary"}),L="w-full rounded-md border border-line-strong h-8 px-3 text-sm";function P(){/* @__PURE__ */
|
|
2
|
+
return m(t,{name:"warning",className:"h-5 w-5",strokeWidth:1.5,"aria-hidden":"true"})}function F(){/* @__PURE__ */
|
|
3
|
+
return m(t,{name:"close",className:"h-5 w-5",strokeWidth:1.5,"aria-hidden":"true"})}function j({children:t}){const[r,l]=s(!1),[i,b]=s({message:""}),[p,y]=s(0),N=a(),j=a(null),T=a(0),E=a([]),K=a(null),$=a(null),D=c(e=>{j.current=e.id,N.current=e.resolve,y(e.id),b(e.options),l(!0)},[]),J=c(e=>{const t="string"==typeof e?{message:e}:e;return new Promise(e=>{const r={id:++T.current,options:t,resolve:e};null===j.current?D(r):E.current.push(r)})},[D]),[W,A]=s(!1),[V,Y]=s({message:""}),[M,O]=s(""),Q=a(),S=c(e=>(Y(e),O(""),A(!0),new Promise(e=>{Q.current=e})),[]),[U,X]=s(!1),[q,z]=s({}),[B,G]=s(""),H=a(),I=c(e=>{const t="string"==typeof e?{message:e}:e;return z(t),G(t.defaultValue??""),X(!0),new Promise(e=>{H.current=e})},[]);u(()=>{g=J,v=S,x=I},[J,S,I]);const R=(e,t)=>{if(j.current!==e)return;const r=N.current,n=E.current.shift();n?D(n):(j.current=null,N.current=void 0,l(!1)),r?.(t)},Z=e=>{A(!1),O(""),Q.current?.(e)},_=e=>{if(e){const e=B.trim();if(!e&&!q.allowEmpty)return X(!1),void H.current?.(null);X(!1),H.current?.(e)}else X(!1),H.current?.(null)},ee=i.variant||(i.confirmLabel?.toLowerCase().includes("delete")||i.message.toLowerCase().includes("delete")?"danger":"info"),te=k[ee],re=k["warning"===V.variant?"warning":"danger"],ne=V.confirmWord,oe=null==ne||M===ne,le=n().dialog,[ie,se]=o(le.typeToConfirm);/* @__PURE__ */
|
|
4
|
+
return d(f.Provider,{value:J,children:[t,
|
|
5
|
+
/* @__PURE__ */m(e,{open:r,onClose:()=>R(p,!1),initialFocus:K,footer:/* @__PURE__ */d(h,{children:[
|
|
6
|
+
/* @__PURE__ */m("button",{ref:K,type:"button",onClick:()=>R(p,!1),className:w,children:i.cancelLabel||le.cancel}),
|
|
7
|
+
/* @__PURE__ */m("button",{type:"button",onClick:()=>R(p,!0),className:te.button,children:i.confirmLabel||le.ok})]}),children:/* @__PURE__ */d("div",{className:"flex gap-4",children:[
|
|
8
8
|
/* @__PURE__ */m("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${te.icon}`,children:/* @__PURE__ */m(P,{})}),
|
|
9
9
|
/* @__PURE__ */d("div",{className:"flex-1",children:[
|
|
10
10
|
/* @__PURE__ */m("h2",{className:"text-base font-semibold text-gray-900",children:i.title||le.confirmTitle}),
|
|
11
11
|
/* @__PURE__ */m("p",{className:"mt-2 text-sm text-gray-600",children:i.message})]})]})}),
|
|
12
|
-
/* @__PURE__ */d(e,{open:
|
|
13
|
-
/* @__PURE__ */m("button",{ref:$,type:"button",onClick:()=>Z(!1),className:w,children:
|
|
14
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>Z(!0),disabled:!oe,className:re.button,children:ne??
|
|
15
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>Z(!1),"aria-label":le.close,className:"absolute right-4 top-4 rounded-md p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600",children:/* @__PURE__ */m(
|
|
12
|
+
/* @__PURE__ */d(e,{open:W,onClose:()=>Z(!1),initialFocus:null!=ne?void 0:$,footer:/* @__PURE__ */d(h,{children:[
|
|
13
|
+
/* @__PURE__ */m("button",{ref:$,type:"button",onClick:()=>Z(!1),className:w,children:V.cancelLabel||le.destructiveCancel}),
|
|
14
|
+
/* @__PURE__ */m("button",{type:"button",onClick:()=>Z(!0),disabled:!oe,className:re.button,children:ne??V.confirmLabel??le.destructiveConfirm})]}),children:[
|
|
15
|
+
/* @__PURE__ */m("button",{type:"button",onClick:()=>Z(!1),"aria-label":le.close,className:"absolute right-4 top-4 rounded-md p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600",children:/* @__PURE__ */m(F,{})}),
|
|
16
16
|
/* @__PURE__ */d("div",{className:"flex gap-4",children:[
|
|
17
17
|
/* @__PURE__ */m("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${re.icon}`,children:/* @__PURE__ */m(P,{})}),
|
|
18
18
|
/* @__PURE__ */d("div",{className:"flex-1",children:[
|
|
19
|
-
/* @__PURE__ */m("h2",{className:"text-base font-semibold text-gray-900 pr-6",children:
|
|
20
|
-
/* @__PURE__ */m("p",{className:"mt-2 text-sm text-gray-600",children:
|
|
19
|
+
/* @__PURE__ */m("h2",{className:"text-base font-semibold text-gray-900 pr-6",children:V.title||le.destructiveTitle}),
|
|
20
|
+
/* @__PURE__ */m("p",{className:"mt-2 text-sm text-gray-600",children:V.message}),null!=ne&&/* @__PURE__ */d(h,{children:[
|
|
21
21
|
/* @__PURE__ */d("p",{className:"mt-3 text-sm text-gray-700",children:[ie,
|
|
22
22
|
/* @__PURE__ */m("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:ne}),se]}),
|
|
23
|
-
/* @__PURE__ */m("input",{autoFocus:!0,type:"text",value:
|
|
23
|
+
/* @__PURE__ */m("input",{autoFocus:!0,type:"text",value:M,onChange:e=>O(e.target.value),onKeyDown:e=>{"Enter"===e.key&&M===ne&&Z(!0)},placeholder:ne,className:`mt-2 ${L} focus:border-red-500`})]})]})]})]}),
|
|
24
24
|
/* @__PURE__ */d(e,{open:U,onClose:()=>_(!1),title:q.title||le.promptTitle,footer:/* @__PURE__ */d(h,{children:[
|
|
25
25
|
/* @__PURE__ */m("button",{type:"button",onClick:()=>_(!1),className:w,children:q.cancelLabel||le.cancel}),
|
|
26
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>_(!0),disabled:!q.allowEmpty&&!
|
|
27
|
-
/* @__PURE__ */m("input",{autoFocus:!0,type:"text",value:
|
|
26
|
+
/* @__PURE__ */m("button",{type:"button",onClick:()=>_(!0),disabled:!q.allowEmpty&&!B.trim(),className:C,children:q.confirmLabel||le.ok})]}),children:[q.message&&/* @__PURE__ */m("p",{className:"text-sm text-gray-600",children:q.message}),
|
|
27
|
+
/* @__PURE__ */m("input",{autoFocus:!0,type:"text",value:B,onChange:e=>G(e.target.value),onKeyDown:e=>{"Enter"===e.key?_(!0):"Escape"===e.key&&_(!1)},onFocus:e=>e.target.select(),placeholder:q.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{j as ConfirmProvider,p as confirm,y as confirmDestructive,N as prompt,b as useConfirm};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Card as e}from"./chunk-BYDSBDVS.js";import{Select_default as l}from"./chunk-
|
|
1
|
+
import{Card as e}from"./chunk-BYDSBDVS.js";import{Select_default as l}from"./chunk-TCMAWDBL.js";import{FormField as a}from"./chunk-6KBDNYRW.js";import{Checkbox_default as r}from"./chunk-CGZBDI6C.js";import{Banner as i}from"./chunk-SEMV4NCH.js";import{Input_default as c}from"./chunk-CU3ZE25J.js";import{Button_default as s}from"./chunk-EVYD6UFQ.js";import{useState as d}from"react";import{jsx as n,jsxs as t}from"react/jsx-runtime";var h=[{name:"Mechanical keyboard",qty:1,price:129},{name:"USB-C cable (2m)",qty:2,price:12},{name:"Laptop stand",qty:1,price:48}];function m(){const[m,o]=d(!0),[p,u]=d("us"),y=h.reduce((e,l)=>e+l.qty*l.price,0),g=y+9;/* @__PURE__ */
|
|
2
2
|
return n("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */t("div",{className:"mx-auto max-w-5xl space-y-5",children:[
|
|
3
3
|
/* @__PURE__ */n("h1",{className:"text-xl font-semibold text-gray-900",children:"Checkout"}),
|
|
4
4
|
/* @__PURE__ */t("div",{className:"grid grid-cols-1 gap-5 lg:grid-cols-3",children:[
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-JOAKKXTL.js";import{useShellStrings as t}from"./chunk-TJSJVC6P.js";import{useState as r,useRef as o,useEffect as c,useCallback as i}from"react";import{jsx as n}from"react/jsx-runtime";function a(e){const[t,n]=r(!1),a=o(void 0);c(()=>()=>clearTimeout(a.current),[]);return{copied:t,copy:i(t=>{t?.stopPropagation(),navigator.clipboard?.writeText(e).then(()=>{n(!0),clearTimeout(a.current),a.current=setTimeout(()=>n(!1),1500)},()=>{})},[e])}}function u({copied:t,className:r="w-4 h-4"}){/* @__PURE__ */
|
|
2
2
|
return n(e,t?{name:"check",className:`${r} text-green-600`,"aria-hidden":"true"}:{name:"copy",className:r,"aria-hidden":"true"})}function m({text:e}){const{copied:r,copy:o}=a(e),c=t().copy;/* @__PURE__ */
|
|
3
3
|
return n("button",{onClick:o,title:r?c.copiedValue:c.copyValue(e),className:"shrink-0 text-gray-400 hover:text-gray-600 transition-colors",children:/* @__PURE__ */n(u,{copied:r})})}export{m as CopyButton,u as CopyGlyph,a as useCopyText};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-
|
|
2
|
-
/* @__PURE__ */u("div",{className:"flex shrink-0 flex-wrap items-center gap-1 border-b border-gray-200 bg-gray-50 px-3 py-2 text-xs",children:e})}"undefined"==typeof window||c.GlobalWorkerOptions.workerSrc||(c.GlobalWorkerOptions.workerSrc=`https://unpkg.com/pdfjs-dist@${c.version}/build/pdf.worker.min.mjs`);var g={"jbig2.wasm":new URL("pdfjs-dist/wasm/jbig2.wasm",import.meta.url).href,"openjpeg.wasm":new URL("pdfjs-dist/wasm/openjpeg.wasm",import.meta.url).href},w=class{async fetch({kind:e,filename:t}){if("wasmUrl"!==e)throw new Error(`Ensure that the \`${e}\` API parameter is provided.`);const n=g[t];if(!n)throw new Error(`No bundled pdf.js wasm module for "${t}".`);const r=await fetch(n);if(!r.ok)throw new Error(`Unable to load wasm data at: ${n}`);const a=new Uint8Array(await r.arrayBuffer());if(!function(e){return e.length>=4&&0===e[0]&&97===e[1]&&115===e[2]&&109===e[3]}(a))throw h(n,t,a);return a}};function y(e){const t=e||("undefined"!=typeof window?window.__REACT_OS_SHELL_PDF_WASM__:void 0);return"string"==typeof t&&t?{wasmUrl:t.endsWith("/")?t:`${t}/`}:{BinaryDataFactory:w}}var v=[50,75,100,125,150,200,300,400];function b(e,t,n){const r=(t.width-40)/n.width,a="page"===e?Math.min(r,(t.height-40)/n.height):r;return Math.min(Math.max(a,.3),4)}function x({url:a,filename:o,fit:d="width",onDownload:h,onEmail:p,workerSrc:g,wasmUrl:w}){const x=r().pdf,k=i(null),C=i(null),N=i(null),[j,M]=s(null),[E,z]=s(1),[P,_]=s(0),[
|
|
1
|
+
import{Icon as e}from"./chunk-JOAKKXTL.js";import{LoadingSpinner as t}from"./chunk-R2VKEMZH.js";import{toast_default as n}from"./chunk-JTZVUO3I.js";import{useShellStrings as r}from"./chunk-TJSJVC6P.js";import{createContext as a,useContext as o,useRef as i,useState as s,useEffect as l}from"react";import*as c from"pdfjs-dist";import{createPortal as d}from"react-dom";import{jsx as u,jsxs as m}from"react/jsx-runtime";function h(e,t,n){return new Error(`The response for ${e} is not a WebAssembly module (got ${function(e){if(0===e.length)return"an empty response";const t=Array.from(e.subarray(0,24)).map(e=>e>=32&&e<127?String.fromCharCode(e):".").join("");return`${e.length} bytes starting "${t}"`}(n)}). The bundler did not emit "${t}" as an asset, and the host answered with a fallback page instead of a 404. Serve pdfjs-dist/wasm/ yourself and point window.__REACT_OS_SHELL_PDF_WASM__ at it.`)}var p=a(null);function f({children:e}){const t=o(p);return t?d(e,t):
|
|
2
|
+
/* @__PURE__ */u("div",{className:"flex shrink-0 flex-wrap items-center gap-1 border-b border-gray-200 bg-gray-50 px-3 py-2 text-xs",children:e})}"undefined"==typeof window||c.GlobalWorkerOptions.workerSrc||(c.GlobalWorkerOptions.workerSrc=`https://unpkg.com/pdfjs-dist@${c.version}/build/pdf.worker.min.mjs`);var g={"jbig2.wasm":new URL("pdfjs-dist/wasm/jbig2.wasm",import.meta.url).href,"openjpeg.wasm":new URL("pdfjs-dist/wasm/openjpeg.wasm",import.meta.url).href},w=class{async fetch({kind:e,filename:t}){if("wasmUrl"!==e)throw new Error(`Ensure that the \`${e}\` API parameter is provided.`);const n=g[t];if(!n)throw new Error(`No bundled pdf.js wasm module for "${t}".`);const r=await fetch(n);if(!r.ok)throw new Error(`Unable to load wasm data at: ${n}`);const a=new Uint8Array(await r.arrayBuffer());if(!function(e){return e.length>=4&&0===e[0]&&97===e[1]&&115===e[2]&&109===e[3]}(a))throw h(n,t,a);return a}};function y(e){const t=e||("undefined"!=typeof window?window.__REACT_OS_SHELL_PDF_WASM__:void 0);return"string"==typeof t&&t?{wasmUrl:t.endsWith("/")?t:`${t}/`}:{BinaryDataFactory:w}}var v=[50,75,100,125,150,200,300,400];function b(e,t,n){const r=(t.width-40)/n.width,a="page"===e?Math.min(r,(t.height-40)/n.height):r;return Math.min(Math.max(a,.3),4)}function x({url:a,filename:o,fit:d="width",onDownload:h,onEmail:p,workerSrc:g,wasmUrl:w}){const x=r().pdf,k=i(null),C=i(null),N=i(null),[j,M]=s(null),[E,z]=s(1),[P,_]=s(0),[T,D]=s(1),[L,S]=s(!0),[W,O]=s(!0),$=i(x.loadFailed);$.current=x.loadFailed,l(()=>{let e=!1;return O(!0),z(1),g&&(c.GlobalWorkerOptions.workerSrc=g),c.getDocument({url:a,...y(w)}).promise.then(t=>{e||(M(t),_(t.numPages),O(!1))}).catch(()=>{e||(n.error($.current),O(!1))}),()=>{e=!0}},[a,g,w]),l(()=>{if(!j||!L||!N.current)return;const e=()=>{const e=N.current;e&&j.getPage(E).then(t=>{if(!N.current)return;const n=t.getViewport({scale:1}),r=b(d,{width:e.clientWidth,height:e.clientHeight},{width:n.width,height:n.height});D(e=>Math.abs(e-r)<.005?e:r)})};e();const t=new ResizeObserver(e);return t.observe(N.current),()=>t.disconnect()},[j,E,L,d]),l(()=>{if(!j||!k.current)return;let e=!1,t=null,n=null;return j.getPage(E).then(r=>{if(e||!k.current)return;const a=r.getViewport({scale:T}),o=k.current;o.width=a.width,o.height=a.height,o.style.width=`${a.width}px`,o.style.height=`${a.height}px`;const i=o.getContext("2d");t=r.render({canvas:o,canvasContext:i,viewport:a}),t.promise.catch(()=>{});const s=C.current;s&&(s.replaceChildren(),s.style.setProperty("--total-scale-factor",String(a.scale)),n=new c.TextLayer({textContentSource:r.streamTextContent(),container:s,viewport:a}),n.render().then(()=>{if(e)return;const t=document.createElement("div");t.className="endOfContent",s.append(t)}).catch(()=>{}))}),()=>{e=!0,t?.cancel(),n?.cancel()}},[j,E,T]),l(()=>{const e=()=>C.current?.classList.remove("selecting");return window.addEventListener("pointerup",e),()=>window.removeEventListener("pointerup",e)},[]);const A="page"===d?x.fitPage:x.fitWidth,U="px-2 py-1 rounded hover:bg-gray-200 transition-colors text-gray-600 flex items-center gap-1";/* @__PURE__ */
|
|
3
3
|
return m("div",{className:"flex flex-col h-full",children:[
|
|
4
4
|
/* @__PURE__ */m(f,{children:[
|
|
5
5
|
/* @__PURE__ */u("button",{type:"button","aria-label":x.previousPage,onClick:()=>z(e=>Math.max(1,e-1)),disabled:E<=1,className:"px-1 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-600",children:/* @__PURE__ */u(e,{name:"chevron-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
|
|
6
6
|
/* @__PURE__ */u("span",{className:"text-gray-600 font-medium tabular-nums whitespace-nowrap",children:x.pageOf(E,P)}),
|
|
7
7
|
/* @__PURE__ */u("button",{type:"button","aria-label":x.nextPage,onClick:()=>z(e=>Math.min(P,e+1)),disabled:E>=P,className:"px-1 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-600",children:/* @__PURE__ */u(e,{name:"chevron-right",className:"h-3.5 w-3.5",strokeWidth:2})}),
|
|
8
8
|
/* @__PURE__ */u("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
|
|
9
|
-
/* @__PURE__ */u("button",{type:"button","aria-label":x.zoomOut,title:x.zoomOut,onClick:()=>{
|
|
10
|
-
/* @__PURE__ */m("select",{value:
|
|
11
|
-
/* @__PURE__ */u("option",{value:"fit",children:A}),!
|
|
12
|
-
/* @__PURE__ */u("button",{type:"button","aria-label":x.zoomIn,title:x.zoomIn,onClick:()=>{
|
|
13
|
-
/* @__PURE__ */u("button",{type:"button",onClick:()=>
|
|
9
|
+
/* @__PURE__ */u("button",{type:"button","aria-label":x.zoomOut,title:x.zoomOut,onClick:()=>{S(!1),D(e=>Math.max(.3,Math.round(100*(e-.25))/100))},className:U,children:/* @__PURE__ */u("span",{"aria-hidden":"true",children:"−"})}),
|
|
10
|
+
/* @__PURE__ */m("select",{value:L?"fit":v.includes(Math.round(100*T))?Math.round(100*T):"custom",onChange:e=>{const t=e.target.value;"fit"!==t?"custom"!==t&&(S(!1),D(Number(t)/100)):S(!0)},className:"bg-transparent hover:bg-gray-200 rounded px-1 py-1 text-gray-600 tabular-nums cursor-pointer focus:outline-none focus:ring-1 focus:ring-blue-400","aria-label":x.zoom,title:x.zoom,children:[
|
|
11
|
+
/* @__PURE__ */u("option",{value:"fit",children:A}),!L&&!v.includes(Math.round(100*T))&&/* @__PURE__ */m("option",{value:"custom",children:[Math.round(100*T),"%"]}),v.map(e=>/* @__PURE__ */m("option",{value:e,children:[e,"%"]},e))]}),
|
|
12
|
+
/* @__PURE__ */u("button",{type:"button","aria-label":x.zoomIn,title:x.zoomIn,onClick:()=>{S(!1),D(e=>Math.min(4,Math.round(100*(e+.25))/100))},className:U,children:/* @__PURE__ */u("span",{"aria-hidden":"true",children:"+"})}),
|
|
13
|
+
/* @__PURE__ */u("button",{type:"button",onClick:()=>S(!0),"aria-pressed":L,className:U+(L?" bg-gray-200 text-gray-900":""),title:x.fitHint,children:x.fit}),
|
|
14
14
|
/* @__PURE__ */u("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
|
|
15
15
|
/* @__PURE__ */m("button",{type:"button",onClick:()=>{if(!j)return;const e=window.open("","_blank");if(!e)return void n.error(x.allowPopups);const t=[];for(let e=1;e<=P;e++)t.push(j.getPage(e).then(e=>{const t=e.getViewport({scale:2}),n=document.createElement("canvas");return n.width=t.width,n.height=t.height,e.render({canvas:n,canvasContext:n.getContext("2d"),viewport:t}).promise.then(()=>n.toDataURL())}));Promise.all(t).then(t=>{var n;e.document.write(`<html><head><title>${n=o,n.replace(/[&<>"]/g,e=>({"&":"&","<":"<",">":">",'"':"""}[e]))}</title><style>@media print{body{margin:0}img{width:100%;page-break-after:always}}</style></head><body>`),e.document.write(t.map(e=>`<img src="${e}"/>`).join("")),e.document.write("</body></html>"),e.document.close(),setTimeout(()=>{e.print(),e.close()},300)})},className:U,children:[
|
|
16
16
|
/* @__PURE__ */u(e,{name:"print",className:"h-3.5 w-3.5",strokeWidth:1.5}),x.print]}),
|
|
17
17
|
/* @__PURE__ */m("button",{type:"button",onClick:h??(()=>{const e=document.createElement("a");e.href=a,e.download=o,e.click()}),className:U,children:[
|
|
18
18
|
/* @__PURE__ */u(e,{name:"download",className:"h-3.5 w-3.5",strokeWidth:1.5}),x.download]}),p&&/* @__PURE__ */m("button",{type:"button",onClick:p,className:U,children:[
|
|
19
19
|
/* @__PURE__ */u(e,{name:"email",className:"h-3.5 w-3.5",strokeWidth:1.5}),x.email]})]}),
|
|
20
|
-
/* @__PURE__ */u("div",{ref:N,className:"flex-1 overflow-auto bg-gray-100 outline-none",tabIndex:0,onWheel:e=>{if(!j)return;if(e.ctrlKey||e.metaKey)return;const t=N.current;if(!t)return;const n=t.scrollTop<=0,r=t.scrollTop+t.clientHeight>=t.scrollHeight-1;e.deltaY>0&&r&&E<P?(e.preventDefault(),z(e=>Math.min(P,e+1)),requestAnimationFrame(()=>{N.current&&(N.current.scrollTop=0)})):e.deltaY<0&&n&&E>1&&(e.preventDefault(),z(e=>Math.max(1,e-1)),requestAnimationFrame(()=>{N.current&&(N.current.scrollTop=N.current.scrollHeight)}))},onKeyDown:e=>{if(!j)return;const t=(document.activeElement?.tagName||"").toLowerCase();"input"===t||"textarea"===t||document.activeElement?.isContentEditable||("PageDown"===e.key||"ArrowRight"===e.key?E<P&&(e.preventDefault(),z(e=>Math.min(P,e+1))):"PageUp"===e.key||"ArrowLeft"===e.key?E>1&&(e.preventDefault(),z(e=>Math.max(1,e-1))):"Home"===e.key?(e.preventDefault(),z(1)):"End"===e.key&&(e.preventDefault(),z(P)))},children:
|
|
20
|
+
/* @__PURE__ */u("div",{ref:N,className:"flex-1 overflow-auto bg-gray-100 outline-none",tabIndex:0,onWheel:e=>{if(!j)return;if(e.ctrlKey||e.metaKey)return;const t=N.current;if(!t)return;const n=t.scrollTop<=0,r=t.scrollTop+t.clientHeight>=t.scrollHeight-1;e.deltaY>0&&r&&E<P?(e.preventDefault(),z(e=>Math.min(P,e+1)),requestAnimationFrame(()=>{N.current&&(N.current.scrollTop=0)})):e.deltaY<0&&n&&E>1&&(e.preventDefault(),z(e=>Math.max(1,e-1)),requestAnimationFrame(()=>{N.current&&(N.current.scrollTop=N.current.scrollHeight)}))},onKeyDown:e=>{if(!j)return;const t=(document.activeElement?.tagName||"").toLowerCase();"input"===t||"textarea"===t||document.activeElement?.isContentEditable||("PageDown"===e.key||"ArrowRight"===e.key?E<P&&(e.preventDefault(),z(e=>Math.min(P,e+1))):"PageUp"===e.key||"ArrowLeft"===e.key?E>1&&(e.preventDefault(),z(e=>Math.max(1,e-1))):"Home"===e.key?(e.preventDefault(),z(1)):"End"===e.key&&(e.preventDefault(),z(P)))},children:W?/* @__PURE__ */u(t,{size:"sm",padding:"",className:"h-full",label:x.loading}):/* @__PURE__ */m("div",{className:"min-h-full flex items-center justify-center p-4",children:[
|
|
21
21
|
/* @__PURE__ */u("style",{children:'\n.preview-pdf-textlayer {\n position: absolute;\n inset: 0;\n overflow: clip;\n line-height: 1;\n text-align: initial;\n text-size-adjust: none;\n forced-color-adjust: none;\n transform-origin: 0 0;\n caret-color: CanvasText;\n --min-font-size: 1;\n --text-scale-factor: calc(var(--total-scale-factor, 1) * var(--min-font-size));\n --min-font-size-inv: calc(1 / var(--min-font-size));\n}\n.preview-pdf-textlayer :is(span, br) {\n color: transparent;\n position: absolute;\n white-space: pre;\n cursor: text;\n transform-origin: 0% 0%;\n}\n.preview-pdf-textlayer > :not(.markedContent),\n.preview-pdf-textlayer .markedContent span:not(.markedContent) {\n z-index: 1;\n --font-height: 0;\n font-size: calc(var(--text-scale-factor) * var(--font-height));\n --scale-x: 1;\n --rotate: 0deg;\n transform: rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv));\n}\n.preview-pdf-textlayer .markedContent {\n display: contents;\n}\n.preview-pdf-textlayer span[role="img"] {\n user-select: none;\n cursor: default;\n}\n.preview-pdf-textlayer ::selection {\n background: rgba(0, 80, 255, 0.25);\n}\n.preview-pdf-textlayer br::selection {\n background: transparent;\n}\n.preview-pdf-textlayer .endOfContent {\n display: block;\n position: absolute;\n inset: 100% 0 0;\n z-index: 0;\n cursor: default;\n user-select: none;\n}\n.preview-pdf-textlayer.selecting .endOfContent {\n top: 0;\n}\n'}),
|
|
22
22
|
/* @__PURE__ */m("div",{className:"relative shadow-lg rounded",children:[
|
|
23
23
|
/* @__PURE__ */u("canvas",{ref:k,className:"block rounded"}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{TransferProgress as e}from"./chunk-JVNJCRHM.js";import{Icon as r}from"./chunk-
|
|
1
|
+
import{TransferProgress as e}from"./chunk-JVNJCRHM.js";import{Icon as r}from"./chunk-JOAKKXTL.js";import{DEFAULT_SHELL_STRINGS as t}from"./chunk-TJSJVC6P.js";import{jsx as o}from"react/jsx-runtime";var n=/^data:([a-z0-9!#$&^_.+-]+)\/([a-z0-9!#$&^_.+-]+)/i;function i(e){if(/^data:/i.test(e||""))return function(e){const r=n.exec(e);if(!r)return"media";const[,t,o]=r,i=o.split("+")[0].split(".").pop().replace(/^x-/i,"");return i?`${t.toLowerCase()}.${i.toLowerCase()}`:"media"}(e);const r=(e||"").split("?")[0].split("#")[0],t=r.substring(r.lastIndexOf("/")+1);try{return decodeURIComponent(t.replace(/^[0-9a-f]{32}_/i,""))||t||"media"}catch{return t||"media"}}var s=/\.(mp4|webm|ogg|ogv|mov|m4v)(\?|#|$)/i;function a(e,r=t.media){const o=function(e){const r=e.includes("video"),t=e.includes("image")||"*"===e||""===e;return r&&!t?"video":t&&!r?"image":"file"}(e);return"image"===o?r.uploadImage:"video"===o?r.uploadVideo:r.uploadFile}function c(e,r,t="",o="p-4"){return["flex w-full flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed text-center transition-colors",o,r?"cursor-not-allowed opacity-60":"cursor-pointer",e?"border-blue-500 bg-blue-50":"border-gray-300 bg-gray-50 hover:bg-gray-100",t].filter(Boolean).join(" ")}function u(e){return e?"rosh-focus-ring":"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-zone)]"}function d({label:r,progress:t,rounded:n="rounded-lg"}){/* @__PURE__ */
|
|
2
2
|
return o("div",{className:`absolute inset-0 flex items-center justify-center bg-white/60 ${n}`,children:/* @__PURE__ */o(e,{state:"busy",verb:r,pct:t})})}function l({children:e}){/* @__PURE__ */
|
|
3
3
|
return o("span",{className:"absolute inset-x-1 bottom-1 truncate rounded px-2 py-0.5 text-xs text-on-accent",style:{background:"var(--rosh-media-scrim)"},children:e})}function m(e,r=""){if(!e)return!1;const t=n.exec(e);if(t)return"video"===t[1].toLowerCase();const o=r.includes("video"),i=r.includes("image")||"*"===r||""===r;return s.test(e)||o&&!i}function f({className:e="h-4 w-4"}){/* @__PURE__ */
|
|
4
4
|
return o(r,{name:"close",className:e,strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})}function p({className:e="h-6 w-6"}){/* @__PURE__ */
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{UnitMenu as e}from"./chunk-ICZUWLVU.js";import{InputNumber_default as a,stepRounding as t}from"./chunk-HYQBYMJX.js";import{IconButton_default as i}from"./chunk-SV5RRBVA.js";import{Icon as r}from"./chunk-JOAKKXTL.js";import{Tooltip as n}from"./chunk-SOZCWT6I.js";import{jsx as o,jsxs as d,Fragment as l}from"react/jsx-runtime";var s="h-3.5 w-3.5",m={padding:{top:/* @__PURE__ */o(r,{name:"padding-top","aria-hidden":"true",className:s}),right:/* @__PURE__ */o(r,{name:"padding-right","aria-hidden":"true",className:s}),bottom:/* @__PURE__ */o(r,{name:"padding-bottom","aria-hidden":"true",className:s}),left:/* @__PURE__ */o(r,{name:"padding-left","aria-hidden":"true",className:s}),vertical:/* @__PURE__ */o(r,{name:"padding-y","aria-hidden":"true",className:s}),horizontal:/* @__PURE__ */o(r,{name:"padding-left-right","aria-hidden":"true",className:s})},crop:{top:/* @__PURE__ */o(r,{name:"crop-top","aria-hidden":"true",className:s}),right:/* @__PURE__ */o(r,{name:"crop-right","aria-hidden":"true",className:s}),bottom:/* @__PURE__ */o(r,{name:"crop-bottom","aria-hidden":"true",className:s}),left:/* @__PURE__ */o(r,{name:"crop-left","aria-hidden":"true",className:s}),vertical:/* @__PURE__ */o(r,{name:"crop-y","aria-hidden":"true",className:s}),horizontal:/* @__PURE__ */o(r,{name:"crop-left-right","aria-hidden":"true",className:s})}},c=/* @__PURE__ */o(r,{name:"sides-each","aria-hidden":"true",className:"h-4 w-4"});var h=(e,a,t)=>null===e[t]?a[t]:String(e[t]);function p(e,a){const t=t=>h(e,a,t);return t("left")!==t("right")||t("top")!==t("bottom")}function u({label:i,value:r,onChange:n,each:s,placeholder:c,words:p,min:u=0,max:g=200,step:f=4,readOnly:b,glyphs:N="padding",units:v}){const x=m[N],C=(i,d,l)=>{const s=function(e,a){const t=a.map(a=>e[a]);return t.every(e=>e===t[0])?t[0]:"mixed"}(r,i),m=i.map(e=>h(r,c,e)),N="mixed"!==s&&m.every(e=>e===m[0])?m[0]:"–";/* @__PURE__ */
|
|
2
|
+
return o("div",{"data-side":i.join("-"),className:"min-w-0",children:/* @__PURE__ */o(a,{value:"mixed"===s?null:s,onChange:e=>((e,a)=>{const t={...r};for(const i of e)t[i]=a;n(t)})(i,e),min:u,max:g,step:f,snap:!0,...t(f),steppers:"compact",readOnly:b,placeholder:N,prefix:l,suffix:p.unit,suffixControl:v&&/* @__PURE__ */o(e,{value:p.unit,options:v.options,onChange:v.onChange,label:v.label,disabled:b}),"aria-label":d})})};/* @__PURE__ */
|
|
3
|
+
return o("div",{role:"group","aria-label":i,"data-sides":s?"each":"pairs",className:"grid min-w-0 grid-cols-2 gap-2",children:/* @__PURE__ */d(l,s?{children:[C(["left"],p.sides.left,x.left),C(["top"],p.sides.top,x.top),C(["right"],p.sides.right,x.right),C(["bottom"],p.sides.bottom,x.bottom)]}:{children:[C(["left","right"],p.horizontal,x.horizontal),C(["top","bottom"],p.vertical,x.vertical)]})})}function g({each:e,onChange:a,label:t,disabled:r}){/* @__PURE__ */
|
|
4
|
+
return o(n,{content:t,children:/* @__PURE__ */o(i,{size:"md","aria-label":t,"aria-pressed":e,disabled:r,onClick:()=>a(!e),children:c})})}export{g as SidesEachToggle,u as SidesInput,p as sidesStartEach};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";function e({size:e=18,...t}){/* @__PURE__ */
|
|
2
|
+
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t,children:/* @__PURE__ */r("path",{d:"M4.5 3.75H19.5A1.5 1.5 0 0 1 21 5.25V18.75A1.5 1.5 0 0 1 19.5 20.25H4.5A1.5 1.5 0 0 1 3 18.75V5.25A1.5 1.5 0 0 1 4.5 3.75ZM3 9.75H21M3 15H21M6 6.75H11.25M15.75 6L17.25 7.5L18.75 6"})})}export{e as AccordionIcon};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{ColoredBadge as e}from"./chunk-
|
|
1
|
+
import{ColoredBadge as e}from"./chunk-QCOXJXGZ.js";import{Button_default as n}from"./chunk-EVYD6UFQ.js";import{useShellStrings as i}from"./chunk-TJSJVC6P.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,8 +1,8 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{MOTION as e,stagger as t}from"./chunk-465RRWBY.js";import{arcPath as l}from"./chunk-VFC6QUEN.js";import{useHighlight as a}from"./chunk-CNYAHYE6.js";import{usePlotWidth as r}from"./chunk-MAFUXCPZ.js";import{angleScale as n}from"./chunk-2JWPNR2U.js";import{ChartTooltip as o}from"./chunk-WDQI3FV6.js";import{CHART_INK as s,resolveSeriesColor as i}from"./chunk-TZFACUMR.js";import{useShellStrings as h,useShellLocale as c}from"./chunk-TJSJVC6P.js";import{formatPercent as m,formatPlain as u}from"./chunk-C3QOHMR6.js";import{useId as d,useState as f,useRef as y}from"react";import{jsx as p,jsxs as g}from"react/jsx-runtime";function x({segments:x,variant:v="pie",size:k=280,innerRadius:M,padAngle:b=.012,maxSegments:N=6,otherLabel:I,formatValue:$,centerLabel:j,animate:F=!0,labels:P="none",labelMinShare:S=.04,className:w,emptyLabel:C}){const A=h().charts,W=c(),R=$??(e=>u(e,W)),T=I??A.other,V=C??A.nothingToBreakDown,z=d(),[E,_]=f(null),{highlighted:L}=a(),U=y(null),Y=r(U,Number.POSITIVE_INFINITY),B=x.map((e,t)=>({...e,slot:t})).filter(e=>e.value>0);if(0===B.length)/* @__PURE__ */return p("p",{className:`text-sm text-gray-500 ${w??""}`,children:V});const J=[...B].sort((e,t)=>t.value-e.value),O=J.slice(0,N),Q=J.slice(N),D=Q.length>0?[...O,{key:"__other__",label:T,value:Q.reduce((e,t)=>e+t.value,0),slot:-1,color:s.muted}]:O,H=e=>i(e.slot,e.color,e.tone),Z=D.reduce((e,t)=>e+t.value,0),q=Math.ceil(.62*Math.max(...D.map(e=>String(e.label).length),4)*11)+24,X="outside"===P&&Y>=120+2*q,G=X?q:0,K=X?Math.max(120,Math.min(k,Y-2*G)):k,ee=K+2*G,te=G+K/2,le=K/2,ae=K/2-12,re=M??("ring"===v?.58*ae:0),ne=n(D.length,b),oe=Math.max(...D.map(e=>e.value)),se=e=>re+(ae-re)*Math.sqrt(Math.max(0,e)/oe);let ie=-Math.PI/2;const he=(()=>{if(!X)return[];let e=-Math.PI/2;const t=D.map((t,l)=>{const a="rose"===v?n(D.length,b).step:t.value/Z*Math.PI*2,r="rose"===v?n(D.length,b).center(l):e+a/2;e+=a;const o="rose"===v?se(t.value):ae;return{key:t.key,label:t.label,share:t.value/Z,right:Math.cos(r)>=0,anchor:[te+o*Math.cos(r),le+o*Math.sin(r)],y:le+(o+14)*Math.sin(r),index:l}}).filter(e=>e.share>=S),l=Math.max(1,Math.floor((K-11-13)/26)+1),a=/* @__PURE__ */new Set;for(const e of[!0,!1]){const r=t.filter(t=>t.right===e).sort((e,t)=>t.share-e.share).slice(0,l).sort((e,t)=>e.y-t.y);for(let e=1;e<r.length;e+=1)r[e].y-r[e-1].y<26&&(r[e].y=r[e-1].y+26);for(let e=r.length-1;e>=0;e-=1){const t=e===r.length-1?K-13:r[e+1].y-26;r[e].y=Math.min(r[e].y,t)}r.forEach((e,t)=>{e.y=Math.max(e.y,0===t?11:r[t-1].y+26),a.add(e.key)})}return t.filter(e=>a.has(e.key))})(),ce=(e,t)=>null!==E?E!==e:null!==L&&L!==t,me=null!==E?D[E]:void 0;/* @__PURE__ */
|
|
2
2
|
return g("div",{className:`relative ${w??""}`,ref:U,children:[
|
|
3
3
|
/* @__PURE__ */g("svg",{width:"100%",height:K,viewBox:`0 0 ${ee} ${K}`,role:"img","aria-labelledby":z,onMouseLeave:()=>_(null),children:[
|
|
4
4
|
/* @__PURE__ */p("title",{id:z,children:A.breakdown(R(Z),D.length)}),D.map((a,r)=>{const n=H(a),o="rose"===v?ne(r):ie,i="rose"===v?ne.step:a.value/Z*Math.PI*2-b;"rose"!==v&&(ie+=a.value/Z*Math.PI*2);const h=o+Math.max(.001,i),c="rose"===v?se(a.value):ae;/* @__PURE__ */
|
|
5
|
-
return p("path",{d:
|
|
5
|
+
return p("path",{d:l(te,le,re,c,o,h),fill:n,fillOpacity:ce(r,a.key)?.4:1,stroke:s.surface,strokeWidth:1,className:F?e.sweep:void 0,style:F?t(r,55):void 0,onMouseEnter:()=>_(r)},a.key)}),he.map(e=>{const t=e.right?ee-6:6,l=e.right?te+ae+14:te-ae-14;/* @__PURE__ */
|
|
6
6
|
return g("g",{children:[
|
|
7
7
|
/* @__PURE__ */p("polyline",{points:`${e.anchor[0].toFixed(1)},${e.anchor[1].toFixed(1)} ${l},${e.y.toFixed(1)} ${t},${e.y.toFixed(1)}`,fill:"none",stroke:s.grid,strokeWidth:1}),
|
|
8
8
|
/* @__PURE__ */p("text",{x:t,y:e.y-2,fontSize:11,fill:s.label,textAnchor:e.right?"end":"start",children:e.label}),
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as c}from"react/jsx-runtime";function h({size:h=18,...e}){/* @__PURE__ */
|
|
2
|
+
return c("svg",{width:h,height:h,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",...e,children:/* @__PURE__ */c("path",{fillRule:"evenodd",d:"M9,9h0.75v-1.5c0.03274,-0.36034 0.2091,-0.83042 0.43934,-1.06066c0.23024,-0.23024 0.70032,-0.4066 1.06066,-0.43934h2.25c0.36034,0.03274 0.83042,0.2091 1.06066,0.43934c0.23024,0.23024 0.4066,0.70032 0.43934,1.06066l0,1.5h0.75v-1.5c0.03274,-0.36034 0.2091,-0.83042 0.43934,-1.06066c0.23024,-0.23024 0.70032,-0.4066 1.06066,-0.43934h2.25c0.36034,0.03274 0.83042,0.2091 1.06066,0.43934c0.23024,0.23024 0.4066,0.70032 0.43934,1.06066l0,2.07518c0.03199,0.02726 0.06238,0.05522 0.09099,0.08383c0.36596,0.36596 0.62627,1.02354 0.65901,1.59099v7.5c-0.03274,0.56745 -0.29305,1.22503 -0.65901,1.59099c-0.36596,0.36596 -1.02354,0.62627 -1.59099,0.65901h-15c-0.56745,-0.03274 -1.22503,-0.29305 -1.59099,-0.65901c-0.36596,-0.36596 -0.62627,-1.02354 -0.65901,-1.59099v-13.5c0.03274,-0.56745 0.29305,-1.22503 0.65901,-1.59099c0.36596,-0.36596 1.02354,-0.62627 1.59099,-0.65901h2.25c0.56745,0.03274 1.22503,0.29305 1.59099,0.65901c0.36596,0.36596 0.62627,1.02354 0.65901,1.59099zM13.5,7.5h-2.25l0,1.5h2.25zM19.5,7.5h-2.25v1.5h2.25z"})})}export{h as TabsSolidIcon};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Card as e}from"./chunk-BYDSBDVS.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-BYDSBDVS.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-TCMAWDBL.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-CU3ZE25J.js";import{Button_default as o}from"./chunk-EVYD6UFQ.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,18 +1,18 @@
|
|
|
1
|
-
import{MOVE_KEYS as e,MoveGrip as t,MoveHint as r,moveFromKey as a}from"./chunk-WM2BBRT6.js";import{ItemCount as n}from"./chunk-KWTK6TGH.js";import{GROUP_COLORS as o}from"./chunk-JMGDGNM7.js";import{Icon as i}from"./chunk-
|
|
1
|
+
import{MOVE_KEYS as e,MoveGrip as t,MoveHint as r,moveFromKey as a}from"./chunk-WM2BBRT6.js";import{ItemCount as n}from"./chunk-KWTK6TGH.js";import{GROUP_COLORS as o}from"./chunk-JMGDGNM7.js";import{Icon as i}from"./chunk-JOAKKXTL.js";import{OneLineLabel as s}from"./chunk-G67CJAQ2.js";import{Tooltip as l}from"./chunk-SOZCWT6I.js";import{useBrowserLayoutEffect as c}from"./chunk-D65T4H6J.js";import{useShellStrings as d}from"./chunk-TJSJVC6P.js";import{useRef as u,useCallback as p,useId as m,isValidElement as f}from"react";import{jsx as h,jsxs as g}from"react/jsx-runtime";var b='[role="treeitem"]';function v(e){return[...e.querySelectorAll(b)].filter(t=>{for(let r=t.parentElement?.closest('[role="group"]');r&&e.contains(r);r=r.parentElement?.closest('[role="group"]')??null)if(r.hasAttribute("hidden"))return!1;return!0})}function y({"aria-label":e,"aria-labelledby":t,children:r,className:a="",rootProps:n}){const o=u(null);c(()=>{const e=o.current;if(!e)return;const t=[...e.querySelectorAll(b)];if(0===t.length)return;const r=t.find(e=>e===document.activeElement)??t.find(e=>"true"===e.getAttribute("aria-selected"))??v(e)[0]??t[0];for(const e of t)e.tabIndex=e===r?0:-1});const i=p(e=>{n?.onKeyDown?.(e);const t=o.current,r=e.target.closest?.(b);if(!t||!r||e.target!==r||e.defaultPrevented)return;if(e.altKey||e.ctrlKey||e.metaKey)return;const a=v(t),i=a.indexOf(r),s=Number(r.getAttribute("aria-level")??"1"),l=r=>{e.preventDefault(),function(e,t){if(t){for(const r of e.querySelectorAll(b))r.tabIndex=r===t?0:-1;t.focus()}}(t,r)};switch(e.key){case"ArrowDown":l(a[i+1]);break;case"ArrowUp":l(a[i-1]);break;case"Home":l(a[0]);break;case"End":l(a[a.length-1]);break;case"ArrowRight":if("true"===r.getAttribute("aria-expanded")){const t=a[i+1];t&&Number(t.getAttribute("aria-level")??"1")>s?l(t):e.preventDefault()}break;case"ArrowLeft":if("true"!==r.getAttribute("aria-expanded"))for(let e=i-1;e>=0;e--)if(Number(a[e].getAttribute("aria-level")??"1")<s){l(a[e]);break}}},[n]);/* @__PURE__ */
|
|
2
2
|
return h("div",{...n,ref:o,role:"tree","aria-label":t?void 0:e,"aria-labelledby":t,onKeyDown:i,className:`flex flex-col gap-1 ${a}`.trim(),children:r})}function x({children:e,hidden:t,className:r=""}){/* @__PURE__ */
|
|
3
3
|
return h("div",{role:"group",hidden:t,className:`ml-4 flex flex-col gap-1 border-l border-gray-200 pl-2 ${r}`.trim(),children:e})}var k=["inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-full px-2","text-2xs font-medium normal-case tabular-nums tracking-normal"].join(" "),w=`${k} bg-[color:color-mix(in_srgb,var(--ink-faint)_12%,transparent)] text-gray-600`;function N(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&!f(e)&&"label"in e}function A(e){if(null==e||!1===e||"number"==typeof e)return null;const t=Array.isArray(e)&&e.length>0&&e.every(N)?e:N(e)?[e]:null;return t?t.map((e,t)=>/* @__PURE__ */h("span",{"data-tree-count":"","data-tone":e.tone,className:e.tone?`${k} ${o[e.tone]}`:w,children:e.label},t)):/* @__PURE__ */h("span",{"data-tree-count":"",className:w,children:e})}function j({children:e,count:t,countLabel:r,expanded:a,onToggle:o}){const i=void 0!==a,l=
|
|
4
4
|
/* @__PURE__ */h("span",{"data-tree-label-text":"",className:"flex min-w-0 flex-1 text-left",children:/* @__PURE__ */h(s,{children:e})}),c="number"==typeof t?/* @__PURE__ */h(n,{count:t,label:r,showZero:!0}):null!=t&&!1!==t&&/* @__PURE__ */h("span",{"data-tree-count":"",className:w,children:t}),d="text-xs font-semibold uppercase tracking-wide text-ink-faint";return i?/* @__PURE__ */h("div",{role:"presentation",className:"pb-1 pt-3",children:/* @__PURE__ */g("button",{type:"button","aria-expanded":a,onClick:o,className:["flex w-full items-center gap-2 rounded-md px-2 hover:text-ink-strongest","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",d].join(" "),children:[
|
|
5
5
|
/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-caret":"",className:"flex h-4 w-4 shrink-0 items-center justify-center",children:$(!!a)}),l,c]})}):/* @__PURE__ */g("div",{role:"presentation",className:`flex items-center gap-2 px-2 pb-1 pt-3 ${d}`,children:[
|
|
6
|
-
/* @__PURE__ */h("span",{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),l,c]})}var $=e=>/* @__PURE__ */h(i,{name:"chevron-right","aria-hidden":"true",strokeWidth:2.6,className:"h-3 w-3 transition-transform "+(e?"rotate-90":"")}),C={backgroundColor:"inherit",maskImage:"linear-gradient(to right, transparent, black 12px)",WebkitMaskImage:"linear-gradient(to right, transparent, black 12px)"};function D({label:o,level:i=1,icon:l,preview:c,selected:d=!1,tone:u,expanded:p,onToggle:f,onSelect:b,muted:v=!1,badge:y,count:x,countLabel:k,actions:w,actionsPinned:N=!1,actionsOverlay:j=!0,rename:D,drop:P,dragging:K=!1,draggable:T=!1,dragHint:I,onMove:
|
|
7
|
-
return g("div",{...
|
|
6
|
+
/* @__PURE__ */h("span",{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),l,c]})}var $=e=>/* @__PURE__ */h(i,{name:"chevron-right","aria-hidden":"true",strokeWidth:2.6,className:"h-3 w-3 transition-transform "+(e?"rotate-90":"")}),C={backgroundColor:"inherit",maskImage:"linear-gradient(to right, transparent, black 12px)",WebkitMaskImage:"linear-gradient(to right, transparent, black 12px)"};function D({label:o,level:i=1,icon:l,preview:c,selected:d=!1,tone:u,expanded:p,onToggle:f,onSelect:b,muted:v=!1,badge:y,count:x,countLabel:k,actions:w,actionsPinned:N=!1,actionsOverlay:j=!0,rename:D,drop:P,dragging:K=!1,draggable:T=!1,dragHint:I,onMove:H,rowProps:J,className:S=""}){const W=void 0!==p,E=m(),L=x??("number"==typeof y?y:void 0),M=[J?.["aria-describedby"],H?E:void 0].filter(Boolean).join(" ")||void 0,B="shared"===u?"text-[color:var(--status-success-soft-ink)]":null,G=d?B?`bg-[var(--status-success-soft)] ${B}`:"bg-accent-tint text-blue-700":"into"===P?`bg-accent-tint ${B??"text-ink-strongest"}`:`${B??"text-ink"} hover:bg-gray-100`;/* @__PURE__ */
|
|
7
|
+
return g("div",{...J,role:"treeitem","aria-level":i,"aria-selected":d,"aria-expanded":W?p:void 0,"data-tone":u,tabIndex:d?0:-1,"aria-keyshortcuts":J?.["aria-keyshortcuts"]??(H?e:void 0),"aria-describedby":M,"data-drop":P,"data-draggable":T||void 0,onKeyDown:e=>{if(J?.onKeyDown?.(e),e.target!==e.currentTarget||e.defaultPrevented)return;const t=a(e);t&&H?(e.preventDefault(),H(t)):"Enter"!==e.key&&" "!==e.key||!b?("ArrowRight"===e.key&&W&&!p&&f||"ArrowLeft"===e.key&&W&&p&&f)&&(e.preventDefault(),f()):(e.preventDefault(),b())},onClick:e=>{J?.onClick?.(e),e.defaultPrevented||b?.()},className:["group/treerow relative flex h-8 shrink-0 select-none items-center gap-2 rounded-md px-2 text-sm",T?"cursor-grab active:cursor-grabbing":"cursor-pointer","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",G,"into"===P?"ring-2 ring-inset ring-[color:var(--rosh-drop-ring)]":"",K?"opacity-40":"",S].filter(Boolean).join(" "),children:["before"===P&&/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-drop-line":"",className:"pointer-events-none absolute inset-x-2 -top-0.5 h-0.5 rounded-full bg-blue-500"}),"after"===P&&/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-drop-line":"",className:"pointer-events-none absolute inset-x-2 -bottom-0.5 h-0.5 rounded-full bg-blue-500"}),T&&
|
|
8
8
|
/* @__PURE__ */h(t,{marker:"tree",hint:I,dragging:K,revealClassName:"group-hover/treerow:opacity-100"}),
|
|
9
|
-
/* @__PURE__ */h("span",
|
|
9
|
+
/* @__PURE__ */h("span",W?{"aria-hidden":"true","data-tree-caret":"",onClick:e=>{e.stopPropagation(),f?.()},className:"flex h-4 w-4 shrink-0 items-center justify-center rounded text-gray-500 hover:bg-gray-200 hover:text-gray-900",children:$(!!p)}:{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),null!=l&&/* @__PURE__ */h("span",{"aria-hidden":"true",className:"flex h-4 w-4 shrink-0 items-center justify-center "+(v?"text-ink-faintest":""),children:l}),
|
|
10
10
|
/* @__PURE__ */g("span",{className:"relative flex min-w-0 flex-1 items-center gap-2",children:[D??
|
|
11
|
-
/* @__PURE__ */h("span",{"data-tree-name":"",className:`flex min-w-0 ${d?"font-semibold":"font-medium"} ${v?"text-ink-faintest line-through":""}`,children:/* @__PURE__ */g(s,{children:[o,null!=c&&/* @__PURE__ */h("span",{className:"ml-2 font-normal text-ink-faint",children:c})]})}),A(y),null!=
|
|
11
|
+
/* @__PURE__ */h("span",{"data-tree-name":"",className:`flex min-w-0 ${d?"font-semibold":"font-medium"} ${v?"text-ink-faintest line-through":""}`,children:/* @__PURE__ */g(s,{children:[o,null!=c&&/* @__PURE__ */h("span",{className:"ml-2 font-normal text-ink-faint",children:c})]})}),A(y),null!=L&&/* @__PURE__ */h(n,{count:L,label:k,active:d,showZero:!0,className:"ml-auto"}),null!=w&&!j&&/* @__PURE__ */h("span",{"data-tree-actions":"",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),className:`${null!=L?"":"ml-auto "}flex shrink-0 items-center gap-0.5 transition-opacity ${N||v?"opacity-100":"opacity-0 group-hover/treerow:opacity-100 group-focus-within/treerow:opacity-100"}`,children:w})]}),null!=w&&j&&
|
|
12
12
|
/* @__PURE__ */g("span",{"data-tree-actions":"","data-tree-actions-overlay":"",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),style:C,className:"absolute inset-y-0 right-0 grid rounded-r-md transition-opacity "+(N||v||d?"opacity-100":"pointer-events-none opacity-0 group-hover/treerow:pointer-events-auto group-hover/treerow:opacity-100 group-focus-within/treerow:pointer-events-auto group-focus-within/treerow:opacity-100"),children:[
|
|
13
13
|
/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-actions-scrim":"",className:"col-start-1 row-start-1",style:{background:"var(--rosh-tree-ground, var(--surface))"}}),
|
|
14
14
|
/* @__PURE__ */h("span",{"aria-hidden":"true",className:"col-start-1 row-start-1",style:{backgroundColor:"inherit"}}),
|
|
15
|
-
/* @__PURE__ */h("span",{className:"col-start-1 row-start-1 flex items-center gap-0.5 pl-4 pr-2",children:w})]}),
|
|
15
|
+
/* @__PURE__ */h("span",{className:"col-start-1 row-start-1 flex items-center gap-0.5 pl-4 pr-2",children:w})]}),H&&/* @__PURE__ */h(r,{id:E})]})}function P({onAdd:e,label:t,drop:r=!1,slotProps:a}){const n=d().tree,o=r?n.dropHere:t??n.empty,i="flex min-h-8 w-full items-center gap-2 rounded-md border border-dashed px-3 text-sm "+(r?"border-blue-500 bg-blue-50 text-blue-700":"border-gray-300 text-gray-500");/* @__PURE__ */
|
|
16
16
|
return h("div",{...a,role:"presentation","data-drop":r||void 0,children:e?/* @__PURE__ */g("button",{type:"button",onClick:e,className:`${i} text-left hover:bg-gray-100 hover:text-gray-900 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]`,children:[
|
|
17
17
|
/* @__PURE__ */h("span",{"aria-hidden":"true",children:"+"}),o]}):/* @__PURE__ */h("span",{className:i,children:o})})}function K({onInsert:e,label:t,drop:r=!1,seamProps:a}){const n=d().tree,o=t??n.insertHere,s=r?"opacity-100":e?"opacity-0 group-hover/seam:opacity-100 group-focus-within/seam:opacity-100":"opacity-0";/* @__PURE__ */
|
|
18
18
|
return g("div",{...a,role:"presentation","data-tree-seam":"","data-drop":r||void 0,className:`group/seam relative z-10 -my-1 h-1 shrink-0 ${a?.className??""}`.trim(),children:[
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{GROUP_COLORS as e,BADGE_PILL as o}from"./chunk-JMGDGNM7.js";import{Icon as i}from"./chunk-
|
|
1
|
+
import{GROUP_COLORS as e,BADGE_PILL as o}from"./chunk-JMGDGNM7.js";import{Icon as i}from"./chunk-JOAKKXTL.js";import{OneLineLabel as r}from"./chunk-G67CJAQ2.js";import{useShellStrings as s}from"./chunk-TJSJVC6P.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,11 +1,11 @@
|
|
|
1
|
-
import{MediaUploadField as e}from"./chunk-
|
|
1
|
+
import{MediaUploadField as e}from"./chunk-6VB4TBU6.js";import{BrandMark as r}from"./chunk-MI67DI3H.js";import{Button_default as a}from"./chunk-EVYD6UFQ.js";import{useShellStrings as t}from"./chunk-TJSJVC6P.js";import{useRef as i,useState as l,useEffect as s}from"react";import{jsxs as n,jsx as c}from"react/jsx-runtime";function d({committedUrl:d,committedHasAlpha:o=null,committedIsLight:m=null,fallbackUrl:g,fallbackHasAlpha:h=null,fallbackIsLight:u=null,subjectName:b,assetName:p,onSave:x,onRemove:f,accept:v="image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",acceptHint:y="PNG · ICO · SVG · JPG · WEBP",maxBytes:N=5242880,previews:w=[],disabled:k=!1}){const j=i(null),[L,U]=l(null),[R,C]=l(""),[B,F]=l(""),[H,I]=l(!1),[A,E]=l(!1),O=function(e){return e.trim().toLocaleLowerCase().split(/\s+/).at(-1)||"image"}(p),P=t().brandAsset,S=R||d||g||"",V=L?null:d?o:h,G=L?null:d?m:u;s(()=>()=>{j.current&&URL.revokeObjectURL(j.current)},[]);const J=()=>{j.current&&(URL.revokeObjectURL(j.current),j.current=null)};/* @__PURE__ */
|
|
2
2
|
return n("section",{"aria-label":P.region(p,b),className:"grid gap-4 lg:grid-cols-2",children:[
|
|
3
3
|
/* @__PURE__ */n("div",{className:"rounded-lg border border-gray-200 bg-white p-4",children:[
|
|
4
|
-
/* @__PURE__ */c(e,{value:
|
|
4
|
+
/* @__PURE__ */c(e,{value:S,onChange:()=>{},onFile:e=>{if(k)return;J();const r=URL.createObjectURL(e);j.current=r,U(e),C(r),F("")},label:p,hint:B||P.usedFor(b),error:B||void 0,accept:v,acceptHint:y,maxSizeBytes:N,fit:"contain",height:180,allowRemove:!1,busy:H||A,disabled:k}),
|
|
5
5
|
/* @__PURE__ */n("div",{className:"mt-3 flex flex-wrap gap-2",children:[
|
|
6
|
-
/* @__PURE__ */c(a,{onClick:async()=>{if(L&&!k&&!
|
|
6
|
+
/* @__PURE__ */c(a,{onClick:async()=>{if(L&&!k&&!H){I(!0),F("");try{await x(L),J(),U(null),C("")}catch(e){F(e instanceof Error?e.message:P.saveFailed(O,p))}finally{I(!1)}}},disabled:!L||k,loading:H,children:P.save(O,p)}),(L||d)&&/* @__PURE__ */c(a,{variant:"ghost-danger",onClick:async()=>{if(!k&&!A){if(L)return J(),U(null),C(""),void F("");if(d){E(!0),F("");try{await f()}catch(e){F(e instanceof Error?e.message:P.removeFailed(O,p))}finally{E(!1)}}}},disabled:k,loading:A,children:L?P.discard:P.remove(O,p)})]})]}),w.length>0&&/* @__PURE__ */n("div",{className:"rounded-lg border border-gray-200 bg-white p-4","aria-label":P.previews(p),children:[
|
|
7
7
|
/* @__PURE__ */c("h3",{className:"text-sm font-semibold text-gray-900",children:P.preview}),
|
|
8
|
-
/* @__PURE__ */c("div",{className:"mt-3 grid gap-3",children:w.map(e=>{const a=/* @__PURE__ */c(r,{src:
|
|
8
|
+
/* @__PURE__ */c("div",{className:"mt-3 grid gap-3",children:w.map(e=>{const a=/* @__PURE__ */c(r,{src:S,alt:P.alt(b,p),slot:e.slot,surface:e.surface,adaptive:!0,hasAlpha:V,isLight:G,size:"browser-tab"===e.kind?16:void 0});/* @__PURE__ */
|
|
9
9
|
return n("div",{"data-brand-preview":!0,className:"dark"===e.surface?"text-white":"text-gray-900",children:[
|
|
10
10
|
/* @__PURE__ */c("div",{className:"mb-2 text-xs font-medium text-gray-500",children:e.label}),"browser-tab"===e.kind?/* @__PURE__ */n("div",{className:"flex items-end gap-1 border-b border-gray-200",children:[
|
|
11
11
|
/* @__PURE__ */n("div",{className:"flex max-w-[220px] items-center gap-2 rounded-t-lg border border-b-0 border-gray-200 bg-white px-3 py-2",children:[a,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{LIGHTBOX_PICTURE_FIT as e,ZoomableImage as t}from"./chunk-CGUMJZUB.js";import{isVideoUrl as r,mediaFileName as n}from"./chunk-
|
|
1
|
+
import{LIGHTBOX_PICTURE_FIT as e,ZoomableImage as t}from"./chunk-CGUMJZUB.js";import{isVideoUrl as r,mediaFileName as n}from"./chunk-NOEAEXIZ.js";import{dialogA11y as o}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as a}from"./chunk-7QSDPSXP.js";import{useFocusTrap as l,useScrollLock as i}from"./chunk-CDAJKLGL.js";import{Button_default as c}from"./chunk-EVYD6UFQ.js";import{Icon as s}from"./chunk-JOAKKXTL.js";import{Z_LAYERS as m}from"./chunk-62LW225J.js";import{useHydrated as u}from"./chunk-D65T4H6J.js";import{buttonClasses as d}from"./chunk-UQYNPYF4.js";import{registerModalEscapeInterceptor as f}from"./chunk-TWVUQUUD.js";import{useShellStrings as h}from"./chunk-TJSJVC6P.js";import{useRef as p,useState as x,useCallback as b,useEffect as k}from"react";import{createPortal as g}from"react-dom";import{jsx as v,jsxs as w,Fragment as N}from"react/jsx-runtime";var y=/\.(pdf|docx?|xlsx?|pptx?|csv|txt|zip|rar|7z|dwg|dxf|stp|step|igs|iges)(?:[?#]|$)/i;function j(e){return e.kind?e.kind:r(e.url)?"video":y.test(e.url)?"file":"image"}var C="flex items-center justify-center rounded-full bg-black/60 text-on-accent hover:bg-black/80 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",A=e=>e.stopPropagation();function J({images:r,startIndex:y=0,onClose:J,onIndexChange:L,onOpenFile:U}){const D=h().lightbox,$=u(),z=p(null),E=p(null),[F,I]=x(y),P=r.length,O=$&&P>0,Q=b(e=>{if(P<2)return;const t=((F+e)%P+P)%P;I(t),L?.(t)},[F,P,L]);if(a(O),l(z,O,E),i(O),k(()=>{if(O)return f(()=>(J(),!0),()=>z.current)},[O,J]),k(()=>{if(!O)return;const e=e=>{"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||e.target?.closest?.("video")||(e.preventDefault(),Q("ArrowRight"===e.key?1:-1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[O,Q]),!O)return null;const T=r[Math.min(F,P-1)],V=j(T),W=T.caption||n(T.url);let Y;return Y="video"===V?/* @__PURE__ */v("video",{src:T.url,controls:!0,playsInline:!0,"aria-label":W,onClick:A,className:`${e} rounded-lg bg-black`}):"file"===V?/* @__PURE__ */w("div",{onClick:A,className:"flex max-w-[calc(100vw-144px)] flex-col items-center gap-3 rounded-lg bg-surface px-10 py-8 text-center text-ink-faint",children:[
|
|
2
2
|
/* @__PURE__ */v(s,{name:"document","aria-hidden":"true",className:"h-10 w-10"}),
|
|
3
|
-
/* @__PURE__ */v("span",{className:"max-w-[60ch] break-all text-sm font-medium text-ink",children:
|
|
4
|
-
/* @__PURE__ */w("div",{ref:z,...o({role:"dialog",modal:!0,label:
|
|
5
|
-
/* @__PURE__ */w("div",{className:"absolute right-4 top-4 flex items-center gap-2",onClick:
|
|
6
|
-
/* @__PURE__ */v("span",{className:"rounded bg-black/60 px-2 py-1 text-xs text-on-accent tabular-nums",children:
|
|
7
|
-
/* @__PURE__ */v("button",{ref:
|
|
8
|
-
/* @__PURE__ */v("button",{type:"button",onClick:e=>{
|
|
9
|
-
/* @__PURE__ */v("button",{type:"button",onClick:e=>{
|
|
10
|
-
/* @__PURE__ */w("div",{className:"absolute inset-x-18 bottom-4 flex items-center justify-center gap-3",onClick:
|
|
11
|
-
/* @__PURE__ */v("span",{className:"min-w-0 break-words text-center text-sm text-on-accent/85",children:
|
|
3
|
+
/* @__PURE__ */v("span",{className:"max-w-[60ch] break-all text-sm font-medium text-ink",children:W}),U?/* @__PURE__ */v(c,{size:"sm",onClick:()=>U(T),children:D.openFile}):/* @__PURE__ */v("a",{href:T.url,target:"_blank",rel:"noopener noreferrer",className:d({size:"sm"}),children:D.openFile})]}):/* @__PURE__ */v(t,{src:T.url,alt:W,className:`${e} object-contain`,frameClassName:"rounded-lg"}),g(
|
|
4
|
+
/* @__PURE__ */w("div",{ref:z,...o({role:"dialog",modal:!0,label:D.label}),"data-lightbox-backdrop":"",className:"fixed inset-0 flex items-center justify-center bg-black/80",style:{zIndex:m.overlay},onClick:J,children:[Y,
|
|
5
|
+
/* @__PURE__ */w("div",{className:"absolute right-4 top-4 flex items-center gap-2",onClick:A,children:[
|
|
6
|
+
/* @__PURE__ */v("span",{className:"rounded bg-black/60 px-2 py-1 text-xs text-on-accent tabular-nums",children:D.counter(F+1,P)}),
|
|
7
|
+
/* @__PURE__ */v("button",{ref:E,type:"button",onClick:J,"aria-label":D.close,className:`${C} h-8 w-8`,children:/* @__PURE__ */v(s,{name:"close","aria-hidden":"true",className:"h-4 w-4"})})]}),P>1&&/* @__PURE__ */w(N,{children:[
|
|
8
|
+
/* @__PURE__ */v("button",{type:"button",onClick:e=>{A(e),Q(-1)},"aria-label":D.previous,className:`${C} absolute left-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(s,{name:"chevron-left","aria-hidden":"true",className:"h-5 w-5"})}),
|
|
9
|
+
/* @__PURE__ */v("button",{type:"button",onClick:e=>{A(e),Q(1)},"aria-label":D.next,className:`${C} absolute right-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(s,{name:"chevron-right","aria-hidden":"true",className:"h-5 w-5"})})]}),
|
|
10
|
+
/* @__PURE__ */w("div",{className:"absolute inset-x-18 bottom-4 flex items-center justify-center gap-3",onClick:A,children:[
|
|
11
|
+
/* @__PURE__ */v("span",{className:"min-w-0 break-words text-center text-sm text-on-accent/85",children:W}),"file"!==V&&/* @__PURE__ */v("a",{href:T.url,target:"_blank",rel:"noopener noreferrer",className:"flex-none text-xs font-medium text-on-accent/70 underline decoration-on-accent/30 underline-offset-2 hover:text-on-accent",children:D.openOriginal})]})]}),document.body)}export{J as ImageLightbox,j as lightboxKind};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import{useCopyText as e,CopyGlyph as n}from"./chunk-
|
|
1
|
+
import{useCopyText as e,CopyGlyph as n}from"./chunk-NGQZI7HP.js";import{ItemCount as t}from"./chunk-KWTK6TGH.js";import{PopupMenu as r,PopupMenuItem as i,PopupMenuDivider as l}from"./chunk-ZICGXJUB.js";import{Icon as o}from"./chunk-JOAKKXTL.js";import{useShellStrings as a}from"./chunk-TJSJVC6P.js";import{useState as s,useMemo as d,useEffect as c,useRef as u,Fragment as m,useLayoutEffect as f}from"react";import{jsxs as p,jsx as y,Fragment as g}from"react/jsx-runtime";function h(e){const n=[];let t=0;for(;t<e.length;){const r=e[t].group;let i=t;for(;void 0!==r&&i+1<e.length&&e[i+1].group===r;)i++;n.push(i>t?{group:r,start:t,end:i}:{start:t,end:t}),t=i+1}return n}function k(e,n){return e.find(e=>n>=e.start&&n<=e.end)}function b(e,n,t,r){const i=e.findIndex(e=>e.key===n.key);let l=e.findIndex(e=>e.key===t);if(i<0||l<0)return null;const o=h(e),a=k(o,i),s="group"===n.kind&&void 0!==a.group?e.slice(a.start,a.end+1).map(e=>e.key):[n.key];if(s.includes(t))return null;const d=k(o,l);if("tab"===n.kind&&void 0!==a.group){if(d!==a)return null}else void 0!==d.group&&(l="before"===r?d.start:d.end);return{key:e[l].key,side:r,moving:s}}function x(e,n,t,r){const i=b(e,n,t,r);if(!i)return null;const l=e.map(e=>e.key).filter(e=>!i.moving.includes(e)),o=l.indexOf(i.key)+("after"===i.side?1:0),a=[...l.slice(0,o),...i.moving,...l.slice(o)];return a.every((n,t)=>n===e[t].key)?null:a}var v="flex-[0_100_15rem] [contain-intrinsic-inline-size:15rem]",N=v,w="outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-500",C="pointer-events-none absolute bottom-0 size-2 [background:inherit]";function $(){/* @__PURE__ */
|
|
2
2
|
return p(g,{children:[
|
|
3
3
|
/* @__PURE__ */y("span",{"aria-hidden":"true",className:`${C} -left-2 [mask-image:radial-gradient(circle_at_0_0,transparent_0.5rem,#000_calc(0.5rem+0.5px))]`}),
|
|
4
|
-
/* @__PURE__ */y("span",{"aria-hidden":"true",className:`${C} -right-2 [mask-image:radial-gradient(circle_at_100%_0,transparent_0.5rem,#000_calc(0.5rem+0.5px))]`})]})}function
|
|
5
|
-
return y(o,{name:"close",look:"mini","aria-hidden":"true",className:"size-3.5"})}function
|
|
6
|
-
return y("button",{type:"button",tabIndex:-1,"aria-label":l?i:r,title:l?i:r,onClick:o,className:"flex size-5 shrink-0 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 @max-[10rem]:hidden",children:/* @__PURE__ */y(n,{copied:l,className:"size-3.5"})})}function _({node:e}){const n=u(null);return f(()=>{const t=n.current;if(t)return t.appendChild(e),()=>{e.parentNode===t&&t.removeChild(e)}},[e]),/* @__PURE__ */y("span",{ref:n,className:"ml-1 flex shrink-0 items-center"})}function j({tabs:e,activeKey:n,idFor:f,panelMounted:k,onActivate:C,onClose:j,onCloseMany:D,label:T,className:
|
|
4
|
+
/* @__PURE__ */y("span",{"aria-hidden":"true",className:`${C} -right-2 [mask-image:radial-gradient(circle_at_100%_0,transparent_0.5rem,#000_calc(0.5rem+0.5px))]`})]})}function I(){/* @__PURE__ */
|
|
5
|
+
return y(o,{name:"close",look:"mini","aria-hidden":"true",className:"size-3.5"})}function z({text:t,label:r,copiedLabel:i}){const{copied:l,copy:o}=e(t);/* @__PURE__ */
|
|
6
|
+
return y("button",{type:"button",tabIndex:-1,"aria-label":l?i:r,title:l?i:r,onClick:o,className:"flex size-5 shrink-0 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 @max-[10rem]:hidden",children:/* @__PURE__ */y(n,{copied:l,className:"size-3.5"})})}function _({node:e}){const n=u(null);return f(()=>{const t=n.current;if(t)return t.appendChild(e),()=>{e.parentNode===t&&t.removeChild(e)}},[e]),/* @__PURE__ */y("span",{ref:n,className:"ml-1 flex shrink-0 items-center"})}function j({tabs:e,activeKey:n,idFor:f,panelMounted:k,onActivate:C,onClose:j,onCloseMany:D,label:T,className:A,activeClassName:K,end:M,afterPinned:B,onIconMenu:E,menuItems:G,sizing:O="even",tall:R=!1,onReorder:L,groupInfo:J}){const S=a().pageTabs,X=a().count,[H,P]=s(null),W=R?"h-[34px]":"h-8",F=d(()=>e.map(e=>({key:e.key,group:J?e.group:void 0})),[e,J]),V=d(()=>h(F),[F]),Z=d(()=>{const t=e.findIndex(e=>e.key===n);return V.find(e=>void 0!==e.group&&t>=e.start&&t<=e.end)?.group},[V,e,n]),[Q,U]=s(()=>Z??null),Y=t=>{const r=V.find(e=>e.group===t);if(!r)return;const i=e.findIndex(e=>e.key===n),l=i>=r.start&&i<=r.end;if(Q!==t)l||C(e[r.start].key),U(t);else{if(l){const n=e[r.end+1]??e[r.start-1];n&&C(n.key)}U(null)}};c(()=>{void 0!==Z&&U(Z)},[n]);const q=d(()=>{const n=[];for(const t of V)for(let r=t.start;r<=t.end;r++)void 0!==t.group&&t.group!==Q||n.push(e[r]);return n},[V,Q,e]),ee=u(null),[ne,te]=s(null),re=(n,t)=>L?{draggable:!0,onDragStart:t=>{ee.current=n,t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",e.find(e=>e.key===n.key)?.title??"")},onDragOver:e=>{const r=ee.current;if(!r)return;const i=e.currentTarget.getBoundingClientRect(),l=t!==n.key||"tab"===n.kind?e.clientX<i.left+i.width/2?"before":"after":"before",o=x(F,r,t,l)?b(F,r,t,l):null;if(!o)return void(ne&&te(null));e.preventDefault(),e.dataTransfer.dropEffect="move";const a=e=>F.find(n=>n.key===e)?.group,s="tab"===r.kind&&void 0!==a(r.key)&&a(r.key)===a(o.key);ne?.key===o.key&&ne.side===o.side&&ne.inGroup===s||te({key:o.key,side:o.side,inGroup:s})},onDrop:e=>{const n=ee.current;if(!n||!ne)return;e.preventDefault();const t=x(F,n,ne.key,ne.side);ee.current=null,te(null),t&&L(t)},onDragEnd:()=>{ee.current=null,te(null)}}:{},ie=d(()=>new Set(V.filter(e=>void 0!==e.group&&J).map(n=>e[n.start].key)),[V,e,J]),le=e=>"pointer-events-none absolute inset-y-1 z-[3] w-0.5 rounded-full bg-blue-500 "+("before"===e?"-left-px":"-right-px"),oe=e=>ne?.key===e&&!("before"===ne.side&&ie.has(e)&&!ne.inGroup)&&/* @__PURE__ */y("span",{"aria-hidden":"true",className:le(ne.side)}),ae=e.length;c(()=>{if(!n)return;const e=document.getElementById(f(n,"tab"));e?.scrollIntoView?.({block:"nearest",inline:"nearest"})},[f,n,ae]);const se=B?q.findIndex(e=>!e.pinned):-1,de=q.some(e=>e.key===n)?n:q[0]?.key,ce=e=>{const n=q[(e+q.length)%q.length];n&&document.getElementById(f(n.key,"tab"))?.focus()},ue=(e,n)=>{const t=q[e+n];if(!L||!t)return;const r=x(F,{kind:"tab",key:q[e].key},t.key,n<0?"before":"after");r&&(L(r),setTimeout(()=>document.getElementById(f(q[e].key,"tab"))?.focus(),0))},me=H?e.find(e=>e.key===H.key):void 0,fe=me&&G?G(me.key):[],pe=me?e.indexOf(me):-1,ye=e=>e.some(e=>!e.pinned),ge=e=>()=>{P(null),e()},he=(e,t)=>!!t&&e.key!==n&&t.key!==n,ke=(e,t)=>{const r=e.key===n,i=e.pinned?"auto":r?"active-full"===O?"15rem":e.copy||E&&e.icon?"minmax(4.25rem,20rem)":"minmax(4.25rem,15rem)":"minmax(4rem,15rem)";return he(e,t)?["auto",i]:[i]},be=(e,t)=>{const r=e.key===n,i=!!e.dirty,l=e.icon,a=r?K??"z-[1] border-transparent bg-gray-50 text-gray-900":"border-transparent text-gray-600 hover:bg-gray-200/70 hover:text-gray-900",s=he(e,t),d={type:"button",role:"tab",id:f(e.key,"tab"),"aria-selected":r,"aria-controls":k?.(e.key)?f(e.key,"panel"):void 0,tabIndex:e.key===de?0:-1,title:e.title,onClick:()=>C(e.key)},c={onContextMenu:n=>((e,n)=>{e.preventDefault(),P({x:e.clientX,y:e.clientY,key:n.key})})(n,e),onAuxClick:n=>((e,n)=>{1!==e.button||n.pinned||(e.preventDefault(),j(n.key))})(n,e),onMouseDown:e=>{1===e.button&&e.preventDefault()}},u=l&&
|
|
7
7
|
/* @__PURE__ */p("span",{className:"relative flex size-4 shrink-0 items-center justify-center text-gray-500 [&>svg]:size-4","aria-hidden":"true",children:[l,i&&!r&&!e.pinned&&
|
|
8
|
-
/* @__PURE__ */y("span",{className:"absolute -right-1 -top-1 hidden size-2 rounded-full bg-gray-500 ring-2 ring-gray-100 @max-[6.5rem]:block @max-[6.5rem]:group-hover:hidden"})]}),g=r&&!!
|
|
8
|
+
/* @__PURE__ */y("span",{className:"absolute -right-1 -top-1 hidden size-2 rounded-full bg-gray-500 ring-2 ring-gray-100 @max-[6.5rem]:block @max-[6.5rem]:group-hover:hidden"})]}),g=r&&!!E&&!!l;return e.pinned?/* @__PURE__ */p("div",{role:"presentation",className:`group relative flex flex-none items-center justify-center rounded-t-lg border border-b-0 transition-colors ${W} ${l?"w-10":""} ${a}`,...c,...re({kind:"tab",key:e.key},e.key),children:[oe(e.key),r&&/* @__PURE__ */y($,{}),
|
|
9
9
|
/* @__PURE__ */p("button",{...d,className:`flex h-full items-center justify-center rounded-t-lg ${l?"w-full":"px-3"} ${w}`,children:[u,
|
|
10
10
|
/* @__PURE__ */y("span",{className:l?"sr-only":"whitespace-nowrap text-sm",children:e.title})]})]},e.key):/* @__PURE__ */p(m,{children:[s&&/* @__PURE__ */y("span",{"aria-hidden":"true",className:"mb-3 h-4 w-px shrink-0 self-end border-l border-gray-300"}),
|
|
11
|
-
/* @__PURE__ */p("div",{role:"presentation",className:`group relative flex items-center rounded-t-lg border border-b-0 text-sm transition-colors ${
|
|
12
|
-
/* @__PURE__ */y("button",{type:"button",tabIndex:-1,"aria-haspopup":"menu","aria-label":S.tabMenu,title:S.tabMenu,onClick:n=>{const t=n.currentTarget.getBoundingClientRect();
|
|
11
|
+
/* @__PURE__ */p("div",{role:"presentation",className:`group relative flex items-center rounded-t-lg border border-b-0 text-sm transition-colors ${W} ${"active-full"===O&&r?"":"@container"} ${"active-full"===O?r?"flex-[0_0_15rem] min-w-0":N:r&&(e.copy||g)?"flex-[0_100_20rem]":v} ${r?"active-full"===O?"":"min-w-[4.25rem]":"min-w-[4rem]"} ${a}`,...c,...re({kind:"tab",key:e.key},e.key),children:[oe(e.key),r&&/* @__PURE__ */y($,{}),g&&
|
|
12
|
+
/* @__PURE__ */y("button",{type:"button",tabIndex:-1,"aria-haspopup":"menu","aria-label":S.tabMenu,title:S.tabMenu,onClick:n=>{const t=n.currentTarget.getBoundingClientRect();E?.(e.key,t.left,t.bottom+4)},className:`ml-2 flex size-6 shrink-0 items-center justify-center rounded hover:bg-gray-200 @max-[5rem]:ml-2 ${w}`,children:u}),
|
|
13
13
|
/* @__PURE__ */p("button",{...d,className:`flex h-full min-w-0 flex-1 items-center gap-2 rounded-t-lg pr-1 text-left ${g?"pl-2":"pl-3"} ${w} ${r?g?"":"@max-[5rem]:pl-3":"@max-[6.5rem]:pr-3 @max-[4.5rem]:justify-center @max-[4.5rem]:px-0 @max-[4.5rem]:group-hover:pl-2 @max-[4.5rem]:group-hover:pr-3"}`,children:[!g&&u,
|
|
14
|
-
/* @__PURE__ */p("span",{className:`min-w-0 flex-1 overflow-hidden whitespace-nowrap [mask-image:linear-gradient(to_right,#000_calc(100%-1rem),transparent)] ${"active-full"===
|
|
15
|
-
/* @__PURE__ */y("span",{role:"img","aria-label":S.favorite,title:S.favorite,className:"ml-1 inline-flex align-[-0.125em] text-yellow-500",children:/* @__PURE__ */y(o,{name:"star","aria-hidden":"true",className:"size-3.5",fill:"currentColor",strokeWidth:1.5})})]})]}),r&&e.actions&&/* @__PURE__ */y(_,{node:e.actions}),r&&e.copy&&/* @__PURE__ */y(
|
|
14
|
+
/* @__PURE__ */p("span",{className:`min-w-0 flex-1 overflow-hidden whitespace-nowrap [mask-image:linear-gradient(to_right,#000_calc(100%-1rem),transparent)] ${"active-full"===O&&r?"pr-4":""} ${l?r?"@max-[5rem]:sr-only":"@max-[4.5rem]:sr-only":""}`,children:[e.title,e.favorite&&
|
|
15
|
+
/* @__PURE__ */y("span",{role:"img","aria-label":S.favorite,title:S.favorite,className:"ml-1 inline-flex align-[-0.125em] text-yellow-500",children:/* @__PURE__ */y(o,{name:"star","aria-hidden":"true",className:"size-3.5",fill:"currentColor",strokeWidth:1.5})})]})]}),r&&e.actions&&/* @__PURE__ */y(_,{node:e.actions}),r&&e.copy&&/* @__PURE__ */y(z,{text:e.copy,label:S.copy(e.copy),copiedLabel:S.copied}),
|
|
16
16
|
/* @__PURE__ */p("span",{className:"mr-2 flex size-5 shrink-0 items-center justify-center "+(r?"":"@max-[6.5rem]:hidden @max-[6.5rem]:group-hover:flex"),children:[i&&/* @__PURE__ */y("span",{role:"img","aria-label":S.unsaved,className:"size-2 rounded-full bg-gray-500 group-hover:hidden"}),
|
|
17
|
-
/* @__PURE__ */y("button",{type:"button",tabIndex:-1,"aria-label":S.closeTab?.(e.title)??`${S.close} ${e.title}`,onClick:()=>j(e.key),className:"size-5 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 "+(i?"hidden group-hover:flex":r?"flex":"flex opacity-0 group-hover:opacity-100 focus-visible:opacity-100"),children:/* @__PURE__ */y(
|
|
17
|
+
/* @__PURE__ */y("button",{type:"button",tabIndex:-1,"aria-label":S.closeTab?.(e.title)??`${S.close} ${e.title}`,onClick:()=>j(e.key),className:"size-5 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 "+(i?"hidden group-hover:flex":r?"flex":"flex opacity-0 group-hover:opacity-100 focus-visible:opacity-100"),children:/* @__PURE__ */y(I,{})})]})]})]},e.key)},xe=[];let ve,Ne=0,we=!B;for(const r of V){const i=q.filter(n=>{const t=e.indexOf(n);return t>=r.start&&t<=r.end});if(we||Ne!==se||(we=!0,xe.push(/* @__PURE__ */y(m,{children:B},"rosh-after-pinned")),ve=void 0),Ne+=i.length,void 0===r.group||!J){for(const e of i)xe.push(be(e,ve)),ve=e;continue}ve=void 0;const l=r.group,a=J(l),s=r.end-r.start+1,d=Q===l,c=e[r.start].key,u=i.some(e=>e.key===n)?"shrink":"shrink-[100]",f=["auto",...i.flatMap((e,n)=>ke(e,n>0?i[n-1]:void 0))];xe.push(
|
|
18
18
|
/* @__PURE__ */p("div",{role:"group","aria-label":a.label,"data-tab-group":l,className:`relative mx-1 grid grid-flow-col items-end first:ml-0 ${u}`,style:{gridTemplateColumns:f.join(" ")},children:[
|
|
19
|
-
/* @__PURE__ */p("button",{type:"button",tabIndex:-1,"aria-expanded":d,title:S.groupToggle(a.label,s),onClick:()=>
|
|
19
|
+
/* @__PURE__ */p("button",{type:"button",tabIndex:-1,"aria-expanded":d,title:S.groupToggle(a.label,s),onClick:()=>Y(l),...re({kind:"group",key:c},c),className:`relative mb-1 mr-1 flex h-6 shrink-0 items-center gap-1 rounded-full bg-blue-100 px-2 text-xs font-medium text-blue-700 hover:bg-blue-200 ${w}`,children:[
|
|
20
20
|
/* @__PURE__ */y(o,{name:d?"chevron-right":"chevron-down","aria-hidden":"true",className:"size-3",strokeWidth:2}),a.icon&&/* @__PURE__ */y("span",{className:"flex size-3.5 items-center justify-center [&>svg]:size-3.5","aria-hidden":"true",children:a.icon}),
|
|
21
21
|
/* @__PURE__ */y("span",{className:d?"sr-only":"max-w-[12rem] truncate",children:a.label}),
|
|
22
|
-
/* @__PURE__ */y(t,{count:s,label:
|
|
23
|
-
/* @__PURE__ */y("span",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 z-0 h-0.5 bg-blue-500"})]},`rosh-group-${c}`))}return we||xe.push(/* @__PURE__ */y(m,{children:
|
|
22
|
+
/* @__PURE__ */y(t,{count:s,label:X.tabs(s),active:!0})]}),ne?.key===c&&"before"===ne.side&&!ne.inGroup&&/* @__PURE__ */y("span",{"aria-hidden":"true",className:le("before")}),i.map((e,n)=>be(e,n>0?i[n-1]:void 0)),
|
|
23
|
+
/* @__PURE__ */y("span",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 z-0 h-0.5 bg-blue-500"})]},`rosh-group-${c}`))}return we||xe.push(/* @__PURE__ */y(m,{children:B},"rosh-after-pinned")),/* @__PURE__ */p("div",{className:A??"relative flex h-10 shrink-0 items-end gap-3 bg-gray-100 px-3",children:[
|
|
24
24
|
/* @__PURE__ */y("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 h-px bg-gray-200"}),
|
|
25
|
-
/* @__PURE__ */y("div",{role:"tablist","aria-label":T,onKeyDown:e=>{const n=
|
|
25
|
+
/* @__PURE__ */y("div",{role:"tablist","aria-label":T,onKeyDown:e=>{const n=q.findIndex(n=>document.getElementById(f(n.key,"tab"))===e.target);if(n<0)return;const t=e.shiftKey&&(e.ctrlKey||e.metaKey);if(t&&"ArrowRight"===e.key)ue(n,1);else if(t&&"ArrowLeft"===e.key)ue(n,-1);else if("ArrowRight"===e.key)ce(n+1);else if("ArrowLeft"===e.key)ce(n-1);else if("Home"===e.key)ce(0);else if("End"===e.key)ce(q.length-1);else{if("Delete"!==e.key||q[n].pinned)return;j(q[n].key)}e.preventDefault()},className:"flex min-w-0 flex-1 items-end -mx-2 px-2 scroll-px-2 overflow-x-auto overflow-y-hidden [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:xe}),M&&/* @__PURE__ */y("div",{className:"flex shrink-0 items-center gap-2 self-center",children:M}),H&&me&&/* @__PURE__ */p(r,{portal:!0,style:{left:H.x,top:H.y},onClose:()=>P(null),children:[fe.length>0&&/* @__PURE__ */p(g,{children:[fe.map((e,n)=>/* @__PURE__ */p(i,{onClick:ge(e.onSelect),children:[e.icon,e.label]},n)),
|
|
26
26
|
/* @__PURE__ */y(l,{})]}),
|
|
27
27
|
/* @__PURE__ */y(i,{disabled:me.pinned,onClick:ge(()=>j(me.key)),children:S.close}),
|
|
28
28
|
/* @__PURE__ */y(l,{}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Icon as t}from"./chunk-
|
|
1
|
+
import{Icon as t}from"./chunk-JOAKKXTL.js";import{jsxs as n,jsx as e}from"react/jsx-runtime";var r=t=>Array.isArray(t.options);function o(t){const n=[];for(const e of t)r(e)?n.push(...e.options):n.push(e);return n}function i(t,n){const e=[];for(const o of t){if(!r(o)){n(o)&&e.push(o);continue}const t=o.options.filter(n);t.length&&e.push({...o,options:t})}return e}function s(t,o,i,s=""){const a=[];let c=0;return t.forEach((t,u)=>{if(!r(t))return a.push(o(t,c)),void(c+=1);const l=`${i}-group-${u}`,p=c;c+=t.options.length,a.push(
|
|
2
2
|
/* @__PURE__ */n("div",{role:"group","aria-labelledby":l,children:[
|
|
3
3
|
/* @__PURE__ */e("div",{id:l,role:"presentation","data-option-group-heading":"",className:`truncate px-3 pb-1 pt-2 text-xs font-semibold text-gray-500 ${s}`.trim(),children:t.label}),t.options.map((t,n)=>o(t,p+n))]},l))}),a}function a({selected:n}){/* @__PURE__ */
|
|
4
4
|
return e(t,{name:"check","aria-hidden":"true",className:"h-4 w-4 shrink-0 "+(n?"":"invisible"),strokeWidth:2.5})}function c(t,n){return t.label.toLowerCase().includes(n)||(t.sublabel?.toLowerCase().includes(n)??!1)}function u({children:t,grows:n=!1}){/* @__PURE__ */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Avatar as e}from"./chunk-QMNDKNK2.js";import{StatCard as a,Card as t}from"./chunk-BYDSBDVS.js";import{Sparkline as r}from"./chunk-CKCDGSTC.js";import{PieChart as s}from"./chunk-
|
|
1
|
+
import{Avatar as e}from"./chunk-QMNDKNK2.js";import{StatCard as a,Card as t}from"./chunk-BYDSBDVS.js";import{Sparkline as r}from"./chunk-CKCDGSTC.js";import{PieChart as s}from"./chunk-P44RCA6Z.js";import{ColumnChart as l}from"./chunk-SFFELHLP.js";import{StatusBadgeProvider as i,StatusBadge as d}from"./chunk-JMGDGNM7.js";import{Button_default as c}from"./chunk-EVYD6UFQ.js";import{TH_ONE_LINE as n}from"./chunk-G67CJAQ2.js";import{jsx as o,jsxs as m}from"react/jsx-runtime";var u={paid:"success",shipped:"active",processing:"queued",refunded:"neutral",overdue:"danger"},h=[12,18,14,22,19,27,24,31,28,35,30,38],p=["J","F","M","A","M","J","J","A","S","O","N","D"],g=[{key:"direct",label:"Direct",value:45},{key:"search",label:"Search",value:30},{key:"social",label:"Social",value:15},{key:"email",label:"Email",value:10}],x=[{id:"#3201",customer:"Alice Nguyen",total:"$1,204",status:"paid"},{id:"#3202",customer:"Marco Reyes",total:"$642",status:"shipped"},{id:"#3203",customer:"Priya Patel",total:"$2,980",status:"processing"},{id:"#3204",customer:"Tom Becker",total:"$318",status:"overdue"},{id:"#3205",customer:"Sara Lind",total:"$540",status:"refunded"}];function v(){/* @__PURE__ */
|
|
2
2
|
return o(i,{groups:u,children:/* @__PURE__ */o("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */m("div",{className:"mx-auto max-w-6xl space-y-6",children:[
|
|
3
3
|
/* @__PURE__ */m("div",{className:"flex items-center justify-between gap-4",children:[
|
|
4
4
|
/* @__PURE__ */m("div",{children:[
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-JOAKKXTL.js";import{useShellStrings as r}from"./chunk-TJSJVC6P.js";import{jsxs as t,jsx as n,Fragment as i}from"react/jsx-runtime";var a={info:{box:"bg-blue-50 border-blue-200",icon:"text-blue-600"},success:{box:"bg-green-50 border-green-200",icon:"text-green-600"},warning:{box:"bg-amber-50 border-amber-200",icon:"text-amber-600"},danger:{box:"bg-red-50 border-red-200",icon:"text-red-600"},neutral:{box:"bg-[var(--status-neutral-soft)] border-[color:var(--line)]",icon:"text-[color:var(--status-neutral-soft-ink)]"}},s={info:"bg-blue-700 border-blue-700 text-white",success:"bg-green-700 border-green-700 text-white",warning:"bg-amber-700 border-amber-700 text-white",danger:"bg-red-700 border-red-700 text-white",neutral:"bg-[var(--status-neutral-solid)] border-[color:var(--status-neutral-solid)] text-[color:var(--status-on-solid)]"};function o({tone:r}){const t={className:"h-5 w-5","aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
|
|
2
2
|
return n(e,{name:"check-circle",look:"mini",...t});case"warning":/* @__PURE__ */
|
|
3
3
|
return n(e,{name:"warning",look:"mini",...t});case"danger":/* @__PURE__ */
|
|
4
4
|
return n(e,{name:"close-circle",look:"mini",...t});default:/* @__PURE__ */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-JOAKKXTL.js";import{useShellStrings as i}from"./chunk-TJSJVC6P.js";import{Fragment as t}from"react";import{jsx as n,jsxs as a}from"react/jsx-runtime";var s=/* @__PURE__ */n(e,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 text-gray-300","aria-hidden":!0}),r="inline-flex min-w-0 items-center gap-1 truncate rounded px-1 -mx-1 text-gray-500 transition-colors hover:text-gray-900 hover:underline rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]";function l({items:e,separator:l,maxItems:c=0,className:m}){const o=i().breadcrumbs;if(0===e.length)return null;const h=l??s,d=[],u=e.length-1;if(c>0&&e.length>c&&c>=2){const i=Math.max(1,c-1);d.push({kind:"item",item:e[0],isLast:!1}),d.push({kind:"ellipsis"});for(let t=e.length-i;t<=u;t++)d.push({kind:"item",item:e[t],isLast:t===u})}else e.forEach((e,i)=>d.push({kind:"item",item:e,isLast:i===u}));/* @__PURE__ */
|
|
2
2
|
return n("nav",{"aria-label":o.label,className:`min-w-0 ${m??""}`,children:/* @__PURE__ */n("ol",{className:"flex items-center gap-2 text-sm",children:d.map((e,i)=>/* @__PURE__ */a(t,{children:[i>0&&/* @__PURE__ */n("li",{"aria-hidden":!0,className:"flex items-center",children:h}),
|
|
3
3
|
/* @__PURE__ */n("li",{className:"flex min-w-0 items-center",children:"ellipsis"===e.kind?/* @__PURE__ */n("span",{className:"px-0.5 text-gray-400 select-none","aria-label":o.hidden,children:"…"}):e.isLast||!e.item.href&&!e.item.onClick?/* @__PURE__ */a("span",{"aria-current":e.isLast?"page":void 0,className:"inline-flex min-w-0 items-center gap-1 truncate "+(e.isLast?"font-medium text-gray-900":"text-gray-500"),children:[e.item.icon,
|
|
4
4
|
/* @__PURE__ */n("span",{className:"truncate",children:e.item.label})]}):e.item.href?/* @__PURE__ */a("a",{href:e.item.href,onClick:e.item.onClick,className:r,children:[e.item.icon,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-JOAKKXTL.js";import{useShellStrings as r}from"./chunk-TJSJVC6P.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";var s={success:"success",error:"error",warning:"warning",info:"info",404:"info",403:"warning",500:"error"},c={success:"text-green-600 bg-green-100",error:"text-red-600 bg-red-100",warning:"text-amber-600 bg-amber-100",info:"text-blue-600 bg-blue-100"},a={404:e=>e.notFound,403:e=>e.noAccess,500:e=>e.serverError};function i({tone:r}){const t={className:"h-6 w-6",strokeWidth:1.5,"aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
|
|
2
2
|
return n(e,{name:"check",...t});case"error":/* @__PURE__ */
|
|
3
3
|
return n(e,{name:"close",...t});case"warning":/* @__PURE__ */
|
|
4
4
|
return n(e,{name:"error",...t});default:/* @__PURE__ */
|