efficient-shell 15.2.0 → 15.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Browser-42QAXKYW.js → Browser-QK2CCZTR.js} +19 -19
- package/dist/Calculator-DB4U2KXJ.js +29 -0
- package/dist/{CurrencyConverter-VFTDSYQ3.js → CurrencyConverter-D5MWU2M2.js} +9 -9
- package/dist/{Files-OAVWF6EW.js → Files-6WMIQAVD.js} +74 -74
- package/dist/{Notepad-LNNSVEFG.js → Notepad-FKSRP7R6.js} +9 -9
- package/dist/PdfViewer-AIAVQYZ6.js +1 -0
- package/dist/PomodoroTimer-U62N64F6.js +91 -0
- package/dist/{Preview-GDNUQKGN.js → Preview-2GS2CWRA.js} +43 -43
- package/dist/Sidebar-KAALEIIX.js +44 -0
- package/dist/{Stock-NNDDNQBJ.js → Stock-DUXAE4DY.js} +3 -3
- package/dist/{Weather-NGQALCXO.js → Weather-XXPZTLY7.js} +22 -22
- package/dist/{WorldClock-LX4BQPZJ.js → WorldClock-6ANSNTXU.js} +7 -7
- package/dist/ai/index.js +40 -40
- package/dist/apps/index.js +1 -1
- package/dist/bin/browser-check.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/charts/ChordChart.js +1 -1
- package/dist/charts/FlowChart.js +1 -1
- package/dist/charts/RadarChart.js +1 -1
- package/dist/charts/SankeyChart.js +1 -1
- package/dist/charts/SpecChart.js +1 -1
- package/dist/charts/SunburstChart.js +1 -1
- package/dist/charts/TreemapChart.js +1 -1
- package/dist/{chunk-JVITCC65.js → chunk-26ZOXLE6.js} +1 -1
- package/dist/chunk-2RLUG5ID.js +1 -0
- package/dist/{chunk-ZC2FZLYX.js → chunk-345FP3IX.js} +4 -4
- package/dist/chunk-35Q7ZMQD.js +8 -0
- package/dist/{chunk-ZYWLX5EK.js → chunk-3AVXNZY5.js} +1 -1
- package/dist/chunk-3FININUU.js +1 -0
- package/dist/chunk-3H476JWK.js +4 -0
- package/dist/chunk-422SFOQU.js +28 -0
- package/dist/{chunk-QQ6TGD7K.js → chunk-4KPOTWYF.js} +47 -47
- package/dist/{chunk-TWSROAS7.js → chunk-4MDSZSLC.js} +1 -1
- package/dist/{chunk-DXTRHNP4.js → chunk-4NTAZLT3.js} +2 -2
- package/dist/{chunk-TVMDDQJP.js → chunk-52RSW6TO.js} +1 -1
- package/dist/{chunk-26I3OTGP.js → chunk-5B7CLXHC.js} +1 -1
- package/dist/{chunk-SXNT73VT.js → chunk-5LB7LCEG.js} +19 -19
- package/dist/{chunk-CMC25URA.js → chunk-5LG6TOV6.js} +6 -6
- package/dist/{chunk-IIUFCTT6.js → chunk-5OXQ5M5S.js} +1 -1
- package/dist/{chunk-AVUH35GW.js → chunk-5QHNDAZ6.js} +1 -1
- package/dist/{chunk-52YTUQW3.js → chunk-5QRHQCRG.js} +1 -1
- package/dist/{chunk-T43ATI2N.js → chunk-5RCKE4X2.js} +6 -6
- package/dist/{chunk-LFGJUJRZ.js → chunk-5Y2JZL3I.js} +13 -13
- package/dist/{chunk-QIAJ3QNV.js → chunk-62UNBUTU.js} +1 -1
- package/dist/chunk-A4ROXNUF.js +2 -0
- package/dist/{chunk-PAD65HG7.js → chunk-ABIWAS5K.js} +1 -1
- package/dist/{chunk-3TVMQCYR.js → chunk-AKEED2BC.js} +1 -1
- package/dist/chunk-APFDZ2HG.js +1 -0
- package/dist/{chunk-S3F2TY7X.js → chunk-ASNRA3ZL.js} +1 -1
- package/dist/{chunk-QI2LJ7OL.js → chunk-B4Y5NGHR.js} +9 -9
- package/dist/{chunk-ZZKBCNK6.js → chunk-BTMZ5MUY.js} +11 -11
- package/dist/chunk-C4TG6XS4.js +19 -0
- package/dist/{chunk-NXPIX7NO.js → chunk-C75ICYHF.js} +1 -1
- package/dist/{chunk-JJ5W4BRW.js → chunk-CGX2IGQO.js} +1 -1
- package/dist/{chunk-2MUZFHZW.js → chunk-CIZAUBWA.js} +6 -6
- package/dist/{chunk-5JQCWXIQ.js → chunk-CMEPDSYB.js} +1 -1
- package/dist/{chunk-JHEHW5BE.js → chunk-D7MRZZVV.js} +3 -3
- package/dist/chunk-DEV3ZHPP.js +8 -0
- package/dist/chunk-DN6NGGP5.js +8 -0
- package/dist/{chunk-OEZC5N6J.js → chunk-E43VGO66.js} +1 -1
- package/dist/{chunk-7ZJ7VK2N.js → chunk-EJ5NIA42.js} +1 -1
- package/dist/{chunk-M5JEYZ3A.js → chunk-EJMCK7E3.js} +4 -4
- package/dist/{chunk-GBCLIWUQ.js → chunk-EULBBS5L.js} +1 -1
- package/dist/{chunk-7FYTL6SD.js → chunk-FAPZFMS3.js} +1 -1
- package/dist/chunk-FGP2IOFN.js +15 -0
- package/dist/{chunk-ABRCV7DQ.js → chunk-FHTL7ZZR.js} +1 -1
- package/dist/{chunk-KWBYE5MN.js → chunk-GGNQEZ2D.js} +8 -8
- package/dist/{chunk-NBV3XK3Q.js → chunk-GL3D5EOZ.js} +2 -2
- package/dist/{chunk-VQ3OSYTA.js → chunk-GUOAPXUY.js} +4 -4
- package/dist/{chunk-IJWRJPX6.js → chunk-HU5FTTW2.js} +7 -7
- package/dist/{chunk-SKPAIZSC.js → chunk-INQQUAIO.js} +4 -4
- package/dist/{chunk-HMTZP7NJ.js → chunk-JA4I5BEB.js} +1 -1
- package/dist/{chunk-ZQWKVLSY.js → chunk-JGN27L4Q.js} +12 -12
- package/dist/{chunk-BN37AISA.js → chunk-JIHDUZJZ.js} +3 -3
- package/dist/chunk-JRKD7SD3.js +24 -0
- package/dist/{chunk-FYHUCRLU.js → chunk-JWS77LQE.js} +1 -1
- package/dist/{chunk-6F3XQJR6.js → chunk-KERCZSIA.js} +1 -1
- package/dist/{chunk-ECZEJ6BE.js → chunk-KIIZNION.js} +6 -6
- package/dist/{chunk-L664TIIV.js → chunk-KJ4CHRRC.js} +7 -7
- package/dist/{chunk-VIBGF2HJ.js → chunk-L2WQOJ3T.js} +1 -1
- package/dist/{chunk-3CIJFWB4.js → chunk-LFUXWZV7.js} +1 -1
- package/dist/{chunk-OCKOZV46.js → chunk-LGVVXYW7.js} +1 -1
- package/dist/{chunk-ZS36DB4X.js → chunk-MF7OELXP.js} +2 -2
- package/dist/{chunk-OCITNQGF.js → chunk-MQNSKFZY.js} +10 -10
- package/dist/{chunk-M6ODRWTM.js → chunk-NJY4HPNB.js} +5 -5
- package/dist/{chunk-MDGM5NUO.js → chunk-NM7U42KL.js} +9 -9
- package/dist/{chunk-2QUACZ6O.js → chunk-NZNPU2GD.js} +1 -1
- package/dist/{chunk-QBR73AJX.js → chunk-OEWBWKKD.js} +11 -11
- package/dist/{chunk-LKNDLXL3.js → chunk-OHWP24DL.js} +1 -1
- package/dist/{chunk-VNKLIWNQ.js → chunk-OK2J6WSC.js} +1 -1
- package/dist/{chunk-3HPCQMYH.js → chunk-P56YLT73.js} +12 -12
- package/dist/{chunk-VTYALYW4.js → chunk-PCNFY6EK.js} +12 -12
- package/dist/{chunk-FM5ASDVN.js → chunk-PM6HY5BH.js} +1 -1
- package/dist/{chunk-ABAUJLI4.js → chunk-PO2KNVCC.js} +1 -1
- package/dist/chunk-PRN2QDX6.js +7 -0
- package/dist/{chunk-7M7GKYHS.js → chunk-QE2F4YQQ.js} +9 -9
- package/dist/{chunk-QJY52ZHG.js → chunk-QSFQTMWV.js} +1 -1
- package/dist/{chunk-YVI2XJCB.js → chunk-QSOBETAI.js} +5 -5
- package/dist/chunk-QXEZBS3H.js +6 -0
- package/dist/{chunk-32HTOZFT.js → chunk-QYOIS4BN.js} +3 -3
- package/dist/chunk-R6YVKP6D.js +3 -0
- package/dist/chunk-R72SBGYR.js +9 -0
- package/dist/{chunk-QMUW35QL.js → chunk-RIA6KKIB.js} +6 -6
- package/dist/{chunk-D3L2QCGF.js → chunk-RTZFWH5U.js} +1 -1
- package/dist/{chunk-HVWRF7N4.js → chunk-S6C7X6CR.js} +19 -19
- package/dist/{chunk-7T6NWAPG.js → chunk-SJUEGYT2.js} +1 -1
- package/dist/{chunk-JE4BGFDJ.js → chunk-TAB3K2WF.js} +1 -1
- package/dist/{chunk-4H4HJIWI.js → chunk-TAIH2VIW.js} +1 -1
- package/dist/{chunk-NTVACRKD.js → chunk-TALQMTCE.js} +3 -3
- package/dist/{chunk-KKZXGWSX.js → chunk-TEYG2W7A.js} +2 -2
- package/dist/{chunk-FZZBBZXZ.js → chunk-TMXMIRWG.js} +8 -8
- package/dist/{chunk-J43RRDEP.js → chunk-TSZPGDU3.js} +1 -1
- package/dist/{chunk-HKXP3JJ5.js → chunk-TTUUXGEW.js} +1 -1
- package/dist/{chunk-T65TAQLW.js → chunk-TXGVSWH6.js} +13 -13
- package/dist/{chunk-UA7SWROJ.js → chunk-U7PA4KNZ.js} +3 -3
- package/dist/{chunk-2M3KB4RH.js → chunk-UYM7562M.js} +2 -2
- package/dist/chunk-V4BA3FGC.js +14 -0
- package/dist/{chunk-JFTLFF52.js → chunk-V62FEHS4.js} +3 -3
- package/dist/{chunk-PYGXSGXC.js → chunk-VB4ZPIZF.js} +1 -1
- package/dist/{chunk-K3OLOLFT.js → chunk-VHBRVW5O.js} +3 -3
- package/dist/{chunk-5R25GNE2.js → chunk-WNHDYTTI.js} +2 -2
- package/dist/chunk-WR3SULZW.js +13 -0
- package/dist/{chunk-WHHHECBC.js → chunk-WSQ73CRR.js} +2 -2
- package/dist/{chunk-BMZL5BHA.js → chunk-XMBMI27I.js} +1 -1
- package/dist/{chunk-HBAATSUS.js → chunk-XSMVWJV3.js} +1 -1
- package/dist/{chunk-M4NT6HGJ.js → chunk-YEDAXZYO.js} +1 -1
- package/dist/{chunk-ILH7RDAD.js → chunk-YGNJIOOH.js} +10 -10
- package/dist/{chunk-C5Q4AKXO.js → chunk-YXMXATYP.js} +1 -1
- package/dist/data/DataTable.js +1 -1
- package/dist/data/EntityList.js +1 -1
- package/dist/data/Gantt.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/ListToolbar.js +1 -1
- package/dist/data/ResizableTable.js +1 -1
- package/dist/data/statusColumn.js +1 -1
- package/dist/forms/AlignmentGrid.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Button.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DatePicker.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/IconButton.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/Input.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.js +1 -1
- package/dist/forms/NumericKeypad.js +1 -1
- package/dist/forms/PictureTiles.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/RenameField.js +1 -1
- package/dist/forms/SearchInput.js +1 -1
- package/dist/forms/Segmented.js +1 -1
- package/dist/forms/Select.js +1 -1
- package/dist/forms/SidesInput.js +1 -1
- package/dist/forms/Slider.js +1 -1
- package/dist/forms/Snippet.js +1 -1
- package/dist/forms/SplitButton.js +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/UnitMenu.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/index.js +359 -359
- package/dist/map/index.js +5 -5
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/routine-index.json +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContextMenu.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/DropdownMenu.js +1 -1
- package/dist/shell/EditableGrid.js +1 -1
- package/dist/shell/FloatingBar.js +1 -1
- package/dist/shell/GlobalSearch.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/IconRail.js +1 -1
- package/dist/shell/ImageLightbox.js +1 -1
- package/dist/shell/ItemCount.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/Popover.js +1 -1
- package/dist/shell/PopupMenu.js +1 -1
- package/dist/shell/ResizeHandle.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/SidebarNav.js +1 -1
- package/dist/shell/SortableList.js +1 -1
- package/dist/shell/StatusBadge.js +1 -1
- package/dist/shell/Tabs.js +1 -1
- package/dist/shell/Tooltip.js +1 -1
- package/dist/shell/TopNav.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/discardGuard.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/AuthScreen.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DashboardTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/ErrorBoundary.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/value-index.json +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-C7APPCLE.js +0 -29
- package/dist/PdfViewer-ADPTYOAO.js +0 -1
- package/dist/PomodoroTimer-AGSHX2JO.js +0 -91
- package/dist/Sidebar-SWLVNJ6L.js +0 -44
- package/dist/chunk-7QFXUNFA.js +0 -8
- package/dist/chunk-7YJBWOQG.js +0 -2
- package/dist/chunk-CIT4YPEO.js +0 -8
- package/dist/chunk-DTZDOXK3.js +0 -19
- package/dist/chunk-EQDYCSUX.js +0 -13
- package/dist/chunk-IBPJJO4N.js +0 -28
- package/dist/chunk-M6T7N4SN.js +0 -14
- package/dist/chunk-MQERW3QR.js +0 -3
- package/dist/chunk-NJJG2VAW.js +0 -24
- package/dist/chunk-QVGASI5H.js +0 -9
- package/dist/chunk-QZYV4TDD.js +0 -1
- package/dist/chunk-S6IW2F4J.js +0 -8
- package/dist/chunk-TB7BO2XS.js +0 -6
- package/dist/chunk-UMLXFQVC.js +0 -1
- package/dist/chunk-XQMVECQM.js +0 -15
- package/dist/chunk-YX4QGW7Z.js +0 -4
- package/dist/chunk-Z2MP46QJ.js +0 -1
- package/dist/chunk-ZUQ72WER.js +0 -7
- /package/dist/{chunk-LPQQNPH5.js → chunk-TEQ5ZPAL.js} +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import{firstEnabledIndex as e,matchTypeahead as t,lastEnabledIndex as r,nextEnabledIndex as n}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as i,groupedRows as a,isOptionGroup as l,OptionCheck as o}from"./chunk-K5YT5PMJ.js";import{useSettingAuto as d}from"./chunk-2NMW66P5.js";import{inputClasses as s,PLACEHOLDER_INK as c}from"./chunk-AYZY3YNC.js";import{useIsMobile as u}from"./chunk-UGTRSRIW.js";import{optionNoteClass as p}from"./chunk-URHGHXDN.js";import{Icon as m}from"./chunk-ISVODSRP.js";import{onOverlayOpen as v}from"./chunk-PGN5ME7B.js";import{createShellPortal as h}from"./chunk-5QRHQCRG.js";import{Z_LAYERS as f}from"./chunk-62LW225J.js";import{useDropdownPosition as b,MENU_MAX_HEIGHT as g}from"./chunk-TAHHZGRH.js";import{useBrowserLayoutEffect as y}from"./chunk-PU2GJVMG.js";import{useRowControlSize as x}from"./chunk-3FININUU.js";import{registerModalEscapeInterceptor as k}from"./chunk-TWVUQUUD.js";import{solidSurfaceStyle as N}from"./chunk-5FYDNH4Y.js";import{useShellStrings as w}from"./chunk-NRHG4R2Q.js";import{forwardRef as $,useId as D,useState as j,useRef as H,useMemo as S,useCallback as T,useEffect as I}from"react";import{jsxs as C,jsx as R,Fragment as E}from"react/jsx-runtime";var O=e=>e.labelStyle?{lineHeight:1.25,...e.labelStyle}:void 0,z=$(function({value:e,onChange:t,options:r,placeholder:n,invalid:i,className:a="",size:l,touchSize:o,renderOption:c,renderValue:u,valueText:p,readOnly:m,footer:v,changed:h,auto:f,multiple:b,"aria-describedby":g,...y},x){const k=t,N=w(),$=d(),j=f??$,H=D(),S=/* @__PURE__ */C("select",{ref:x,value:e,multiple:b||void 0,onChange:e=>k(b?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),"aria-invalid":i||void 0,"aria-describedby":[g,j?H:void 0].filter(Boolean).join(" ")||void 0,className:s({invalid:i,size:l,auto:j,className:`pr-8 ${a}`.trim()}),...y,children:[void 0!==n&&!b&&/* @__PURE__ */R("option",{value:"",disabled:!0,children:n}),
|
|
2
|
+
/* @__PURE__ */R(U,{items:r})]});return j?/* @__PURE__ */C(E,{children:[S,
|
|
3
|
+
/* @__PURE__ */R("span",{id:H,hidden:!0,children:N.settingView.auto})]}):S});function U({items:e}){const t=e=>/* @__PURE__ */R("option",{value:e.value,disabled:e.disabled,lang:e.lang,children:e.label},e.value);/* @__PURE__ */
|
|
4
|
+
return R(E,{children:e.map((e,r)=>(e=>l(e))(e)?/* @__PURE__ */R("optgroup",{label:e.label,children:e.options.map(t)},`group-${r}`):t(e))})}var A=$(function({value:l,onChange:u,options:$,placeholder:z,invalid:A,className:P="",id:V,disabled:G,size:K,touchSize:M,title:Y,multiple:B,renderOption:F,renderValue:W,valueText:L,readOnly:Q=!1,footer:J,changed:q=!1,auto:X,"aria-describedby":Z,"aria-label":_,"aria-labelledby":ee,...te},re){const ne=x(K),[ie,ae]=j(!1),[le,oe]=j(-1),de=H(null),se=H(null),ce=H(null),ue=H(null),pe=H([]),me=()=>ue.current??ce.current,ve=!!J?.length,he="sm"===ne,fe=he?"min-h-7 px-3 py-1 text-xs leading-4":"min-h-(--row-height-menu) px-3 py-2 text-sm leading-5",be=p(he),[ge,ye]=j(null),xe=w(),ke=H(ie);ke.current=ie;const Ne=H({buffer:"",timer:null}),we=D(),$e=`${we}-listbox`,De=V??`${we}-trigger`,je=e=>`${we}-opt-${e}`,He=`${we}-changed`,Se=d(),Te=X??Se,Ie=`${we}-auto`,Ce=[Z,q?He:void 0,Te?Ie:void 0].filter(Boolean).join(" ")||void 0,Re=S(()=>i($),[$]),Ee=B?l:[],Oe=u,ze=b(se,ie,{matchTriggerWidth:!0,...J?.length?{preferredMaxHeight:Number.POSITIVE_INFINITY}:{}}),Ue=`${ie}|${ze?.top}|${ze?.bottom}|${ze?.maxHeight}|${$.length}`;y(()=>{ye(null)},[Ue]),y(()=>{const e=ce.current;if(!ie||!e||null!==ge)return;if(e.scrollHeight<=e.clientHeight+1)return;const t=getComputedStyle(e),r=parseFloat(t.paddingTop)||0;parseFloat(t.paddingBottom);const n=e.getBoundingClientRect().top;let i=0;for(const t of e.querySelectorAll('[role="option"]')){const r=t.getBoundingClientRect().bottom-n+e.scrollTop;if(!(r<=e.clientHeight+.5))break;i=r}i>r&&ye(Math.floor(i))},[ie,ge,Ue]);const Ae=B?Re.findIndex(e=>Ee.includes(e.value)):Re.findIndex(e=>e.value===l),Pe=B?Re.filter(e=>Ee.includes(e.value)).map(e=>e.label).join(", ")||void 0:Ae>=0?Re[Ae].label:void 0,Ve=!B&&Ae>=0?Re[Ae].lang:void 0,Ge=B?Re.filter(e=>Ee.includes(e.value)):Ae>=0?[Re[Ae]]:[],Ke=W&&Ge.length?W(Ge):void 0,Me=void 0!==Ke&&L?L(Ge):void 0,Ye=T((e=!0)=>{ae(!1),oe(-1),e&&se.current?.focus()},[]),Be=T(()=>{G||Q||(oe(Ae>=0?Ae:e(Re)),ae(!0))},[G,Q,Re,Ae]),Fe=T(e=>{const t=Re[e];if(t&&!t.disabled){if(B){const r=l;return Oe(r.includes(t.value)?r.filter(e=>e!==t.value):[...r,t.value]),void oe(e)}Oe(t.value),Ye()}},[Re,B,l,Oe,Ye]);I(()=>{if(!ie)return;return k(e=>!("Escape"!==e.key||!ke.current)&&(Ye(),!0),me)},[ie,Ye]),I(()=>{if(!ie)return;const e=e=>{const t=e.target;de.current?.contains(t)||me()?.contains(t)||Ye(!1)};document.addEventListener("pointerdown",e);const t=v(()=>Ye(!1));return()=>{document.removeEventListener("pointerdown",e),t()}},[ie,Ye]),I(()=>{!ie||le<0||ce.current?.querySelector(`#${CSS.escape(je(le))}`)?.scrollIntoView({block:"nearest"})},[ie,le]);const We=T(e=>{const r=Ne.current;r.timer&&clearTimeout(r.timer),r.buffer+=e,r.timer=setTimeout(()=>{r.buffer="",r.timer=null},500);const n=ie?le:Ae,i=t(Re,r.buffer,n);i<0||(ie?oe(i):B?(oe(i),ae(!0)):Fe(i))},[ie,le,Ae,Re,Fe,B]),Le=ie?a($,(e,t)=>{const r=(n=e.value,B?Ee.includes(n):l===n);var n;const i=t===le;/* @__PURE__ */
|
|
5
|
+
return C("div",{id:je(t),role:"option",lang:e.description||e.labelStyle||F?void 0:e.lang,"aria-selected":r,"aria-disabled":e.disabled||void 0,onPointerEnter:()=>{e.disabled||oe(t)},onClick:()=>Fe(t),className:`mx-1 cursor-pointer truncate rounded-lg ${fe}${B?" flex items-center gap-2":""}\n ${e.disabled?"cursor-not-allowed text-gray-400":i?"bg-blue-50 text-blue-700":r?"font-medium text-blue-600":"text-gray-700"}`,children:[B&&/* @__PURE__ */R(o,{selected:r}),F?/* @__PURE__ */R("span",{className:"block min-w-0 flex-1 truncate",children:F(e,{selected:r,active:i})}):B?/* @__PURE__ */C("span",{className:"block min-w-0 flex-1",children:[
|
|
6
|
+
/* @__PURE__ */R("span",{lang:e.lang,className:"block truncate",style:O(e),children:e.label}),e.description&&/* @__PURE__ */R("span",{className:be,children:e.description})]}):e.description||e.labelStyle?
|
|
7
|
+
/* @__PURE__ */C(E,{children:[
|
|
8
|
+
/* @__PURE__ */R("span",{lang:e.lang,className:"block truncate",style:O(e),children:e.label}),e.description&&/* @__PURE__ */R("span",{className:be,children:e.description})]}):e.label]},e.value)},we,"mx-1"):null,Qe=void 0!==Ke?
|
|
9
|
+
/* @__PURE__ */C("span",{className:"relative block min-w-0 truncate",children:[
|
|
10
|
+
/* @__PURE__ */R("span",{"aria-hidden":"true","data-select-value":"",className:"flex min-w-0 items-center gap-2 truncate",children:Ke}),
|
|
11
|
+
/* @__PURE__ */R("span",{lang:void 0===Me?Ve:void 0,className:"sr-only",children:Me??Pe})]}):/* @__PURE__ */R("span",{lang:Ve,className:`block truncate ${void 0===Pe?c:""}`,children:Pe??z??" "}),Je={zIndex:f.popup,left:ze?.left,top:ze?.top,bottom:ze?.bottom,width:ze?.width,maxHeight:ze?.maxHeight??g,visibility:ze?void 0:"hidden",...N()},qe=/* @__PURE__ */R("div",{ref:ce,id:$e,role:"listbox","aria-labelledby":ee??(_?void 0:De),"aria-label":ee?void 0:_,"aria-multiselectable":B||void 0,className:ve?"min-h-0 shrink overflow-y-auto py-1":"fixed overflow-y-auto rounded-(--radius-popup) py-1",style:ve?null!==ge?{maxHeight:ge}:void 0:null!==ge?{...Je,maxHeight:ge}:Je,children:Le}),Xe=ve?/* @__PURE__ */C("div",{ref:ue,className:"fixed flex flex-col overflow-hidden rounded-(--radius-popup)",style:Je,children:[qe,
|
|
12
|
+
/* @__PURE__ */R("div",{className:"shrink-0 border-t border-(--rosh-glass-solid-border) px-1 py-1",children:J.map((e,t)=>/* @__PURE__ */C("button",{ref:e=>{pe.current[t]=e},type:"button","data-select-action":"","aria-disabled":e.disabled||void 0,onClick:()=>(e=>{e.disabled||(Ye(),e.onSelect())})(e),onKeyDown:e=>((e,t)=>{const r=(J?.length??0)-1,n=t=>{e.preventDefault(),pe.current[t]?.focus()},i=()=>{e.preventDefault(),se.current?.focus()};switch(e.key){case"ArrowDown":return void n(Math.min(t+1,r));case"ArrowUp":return void(0===t?i():n(t-1));case"Home":return void n(0);case"End":return void n(r);case"Tab":return e.shiftKey?void(0===t?i():n(t-1)):t<r?void n(t+1):(e.preventDefault(),void Ye());case"Escape":return e.preventDefault(),e.stopPropagation(),void Ye()}})(e,t),className:`flex w-full items-center gap-2 rounded-lg ${fe} text-left rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${e.disabled?"cursor-not-allowed text-ink-faintest":"cursor-pointer text-ink hover:bg-accent-tint hover:text-blue-700"}`,children:[e.icon&&/* @__PURE__ */R(m,{name:e.icon,"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
|
|
13
|
+
/* @__PURE__ */R("span",{className:"min-w-0 flex-1 truncate",children:e.label})]},e.label))})]}):qe;/* @__PURE__ */
|
|
14
|
+
return C("div",{ref:de,className:"relative",children:[
|
|
15
|
+
/* @__PURE__ */R("button",{ref:se,id:De,type:"button",role:"combobox","aria-haspopup":"listbox","aria-expanded":ie,"aria-controls":ie?$e:void 0,"aria-activedescendant":ie&&le>=0?je(le):void 0,"aria-invalid":A||void 0,"aria-describedby":Ce,"aria-label":_,"aria-labelledby":ee,title:Y,disabled:G,"aria-readonly":Q||void 0,onClick:()=>ie?Ye():Be(),onKeyDown:t=>{if(!G&&!Q)switch(t.key){case"ArrowDown":return t.preventDefault(),void(ie?oe(e=>n(Re,e,1)):Be());case"ArrowUp":return t.preventDefault(),void(ie?oe(e=>n(Re,e,-1)):Be());case"Home":return void(ie&&(t.preventDefault(),oe(e(Re))));case"End":return void(ie&&(t.preventDefault(),oe(r(Re))));case"Enter":return void(ie&&(t.preventDefault(),Fe(le)));case" ":return t.preventDefault(),void(ie?Fe(le):Be());case"Escape":return void(ie&&(t.preventDefault(),t.stopPropagation(),Ye()));case"Tab":return ie&&ve&&!t.shiftKey?(t.preventDefault(),void pe.current[0]?.focus()):void(ie&&Ye(!1));default:1!==t.key.length||t.metaKey||t.ctrlKey||t.altKey||(t.preventDefault(),We(t.key))}},className:s({invalid:A,size:ne,readOnly:Q,auto:Te,className:`${Q?"":"pr-8 "}text-left ${P}`.trim()}),children:q?
|
|
16
|
+
/* @__PURE__ */C("span",{className:"flex min-w-0 items-center gap-1",children:[Qe,
|
|
17
|
+
/* @__PURE__ */R("span",{"aria-hidden":"true","data-select-changed":"",className:"shrink-0",children:"*"})]}):Qe}),q&&/* @__PURE__ */R("span",{id:He,hidden:!0,children:xe.select.changed}),Te&&/* @__PURE__ */R("span",{id:Ie,hidden:!0,children:xe.settingView.auto}),!Q&&/* @__PURE__ */R(m,{name:"chevron-up-down","aria-hidden":"true",className:`pointer-events-none absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 ${c}`,strokeWidth:2}),
|
|
18
|
+
/* @__PURE__ */C("select",{ref:re,value:l,multiple:B||void 0,onChange:e=>Oe(B?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),disabled:G,"aria-hidden":"true",tabIndex:-1,className:"sr-only",...te,children:[void 0!==z&&!B&&/* @__PURE__ */R("option",{value:"",disabled:!0,children:z}),
|
|
19
|
+
/* @__PURE__ */R(U,{items:$})]}),ie&&h(Xe,document.body)]})}),P=$(function({touchSize:e,...t},r){const n=u(),i=e??"touch";return!n||void 0===t.footer&&void 0===t.changed||t.readOnly?n&&!t.readOnly?/* @__PURE__ */R(z,{ref:r,...t,size:i}):/* @__PURE__ */R(A,{ref:r,...t}):/* @__PURE__ */R(A,{ref:r,...t,size:i})});export{z as NativeSelect,P as Select_default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{RowControlSizeContext as r}from"./chunk-
|
|
1
|
+
import{RowControlSizeContext as r}from"./chunk-3FININUU.js";import{jsx as e}from"react/jsx-runtime";function i({children:i,className:t=""}){/* @__PURE__ */
|
|
2
2
|
return e("div",{"data-list-toolbar":"",className:`flex min-h-(--row-height-window-bar) shrink-0 flex-wrap items-center gap-2 border-b border-line px-3 py-2 ${t}`.trim(),children:/* @__PURE__ */e(r.Provider,{value:"md",children:i})})}export{i as ListToolbar};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{SidebarLayout as e}from"./chunk-
|
|
1
|
+
import{SidebarLayout as e}from"./chunk-TMXMIRWG.js";import{Avatar as t}from"./chunk-SCNQK5NF.js";import{Input_default as a}from"./chunk-D7MRZZVV.js";import{Button_default as i}from"./chunk-A4ROXNUF.js";import{useState as s}from"react";import{jsx as n,jsxs as l}from"react/jsx-runtime";var r=[{id:1,name:"Priya Patel",last:"Sounds good — shipping it now",time:"9:41",status:"online"},{id:2,name:"Design team",last:"Marco: updated the tokens",time:"9:12",status:"away"},{id:3,name:"Tom Becker",last:"Thanks!",time:"Yest",status:"offline"},{id:4,name:"Sara Lind",last:"See you Friday 🎉",time:"Yest",status:"busy"}],m=[{mine:!1,text:"Hey! Did the latest build go out?"},{mine:!0,text:"Just merged — deploying now."},{mine:!1,text:"Nice. Any breaking changes for the portal?"},{mine:!0,text:"Nope, fully additive. New components only."},{mine:!1,text:"Sounds good — shipping it now"}];function d(){const[d,o]=s(1),c=r.find(e=>e.id===d)??r[0];/* @__PURE__ */
|
|
2
2
|
return n("div",{className:"h-full",children:/* @__PURE__ */n(e,{side:"left",defaultWidth:260,sidebar:/* @__PURE__ */n("div",{className:"h-full overflow-auto",children:r.map(e=>/* @__PURE__ */l("button",{onClick:()=>o(e.id),className:"flex w-full items-center gap-3 border-b border-gray-100 px-3 py-3 text-left hover:bg-gray-50 "+(e.id===d?"bg-blue-50/50":""),children:[
|
|
3
3
|
/* @__PURE__ */n(t,{name:e.name,status:e.status}),
|
|
4
4
|
/* @__PURE__ */l("div",{className:"min-w-0 flex-1",children:[
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{onOverlayOpen as t}from"./chunk-PGN5ME7B.js";import{createShellPortal as e}from"./chunk-
|
|
2
|
-
return y("span",{ref:
|
|
3
|
-
/* @__PURE__ */k(H.Provider,{value:!0,children:q}),
|
|
4
|
-
/* @__PURE__ */y("span",{className:"pointer-events-none fixed left-0 top-0",style:{zIndex:r.hint,...
|
|
5
|
-
/* @__PURE__ */k("span",{ref:
|
|
6
|
-
/* @__PURE__ */k("span",{"aria-hidden":"true",className:"rosh-tooltip-arrow","data-side":
|
|
1
|
+
import{onOverlayOpen as t}from"./chunk-PGN5ME7B.js";import{createShellPortal as e}from"./chunk-5QRHQCRG.js";import{Z_LAYERS as r}from"./chunk-62LW225J.js";import{followAnchor as o,popupBounds as n,VIEWPORT_MARGIN as i,showingBox as a,placeBeside as l,placeArrow as c}from"./chunk-TAHHZGRH.js";import{useBrowserLayoutEffect as s}from"./chunk-PU2GJVMG.js";import{registerModalEscapeInterceptor as d,escapeSurfaceAbove as h}from"./chunk-TWVUQUUD.js";import{solidSurfaceStyle as u}from"./chunk-5FYDNH4Y.js";import{createContext as p,useContext as m,useState as f,useRef as x,useId as w,useEffect as g,isValidElement as b,cloneElement as v}from"react";import{jsxs as y,jsx as k}from"react/jsx-runtime";var H=p(!1),j=()=>m(H),T={top:"bottom-full left-1/2 -translate-x-1/2 mb-3",bottom:"top-full left-1/2 -translate-x-1/2 mt-3",left:"right-full top-1/2 -translate-y-1/2 mr-3",right:"left-full top-1/2 -translate-y-1/2 ml-3"};function W({content:p,side:m="top",delay:j=200,children:W,className:N="relative inline-flex",describe:M=!0,open:B}){const[G,R]=f(!1),C=(B??G)&&!(null==p||!1===p||""===p),[P,U]=f(null),z=x(void 0),D=x(null),E=x(null),Q=w(),$=x(!1),F=()=>{window.clearTimeout(z.current),$.current||D.current?.querySelector('[aria-haspopup][aria-expanded="true"]')||(z.current=window.setTimeout(()=>R(!0),j))},J=()=>{window.clearTimeout(z.current),R(!1)},L=t=>{t.currentTarget.contains(t.target)&&($.current=!0,J())},V=()=>{$.current=!1,J()};g(()=>()=>window.clearTimeout(z.current),[]),s(()=>{if(!C)return void U(null);const t=()=>{const t=D.current,e=E.current;if(!t||!e)return;const r=n(t),o=Math.max(0,r.right-r.left-2*i),s=Math.max(0,r.bottom-r.top-2*i);e.style.maxWidth=`${o}px`,e.style.maxHeight=`${s}px`;const d=e.getBoundingClientRect();if(d.width<=0||d.height<=0)return;const h=t.getBoundingClientRect();if(!a(t))return void J();const u=l(h,d,m,r,12),p=c(h,u,d,16,6),f={anchor:{left:h.left,top:h.top,width:h.width,height:h.height},left:u.left-h.left,top:u.top-h.top,maxWidth:o,maxHeight:s,side:u.side,arrow:p&&{left:p.x-h.left,top:p.y-h.top}};U(t=>{return t&&(r=f,(e=t).anchor.left===r.anchor.left&&e.anchor.top===r.anchor.top&&e.anchor.width===r.anchor.width&&e.anchor.height===r.anchor.height&&e.left===r.left&&e.top===r.top&&e.maxWidth===r.maxWidth&&e.maxHeight===r.maxHeight&&e.side===r.side&&e.arrow?.left===r.arrow?.left&&e.arrow?.top===r.arrow?.top)?t:f;var e,r})};return t(),o(()=>D.current,t)},[C,m,p]),g(()=>{if(!C)return;const e=d(t=>"Escape"===t.key&&(J(),!h(D.current))),r=t(J);return()=>{e(),r()}},[C]);const Y=C&&M?Q:void 0,q=b(W)?v(W,{"aria-describedby":[W.props["aria-describedby"],Y].filter(Boolean).join(" ")||void 0}):W,A=C?u():void 0;/* @__PURE__ */
|
|
2
|
+
return y("span",{ref:D,className:N,"aria-describedby":b(W)?void 0:Y,onMouseEnter:F,onMouseLeave:V,onFocus:t=>{if(!t.currentTarget.contains(t.target))return;let e=!0;try{e=t.target.matches(":focus-visible")}catch{}e&&F()},onBlur:V,onPointerDown:L,onClick:L,children:[
|
|
3
|
+
/* @__PURE__ */k(H.Provider,{value:!0,children:q}),C&&e(
|
|
4
|
+
/* @__PURE__ */y("span",{className:"pointer-events-none fixed left-0 top-0",style:{zIndex:r.hint,...P?.anchor},children:[
|
|
5
|
+
/* @__PURE__ */k("span",{ref:E,id:Q,role:"tooltip",className:`pointer-events-none absolute z-(--z-hint) box-border w-max overflow-hidden whitespace-normal break-words text-start rounded-md px-2 py-1 text-xs text-ink-strong ${P?"":T[m]}`,style:{...A,...P&&{left:P.left,top:P.top,maxWidth:P.maxWidth,maxHeight:P.maxHeight}},children:p}),(!P||P.arrow)&&
|
|
6
|
+
/* @__PURE__ */k("span",{"aria-hidden":"true",className:"rosh-tooltip-arrow","data-side":P?.side??m,style:{background:A?.background,"--rosh-tooltip-edge":A?.border,...P?.arrow&&{left:P.arrow.left,top:P.arrow.top}}})]}),document.body)]})}export{W as Tooltip,j as useInsideTooltip};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{formatMoney as e}from"./chunk-OJI4ROSD.js";import{EMPTY_VALUE as r}from"./chunk-36BRD5J3.js";import{TimeSeriesChart as t}from"./chunk-P5TSGXL4.js";import{ChartFrame as a}from"./chunk-A6TOHNJY.js";import{ColumnChart as l}from"./chunk-AQVPWUJ3.js";import{TH_ONE_LINE as s}from"./chunk-
|
|
1
|
+
import{formatMoney as e}from"./chunk-OJI4ROSD.js";import{EMPTY_VALUE as r}from"./chunk-36BRD5J3.js";import{TimeSeriesChart as t}from"./chunk-P5TSGXL4.js";import{ChartFrame as a}from"./chunk-A6TOHNJY.js";import{ColumnChart as l}from"./chunk-AQVPWUJ3.js";import{TH_ONE_LINE as s}from"./chunk-FAPZFMS3.js";import{jsxs as o,jsx as i}from"react/jsx-runtime";function n({spec:n,height:c=200,width:m,animate:d=!0,className:h}){const u=function(r){if(r.currency)return t=>e(t,r.currency);const t=r.unit?` ${r.unit}`:"";return e=>`${e.toLocaleString("en-US",{maximumFractionDigits:2})}${t}`}(n),p=n.currency?r=>e(r,n.currency,{whole:!0}):u,b=n.series.map((e,r)=>({key:`s${r}`,label:e.name,data:e.values})),y=n.title??n.series.map(e=>e.name).join(", "),f=/* @__PURE__ */o("table",{className:"w-full border-collapse text-sm",children:[
|
|
2
2
|
/* @__PURE__ */i("thead",{children:/* @__PURE__ */o("tr",{children:[
|
|
3
3
|
/* @__PURE__ */i("td",{className:"border-b border-gray-200"}),n.series.map((e,r)=>/* @__PURE__ */i("th",{scope:"col",className:`${s} border-b border-gray-200 px-2 py-1 text-right font-semibold text-gray-700`,children:e.name},r))]})}),
|
|
4
4
|
/* @__PURE__ */i("tbody",{children:n.x.map((e,t)=>/* @__PURE__ */o("tr",{children:[
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{inputClasses as r,PLACEHOLDER_INK as e}from"./chunk-AYZY3YNC.js";import{DropdownMenu as n}from"./chunk-
|
|
1
|
+
import{inputClasses as r,PLACEHOLDER_INK as e}from"./chunk-AYZY3YNC.js";import{DropdownMenu as n}from"./chunk-NJY4HPNB.js";import{IconButton_default as t}from"./chunk-APFDZ2HG.js";import{Tooltip as i}from"./chunk-CIZAUBWA.js";import{useRowControlSize as a}from"./chunk-3FININUU.js";import{iconButtonClasses as s}from"./chunk-UQYNPYF4.js";import{forwardRef as o}from"react";import{jsx as l,jsxs as c}from"react/jsx-runtime";var m={sm:"sm",md:"sm",lg:"md",touch:"touch-sm"},p={sm:"pr-8",md:"pr-8",lg:"pr-10",touch:"pr-12"};function d({children:r}){/* @__PURE__ */
|
|
2
2
|
return l("span",{className:"absolute right-1 top-1/2 flex -translate-y-1/2 items-center gap-1",children:r})}function u({action:r,size:e="md"}){/* @__PURE__ */
|
|
3
3
|
return l(f,{action:r,size:m[e]})}var h=["","pr-8","pr-16"];function f({action:r,size:e}){const{label:a,icon:o,onClick:c,menu:m}=r;/* @__PURE__ */
|
|
4
|
-
return l(i,{content:a,describe:!1,children:m?/* @__PURE__ */l(n,{"aria-label":a,trigger:o,items:m,triggerClassName:s({size:e})}):/* @__PURE__ */l(t,{"aria-label":a,size:e,onClick:c,children:o})})}var
|
|
5
|
-
/* @__PURE__ */l("input",{ref:
|
|
4
|
+
return l(i,{content:a,describe:!1,children:m?/* @__PURE__ */l(n,{"aria-label":a,trigger:o,items:m,triggerClassName:s({size:e})}):/* @__PURE__ */l(t,{"aria-label":a,size:e,onClick:c,children:o})})}var N=o(function({invalid:n,leftIcon:t,rightAdornment:i,endAction:s,size:o,className:m="",readOnly:h,...f},N){const g=a(o),v=g??"md",j=`${t?"pl-10":""} ${s?p[v]:i?"pr-10":""}`.trim(),k=
|
|
5
|
+
/* @__PURE__ */l("input",{ref:N,"aria-invalid":n||void 0,readOnly:h,className:r({invalid:n,size:g,readOnly:h,className:[j,m].filter(Boolean).join(" ")}),...f});return t||i||s?/* @__PURE__ */c("div",{className:"relative",children:[t&&/* @__PURE__ */l("span",{className:`pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 ${e}`,children:t}),k,s?/* @__PURE__ */l(d,{children:/* @__PURE__ */l(u,{action:s,size:v})}):i&&/* @__PURE__ */l("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400",children:i})]}):k});export{h as END_ACTIONS_PAD,m as INPUT_END_ACTION_SIZE,u as InputEndActionButton,d as InputEndActionSlot,N as Input_default};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{useOverlayTarget as e,usePopupAnchor as i,usePopupLevel as r,usePopupLevelBindings as t,windowScrimStyle as o,OverlayLayerProvider as n,scrimHasCorners as l,popupLayerStyle as a}from"./chunk-CJ4OEY3T.js";import{CloseButton as d}from"./chunk-5QHNDAZ6.js";import{useDiscardGuard as s}from"./chunk-TEQ5ZPAL.js";import{dialogA11y as c}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as m}from"./chunk-DBQNYJZ6.js";import{useFocusTrap as p,useScrollLock as u}from"./chunk-DWGYC7OD.js";import{HEADING_TEXT as h,DESCRIPTION_TEXT as f,PANEL_SURFACE as b}from"./chunk-BWJZTHZ6.js";import{createShellPortal as v}from"./chunk-5QRHQCRG.js";import{useHydrated as y}from"./chunk-KEFNQEXZ.js";import{registerModalEscapeInterceptor as x}from"./chunk-TWVUQUUD.js";import{useRef as k,useId as N,useState as j,useEffect as w}from"react";import{jsxs as g,Fragment as C,jsx as Q}from"react/jsx-runtime";function Z({open:Z,onClose:D,side:E="bottom",title:H,description:W,footer:B,children:T,blocking:Y=!1,dirty:$=!1,initialFocus:A,"aria-label":G,"aria-labelledby":J,"aria-describedby":U,className:F=""}){const O=k(null),R=N(),V=N(),z=N(),I=e(y()),[K,L]=j(null),P=s({open:Z,dirty:$,onClose:D,title:H,layer:K}),X=k(null),q=i(Z&&null!==I,X),M=r(Z&&null!==I,X),S=t(M,K),_=o(M),ee=null!==M.host;if(m(Z),p(O,Z&&null!==I,A,S),u(Z),w(()=>{if(Z)return x(()=>!S.current?.(document.activeElement)&&(Y||P(),!0),()=>O.current)},[Z,Y,P,S]),!Z||!I)return null;const ie={maxHeight:"85vh",...q?(re=q,{left:re.left,width:re.width,bottom:window.innerHeight-(re.top+re.height)}):{}};var re;/* @__PURE__ */
|
|
2
|
+
return g(C,{children:[/* @__PURE__ */Q("span",{ref:X,hidden:!0,"data-popup-anchor":""}),v(
|
|
3
|
+
/* @__PURE__ */Q(n,{value:K,children:/* @__PURE__ */g("div",{ref:L,className:ee?"fixed inset-0 pointer-events-none":"fixed inset-0",style:a(M),role:"presentation","data-overlay-layer":"",children:[
|
|
4
|
+
/* @__PURE__ */Q("div",{className:"fixed bg-black/30 backdrop-blur-sm "+(ee?"pointer-events-auto"+(l(M)?" rounded-(--radius-window)":""):"inset-0"),style:_??void 0,hidden:ee&&!_,onClick:Y?void 0:P,"aria-hidden":"true","data-popup-scrim":ee?"window":"system"}),
|
|
5
|
+
/* @__PURE__ */g("div",{ref:O,...c({modal:!0,titleId:H?z:void 0,labelledBy:J,label:G}),"aria-describedby":U??(W?V:T?R:void 0),"data-drawer-side":E,"data-popup-panel":"",style:ie,className:[`fixed flex flex-col ${b}`,ee?"pointer-events-auto":"",q?"":"inset-x-0 bottom-0","rounded-t-xl",F].filter(Boolean).join(" "),children:[H?/* @__PURE__ */g("div",{className:"flex shrink-0 items-center justify-between gap-4 border-b border-gray-100 px-4 py-3",children:[
|
|
6
|
+
/* @__PURE__ */g("div",{className:"min-w-0",children:[
|
|
7
|
+
/* @__PURE__ */Q("h2",{id:z,className:h,children:H}),W&&/* @__PURE__ */Q("p",{id:V,className:`mt-0.5 ${f}`,children:W})]}),!Y&&/* @__PURE__ */Q(d,{onClose:P})]}):!Y&&/* @__PURE__ */Q("div",{className:"absolute right-2 top-2 z-10",children:/* @__PURE__ */Q(d,{onClose:P})}),
|
|
8
|
+
/* @__PURE__ */g("div",{id:R,className:"min-h-0 flex-1 overflow-y-auto px-4 py-4",children:[W&&!H&&/* @__PURE__ */Q("p",{id:V,className:`mb-3 ${f} ${Y?"":"pr-8"}`.trim(),children:W}),T]}),B&&/* @__PURE__ */Q("div",{className:"flex shrink-0 justify-end gap-3 border-t border-gray-100 px-4 py-3",children:B})]})]})}),I)]})}export{Z as Drawer};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{optionMatches as e,OptionSublabel as t}from"./chunk-K5YT5PMJ.js";import{inputClasses as r}from"./chunk-AYZY3YNC.js";import{GROUP_COLORS as n}from"./chunk-ABIWAS5K.js";import{Tooltip as o}from"./chunk-CIZAUBWA.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{createShellPortal as i}from"./chunk-5QRHQCRG.js";import{Z_LAYERS as a}from"./chunk-62LW225J.js";import{useDropdownPosition as s,POPUP_MAX_WIDTH as c,MENU_MAX_HEIGHT as u}from"./chunk-TAHHZGRH.js";import{glassStyle as d}from"./chunk-5FYDNH4Y.js";import{useShellStrings as m}from"./chunk-NRHG4R2Q.js";import{useState as h,useRef as p,useMemo as f,useEffect as g}from"react";import{jsxs as v,jsx as b,Fragment as x}from"react/jsx-runtime";var w={accent:{chip:"inline-flex max-w-full items-center gap-1 rounded bg-accent-tint px-2 py-0.5 text-xs font-medium text-blue-700",remove:"text-blue-400 hover:text-red-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"},danger:{chip:`inline-flex max-w-full items-center gap-1 rounded ${n.danger} px-2 py-0.5 text-xs font-medium`,remove:"text-current opacity-70 hover:opacity-100 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"}};function y({value:n,onChange:y,options:k=[],placeholder:D,allowFreeText:N=!1,invalid:j,disabled:A,id:C,className:H="",tone:L,tooltip:$,split:T,reorderable:W=!1}){const[E,I]=h(!1),[R,Y]=h(null),[M,B]=h(""),G=m(),K=p(null),S=p(null),F=p(null),Q=s(K,E),Z=e=>k.find(t=>t.value===e)?.label??e,J=f(()=>{const t=new Set(n),r=[],o=M.trim().toLowerCase();for(const n of k)t.has(n.value)||(t.add(n.value),o&&!e(n,o)||r.push(n));return r},[k,n,M]),P=e=>{const t=[...n];for(const r of e){const e=r.trim();if(!e)continue;const n=e.toLowerCase(),o=k.find(t=>t.value===e||t.label.toLowerCase()===n)?.value,l=o??(N?e:null);l&&!t.includes(l)&&t.push(l)}t.length!==n.length&&y(t)},U=e=>{e&&!n.includes(e)?(y([...n,e]),B("")):B("")},z=e=>y(n.filter(t=>t!==e)),O=W&&!A,q=(e,t)=>{if(e===t||t<0||t>=n.length)return;const r=[...n],[o]=r.splice(e,1);r.splice(t,0,o),y(r)},V=()=>{const e=M.trim();if(T&&e)return P(e.split(T)),void B("");N&&e?U(e):B("")},X=p(()=>{});X.current=()=>{V(),I(!1)},g(()=>{if(!E)return;const e=e=>{const t=e.target;K.current?.contains(t)||F.current?.contains(t)||(V(),I(!1))};document.addEventListener("mousedown",e);const t=l(()=>X.current());return()=>{document.removeEventListener("mousedown",e),t()}});const _=k.length>0;/* @__PURE__ */
|
|
2
|
+
return v("div",{ref:K,className:"relative",children:[
|
|
3
|
+
/* @__PURE__ */v("div",{onMouseDown:e=>{A||e.target.closest("button")||(e.preventDefault(),S.current?.focus())},className:r({invalid:j,multiline:!0,className:`flex flex-wrap items-center gap-1 cursor-text focus-within:border-blue-400 has-focus-visible:ring-2 has-focus-visible:ring-[color:var(--rosh-focus-ring)] ${A?"bg-gray-50 cursor-not-allowed":""} ${H}`}),children:[n.map((e,t)=>{const r=L?.(e),l=w[r??"accent"],i=O?{draggable:!0,tabIndex:0,"aria-label":G.select.reorderItem?.(Z(e),t+1,n.length)??Z(e),onDragStart:r=>{r.dataTransfer.effectAllowed="move",r.dataTransfer.setData("text/plain",e),Y(t)},onDragOver:e=>{null!=R&&e.preventDefault()},onDrop:e=>{null!=R&&(e.preventDefault(),q(R,t),Y(null))},onDragEnd:()=>Y(null),onKeyDown:e=>{e.target===e.currentTarget&&("ArrowLeft"===e.key||"ArrowUp"===e.key?t>0&&(e.preventDefault(),q(t,t-1)):"ArrowRight"!==e.key&&"ArrowDown"!==e.key||t<n.length-1&&(e.preventDefault(),q(t,t+1)))}}:{},a=/* @__PURE__ */v("span",{"data-tag-chip":"","data-tone":r,...i,className:`${l.chip}${O?" cursor-grab rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]":""}${R===t?" opacity-50":""}`,children:[
|
|
4
|
+
/* @__PURE__ */b("span",{className:"truncate",children:Z(e)}),!A&&/* @__PURE__ */b("button",{type:"button","aria-label":G.select.removeItem?.(Z(e))??`${G.select.remove} ${Z(e)}`,onClick:()=>z(e),className:l.remove,children:"×"})]},e),s=$?.(e);return null==s?a:/* @__PURE__ */b(o,{content:s,className:"relative inline-flex max-w-full",children:a},e)}),
|
|
5
|
+
/* @__PURE__ */b("input",{id:C,ref:S,type:"text",autoComplete:"off",role:"combobox","aria-expanded":E&&_,"aria-invalid":j||void 0,disabled:A,value:M,placeholder:0===n.length?D:void 0,onChange:e=>{(e=>{if(T){const t=e.split(T);if(t.length>1)return P(t.slice(0,-1)),void B(t[t.length-1])}B(e)})(e.target.value),I(!0)},onFocus:()=>{!A&&_&&I(!0)},onKeyDown:t=>{if("Enter"===t.key||","===t.key&&N){t.preventDefault();const r=M.trim(),n=r?J.filter(t=>e(t,r.toLowerCase())):[];1===n.length?U(n[0].value):V()}else"Backspace"===t.key&&""===M&&n.length>0?z(n[n.length-1]):"Escape"===t.key?(I(!1),B(""),S.current?.blur()):"Tab"===t.key&&(V(),I(!1))},className:"min-w-[8ch] flex-1 border-none bg-transparent p-0 text-sm text-ink-strong placeholder:text-[color:var(--ink-placeholder)] rosh-focus-ring focus-visible:ring-0 disabled:cursor-not-allowed"})]}),E&&_&&i(
|
|
6
|
+
/* @__PURE__ */b("div",{ref:F,className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:a.popup,left:Q?.left,right:Q?.right,top:Q?.top,bottom:Q?.bottom,minWidth:Q?.minWidth,maxWidth:Q?.maxWidth??c,width:"max-content",visibility:Q?void 0:"hidden",...d()},children:/* @__PURE__ */b("div",{className:"overflow-y-auto",style:{maxHeight:Q?.maxHeight??u},children:0===J.length?/* @__PURE__ */b("p",{className:"px-3 py-3 text-sm text-gray-400 text-center",children:k.length>0&&n.length>=k.length?G.select.allSelected:G.select.noMatches}):J.map(e=>/* @__PURE__ */b("button",{type:"button",onMouseDown:t=>{t.preventDefault(),U(e.value)},className:e.sublabel?"w-full text-left px-3 min-h-(--row-height-menu) py-2 text-sm hover:bg-row-hover text-ink whitespace-nowrap flex items-center justify-between gap-3":"w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm hover:bg-row-hover text-ink whitespace-nowrap",children:e.sublabel?/* @__PURE__ */v(x,{children:[
|
|
7
|
+
/* @__PURE__ */b("span",{className:"min-w-0 truncate",children:e.label}),
|
|
8
|
+
/* @__PURE__ */b(t,{grows:!0,children:e.sublabel})]}):e.label},e.value))})}),document.body)]})}export{y as TagInput};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Card as e}from"./chunk-RKSCB5BJ.js";import{Select_default as a}from"./chunk-
|
|
1
|
+
import{Card as e}from"./chunk-RKSCB5BJ.js";import{Select_default as a}from"./chunk-C4TG6XS4.js";import{Pagination as r}from"./chunk-Q2RNFBYS.js";import{Input_default as t}from"./chunk-D7MRZZVV.js";import{StatusBadgeProvider as i,StatusBadge as s}from"./chunk-ABIWAS5K.js";import{Button_default as l}from"./chunk-A4ROXNUF.js";import{Icon as c}from"./chunk-ISVODSRP.js";import{TH_ONE_LINE as m}from"./chunk-FAPZFMS3.js";import{useState as n}from"react";import{jsx as d,jsxs as o}from"react/jsx-runtime";var h={active:"success",invited:"queued",suspended:"danger",pending:"pending"},p=[{name:"Alice Nguyen",email:"alice@acme.co",role:"Admin",status:"active"},{name:"Marco Reyes",email:"marco@acme.co",role:"Editor",status:"invited"},{name:"Priya Patel",email:"priya@acme.co",role:"Editor",status:"active"},{name:"Tom Becker",email:"tom@acme.co",role:"Viewer",status:"suspended"},{name:"Sara Lind",email:"sara@acme.co",role:"Viewer",status:"pending"},{name:"Yuki Tanaka",email:"yuki@acme.co",role:"Editor",status:"active"}];function u(){const[c,u]=n(1),[g,f]=n(""),[y,v]=n("");/* @__PURE__ */
|
|
2
2
|
return d(i,{groups:h,children:/* @__PURE__ */d("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */o("div",{className:"mx-auto max-w-5xl space-y-4",children:[
|
|
3
3
|
/* @__PURE__ */o("div",{className:"flex items-center justify-between gap-4",children:[
|
|
4
4
|
/* @__PURE__ */d("h1",{className:"text-xl font-semibold text-gray-900",children:"Members"}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{TYPE_SCALE as t,FONT_WEIGHTS as o}from"./chunk-LH7IKIGE.js";import{textWidth as n}from"./chunk-UVCMV2TL.js";import{SPACING_ROLES as e,SPACING_SCALE as m}from"./chunk-SH7PJC4P.js";import{statusLabel as r}from"./chunk-
|
|
1
|
+
import{TYPE_SCALE as t,FONT_WEIGHTS as o}from"./chunk-LH7IKIGE.js";import{textWidth as n}from"./chunk-UVCMV2TL.js";import{SPACING_ROLES as e,SPACING_SCALE as m}from"./chunk-SH7PJC4P.js";import{statusLabel as r}from"./chunk-ABIWAS5K.js";var c=e.controlX,u=m[4],i=t[2],d=o.control,f=.625*i,h=m[1];function p(t){const o="undefined"!=typeof document&&document.body?getComputedStyle(document.body).fontFamily:"";return o?n(t,`${d} ${i}px ${o}`)??t.length*f:t.length*f}function a(t){const o=Object.entries(t).map(([t,o])=>!0===o?r(t):o),n=Math.max(0,...o.map(p)),e=Math.ceil((n+2*c+2*u)/h)*h;return{defaultWidth:e,minWidth:e}}export{c as BADGE_X,u as CELL_X,a as statusColumn};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{railLabelsShown as e}from"./chunk-FQEALPZJ.js";import{ChoiceContent as t,choiceItemClass as n,choiceTipClass as r,choiceTrackClass as o}from"./chunk-EFKJLUYP.js";import{Tooltip as l}from"./chunk-
|
|
2
|
-
return s("nav",{ref:v,"aria-label":m,"aria-labelledby":g,className:b(c,u),children:e.map(e=>{const o=e.id===n,a=/* @__PURE__ */s("a",{href:e.disabled?void 0:e.href,"aria-current":o?"location":void 0,"aria-disabled":e.disabled||void 0,onClick:e.disabled?void 0:t=>((e,t)=>{const n=h(t.href);n&&(e=>!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))(e)&&(e.preventDefault(),y(t.id),n.scrollIntoView({block:"start",behavior:"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"}),n.hasAttribute("tabindex")||n.setAttribute("tabindex","-1"),n.focus({preventScroll:!0}))})(t,e),className:`${f(o,c,"warning"===e.tone?"warning":"default")}${e.disabled?" cursor-not-allowed opacity-50":""}`,children:/* @__PURE__ */s(t,{icon:e.icon,label:e.label})},e.id);return null!=e.tooltip&&!1!==e.tooltip?/* @__PURE__ */s(l,{content:e.tooltip,className:c?r(c):void 0,children:a},e.id):a})})}var v=(e,t)=>`${e}-tab-${t}`,y=(e,t)=>`${e}-panel-${t}`;function w(e,t){const n=getComputedStyle(e),r=(parseFloat(n.paddingLeft)||0)+(parseFloat(n.paddingRight)||0)+(parseFloat(n.borderLeftWidth)||0)+(parseFloat(n.borderRightWidth)||0),o=(parseFloat(n.columnGap)||0)*Math.max(0,t-1),l=e.parentElement;let a=1/0;if(l){const e=getComputedStyle(l);a=l.clientWidth-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)}return{chrome:r+o,room:a}}function x(e){return e.items.some(e=>null!=e.href)?/* @__PURE__ */s(g,{...e}):/* @__PURE__ */s(k,{...e})}function k({items:h,value:p,onChange:g,variant:x="underline",block:k=!1,idPrefix:
|
|
3
|
-
return s("div",{ref:
|
|
1
|
+
import{railLabelsShown as e}from"./chunk-FQEALPZJ.js";import{ChoiceContent as t,choiceItemClass as n,choiceTipClass as r,choiceTrackClass as o}from"./chunk-EFKJLUYP.js";import{Tooltip as l}from"./chunk-CIZAUBWA.js";import{useBrowserLayoutEffect as a}from"./chunk-PU2GJVMG.js";import{useRef as i,useState as c,useEffect as d}from"react";import{jsx as s,jsxs as u,Fragment as m}from"react/jsx-runtime";var b=(e,t)=>`flex items-center border-b border-gray-200${e?"":" gap-1"} ${t}`.trim();function f(e,t,n="default"){return`-mb-px inline-flex items-center gap-2 border-b-2 px-3 py-2 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${t?"flex-1 justify-center ":""}${e?"border-blue-600 text-blue-600":`border-transparent ${"warning"===n?"text-amber-700":"text-gray-900"} hover:border-gray-300`}`}function h(e){if(!e||!e.startsWith("#")||e.length<2)return null;try{return document.getElementById(decodeURIComponent(e.slice(1)))}catch{return null}}function p(e,t){const n=e.filter(e=>!e.disabled).map(e=>({id:e.id,section:h(e.href)})).filter(e=>null!=e.section);if(0===n.length)return null;const r=function(e){for(let t=e.parentElement;t;t=t.parentElement){const e=getComputedStyle(t).overflowY;if(("auto"===e||"scroll"===e)&&t.scrollHeight>t.clientHeight)return t}return document.scrollingElement??document.documentElement}(n[0].section);if(r.scrollTop>0&&r.scrollTop+r.clientHeight>=r.scrollHeight-1)return n[n.length-1].id;const o=Math.max(0,t.getBoundingClientRect().bottom)+8;let l=n[0].id;for(const e of n)e.section.getBoundingClientRect().top<=o&&(l=e.id);return l}function g({items:e,value:n,onChange:o,block:c=!1,className:u="","aria-label":m,"aria-labelledby":g}){const v=i(null),y=function(e,t,n,r){const o=i(0),l=i({items:t,value:n,onChange:r});l.current={items:t,value:n,onChange:r};const c=i(()=>{});return c.current=()=>{const t=e.current;if(!t||Date.now()<o.current)return;const n=p(l.current.items,t);null!=n&&n!==l.current.value&&l.current.onChange(n)},a(()=>{c.current()},[t]),d(()=>{let e=0;const t=()=>{e||(e=requestAnimationFrame(()=>{e=0,c.current()}))};return document.addEventListener("scroll",t,{capture:!0,passive:!0}),window.addEventListener("resize",t),()=>{document.removeEventListener("scroll",t,{capture:!0}),window.removeEventListener("resize",t),e&&cancelAnimationFrame(e)}},[]),e=>{o.current=Date.now()+800,e!==l.current.value&&l.current.onChange(e),window.setTimeout(()=>c.current(),850)}}(v,e,n,o);/* @__PURE__ */
|
|
2
|
+
return s("nav",{ref:v,"aria-label":m,"aria-labelledby":g,className:b(c,u),children:e.map(e=>{const o=e.id===n,a=/* @__PURE__ */s("a",{href:e.disabled?void 0:e.href,"aria-current":o?"location":void 0,"aria-disabled":e.disabled||void 0,onClick:e.disabled?void 0:t=>((e,t)=>{const n=h(t.href);n&&(e=>!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))(e)&&(e.preventDefault(),y(t.id),n.scrollIntoView({block:"start",behavior:"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"}),n.hasAttribute("tabindex")||n.setAttribute("tabindex","-1"),n.focus({preventScroll:!0}))})(t,e),className:`${f(o,c,"warning"===e.tone?"warning":"default")}${e.disabled?" cursor-not-allowed opacity-50":""}`,children:/* @__PURE__ */s(t,{icon:e.icon,label:e.label})},e.id);return null!=e.tooltip&&!1!==e.tooltip?/* @__PURE__ */s(l,{content:e.tooltip,className:c?r(c):void 0,children:a},e.id):a})})}var v=(e,t)=>`${e}-tab-${t}`,y=(e,t)=>`${e}-panel-${t}`;function w(e,t){const n=getComputedStyle(e),r=(parseFloat(n.paddingLeft)||0)+(parseFloat(n.paddingRight)||0)+(parseFloat(n.borderLeftWidth)||0)+(parseFloat(n.borderRightWidth)||0),o=(parseFloat(n.columnGap)||0)*Math.max(0,t-1),l=e.parentElement;let a=1/0;if(l){const e=getComputedStyle(l);a=l.clientWidth-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)}return{chrome:r+o,room:a}}function x(e){return e.items.some(e=>null!=e.href)?/* @__PURE__ */s(g,{...e}):/* @__PURE__ */s(k,{...e})}function k({items:h,value:p,onChange:g,variant:x="underline",block:k=!1,idPrefix:F,className:E="","aria-label":A,"aria-labelledby":L,labelsFit:N=!1,dotLabel:R="Has a setting"}){const $=i([]),S=i(null),W="pill"===x,[M,j]=c(null),z=M??"none",D=i(()=>{});D.current=()=>{const t=S.current;if(!t||!N)return;const n=function(e){return[...e.querySelectorAll('[role="tab"]')].map(e=>{const t=getComputedStyle(e),n=(parseFloat(t.paddingLeft)||0)+(parseFloat(t.paddingRight)||0)+(parseFloat(t.borderLeftWidth)||0)+(parseFloat(t.borderRightWidth)||0),r=e.querySelector("[data-tab-glyph]")?.getBoundingClientRect().width??0,o=e.querySelector("[data-tab-word]")?.scrollWidth??0;return{bare:n+r,worded:n+r+(r&&o?8:0)+o,active:"true"===e.getAttribute("aria-selected")}})}(t);j(function({tabs:t,block:n,chrome:r,room:o}){if(!n)return e({buttons:t,orientation:"horizontal",chrome:r,room:o});if(0===t.length)return"none";const l=e=>r+e*t.length<=o+.5;if(l(Math.max(...t.map(e=>e.worded))))return"all";const a=t.find(e=>e.active);return a&&l(Math.max(a.worded,...t.map(e=>e.bare)))?"chosen":"none"}({tabs:n,block:k,...w(t,n.length)}))},a(()=>{D.current()}),d(()=>{const e=S.current?.parentElement;if(!N||!e)return;let t=!0;const n=()=>{t&&D.current()},r="undefined"==typeof ResizeObserver?void 0:ResizeObserver,o=r?new r(n):null;return o?.observe(e),document.fonts?.ready.then(n,()=>{}),()=>{t=!1,o?.disconnect()}},[N]);const H=(e,t)=>{for(let n=1;n<=h.length;n+=1){const r=((e+t*n)%h.length+h.length)%h.length;if(!h[r]?.disabled)return r}return null},I=e=>{const t=1===e?h.map((e,t)=>t):h.map((e,t)=>h.length-1-t);for(const e of t)if(!h[e]?.disabled)return e;return null};/* @__PURE__ */
|
|
3
|
+
return s("div",{ref:S,role:"tablist","data-labels-shown":N?z:void 0,"aria-label":A,"aria-labelledby":L,onKeyDown:e=>{const t=h.findIndex(e=>e.id===p);let n=null;if("ArrowRight"===e.key||"ArrowDown"===e.key)n=H(t,1);else if("ArrowLeft"===e.key||"ArrowUp"===e.key)n=H(t,-1);else if("Home"===e.key)n=I(1);else{if("End"!==e.key)return;n=I(-1)}e.preventDefault(),null!==n&&n!==t&&(g(h[n].id),$.current[n]?.focus())},className:W?o(k,E):b(k,E),children:h.map((e,o)=>{const a=e.id===p,i=N&&null!=e.icon,c="all"===z||"chosen"===z&&a,d=e.dot?/* @__PURE__ */s(C,{label:e.label,on:a,said:R}):e.label,b=/* @__PURE__ */s("button",{ref:e=>{$.current[o]=e},type:"button",role:"tab",id:F?v(F,e.id):void 0,"aria-controls":F?y(F,e.id):void 0,"aria-selected":a,tabIndex:a?0:-1,disabled:e.disabled,onClick:()=>g(e.id),className:W?n({selected:a,disabled:e.disabled,block:k}):f(a,k,"warning"===e.tone?"warning":"default"),children:i?/* @__PURE__ */u(m,{children:[
|
|
4
4
|
/* @__PURE__ */s("span",{"aria-hidden":"true","data-tab-glyph":"",className:"inline-flex shrink-0",children:e.icon}),
|
|
5
|
-
/* @__PURE__ */s("span",{"data-tab-word":c?"shown":"hidden",className:c?"whitespace-nowrap":"sr-only",children:d})]}):/* @__PURE__ */s(t,{icon:e.icon,label:d})},e.id),h=i?e.tooltip??e.label:e.tooltip;return null!=h&&!1!==h?/* @__PURE__ */s(l,{content:h,className:
|
|
5
|
+
/* @__PURE__ */s("span",{"data-tab-word":c?"shown":"hidden",className:c?"whitespace-nowrap":"sr-only",children:d})]}):/* @__PURE__ */s(t,{icon:e.icon,label:d})},e.id),h=i?e.tooltip??e.label:e.tooltip;return null!=h&&!1!==h?/* @__PURE__ */s(l,{content:h,className:W||k?r(k):void 0,children:b},e.id):b})})}function C({label:e,on:t,said:n}){/* @__PURE__ */
|
|
6
6
|
return u("span",{className:"inline-flex items-center gap-(--space-4)",children:[e,
|
|
7
7
|
/* @__PURE__ */s("span",{"aria-hidden":"true","data-tab-dot":t?"on":"off",className:"size-2 shrink-0 rounded-full "+(t?"bg-current":"bg-accent-fill")}),
|
|
8
8
|
/* @__PURE__ */s("span",{className:"sr-only",children:n})]})}export{x as Tabs,v as tabButtonId,y as tabPanelId};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{ColoredBadge as e}from"./chunk-
|
|
1
|
+
import{ColoredBadge as e}from"./chunk-L2WQOJ3T.js";import{Button_default as n}from"./chunk-A4ROXNUF.js";import{useShellStrings as i}from"./chunk-NRHG4R2Q.js";import{useId as t}from"react";import{jsx as m,jsxs as a}from"react/jsx-runtime";function s({items:s,heading:l,emptyText:r,className:c=""}){const o=i().media,d=t();return s.length?/* @__PURE__ */a("div",{className:c||void 0,children:[
|
|
2
2
|
/* @__PURE__ */m("p",{id:d,className:"text-xs font-medium text-ink-faint",children:l??o.usedIn(s.length)}),
|
|
3
3
|
/* @__PURE__ */m("ul",{"aria-labelledby":d,className:"mt-2 flex flex-col gap-1",children:s.map(i=>/* @__PURE__ */a("li",{className:"flex min-w-0 items-center gap-2 text-sm",children:[null!=i.kind&&/* @__PURE__ */m(e,{size:"xs",className:"flex-none",children:i.kind}),i.onOpen?/* @__PURE__ */m(n,{variant:"link",size:"sm",onClick:i.onOpen,className:"min-w-0 text-left",children:i.name}):/* @__PURE__ */m("span",{className:"min-w-0 break-words text-ink",children:i.name})]},i.key))})]}):/* @__PURE__ */m("p",{className:`text-sm text-ink-faint ${c}`.trim(),children:r??o.notUsed})}export{s as MediaUsedInList};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useInsideTooltip as e,Tooltip as n}from"./chunk-
|
|
1
|
+
import{useInsideTooltip as e,Tooltip as n}from"./chunk-CIZAUBWA.js";import{useRef as r,useState as t}from"react";import{jsx as c}from"react/jsx-runtime";var i="whitespace-nowrap";function l({children:i}){const l=e(),o=r(null),[a,s]=t(!1),m=/* @__PURE__ */c("span",{ref:o,className:"min-w-0 truncate",onMouseEnter:()=>{const e=o.current;s(!!e&&e.scrollWidth>e.clientWidth+1)},children:i});return l?m:/* @__PURE__ */c(n,{content:a?i:null,describe:!1,className:"relative inline-flex min-w-0 max-w-full",children:m})}export{l as OneLineLabel,i as TH_ONE_LINE};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import{AccessibleTable as e}from"./chunk-RTZFWH5U.js";import{polygonPoints as t}from"./chunk-VFC6QUEN.js";import{ChartDefs as r,maskId as l}from"./chunk-465RRWBY.js";import{useHighlight as a}from"./chunk-CNYAHYE6.js";import{angleScale as o}from"./chunk-2JWPNR2U.js";import{ChartTooltip as n}from"./chunk-WDQI3FV6.js";import{CHART_INK as i,resolveSeriesColorWithin as s}from"./chunk-TZFACUMR.js";import{useShellStrings as m,useShellLocale as c}from"./chunk-NRHG4R2Q.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{useId as p,useState as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";var k=3,g=e=>`${e.map(([e,t],r)=>`${0===r?"M":"L"}${e.toFixed(2)},${t.toFixed(2)}`).join(" ")} Z`;function x({axes:k,series:x,size:y=300,mode:b="area",grid:v="polygon",rings:M=4,formatValue:N,animate:j=!0,className:W,emptyLabel:$}){const F=m().charts,R=c(),C=N??(e=>h(e,R)),w=$??F.nothingToCompare,A=p(),[H,L]=u(null),{highlighted:Q}=a(),T=x;if(k.length<3||0===T.length)/* @__PURE__ */
|
|
2
|
+
return d("p",{className:`text-sm text-gray-500 ${W??""}`,children:w});const U=y/2,z=y/2,E=y/2-46,V=o(k.length),Y=k.map((e,t)=>null!=e.max&&Number.isFinite(e.max)&&e.max>0?e.max:Math.max(1,...T.map(e=>e.values[t]??0).filter(Number.isFinite))),Z=(e,t)=>{const r=Math.max(0,Math.min(1,t/Y[e])),l=V.center(e)-V.step/2;return[U+E*r*Math.cos(l),z+E*r*Math.sin(l)]},B=(e,t)=>null!==H?H!==e:null!==Q&&Q!==t,O=null!==H?T[H]:void 0;/* @__PURE__ */
|
|
3
|
+
return f("div",{className:`relative ${W??""}`,children:[
|
|
4
|
+
/* @__PURE__ */f("svg",{width:"100%",height:y,viewBox:`0 0 ${y} ${y}`,role:"img","aria-labelledby":A,onMouseLeave:()=>L(null),children:[
|
|
5
|
+
/* @__PURE__ */d("title",{id:A,children:F.acrossMeasures(T.map(e=>e.label),k.length)}),Array.from({length:M},(e,r)=>{const l=E*(r+1)/M;return"circle"===v?/* @__PURE__ */d("circle",{cx:U,cy:z,r:l,fill:"none",stroke:i.grid,strokeWidth:1},r):/* @__PURE__ */d("path",{d:g(t(U,z,l,k.length)),fill:"none",stroke:i.grid,strokeWidth:1},r)}),k.map((e,t)=>{const[r,l]=Z(t,Y[t]);/* @__PURE__ */
|
|
6
|
+
return f("g",{children:[
|
|
7
|
+
/* @__PURE__ */d("line",{x1:U,y1:z,x2:r,y2:l,stroke:i.grid,strokeWidth:1}),
|
|
8
|
+
/* @__PURE__ */d("text",{x:U+(E+18)*Math.cos(V.center(t)-V.step/2),y:z+(E+18)*Math.sin(V.center(t)-V.step/2)+4,textAnchor:"middle",fontSize:11,fill:i.label,children:e.label})]},e.key)}),
|
|
9
|
+
/* @__PURE__ */d(r,{id:A,reveal:!!j&&"center-out"}),T.map((e,t)=>{const r=s(t,3,e.color,e.tone),a=k.map((t,r)=>Z(r,e.values[r]??0));/* @__PURE__ */
|
|
10
|
+
return f("g",{opacity:B(t,e.key)?.3:1,onMouseEnter:()=>L(t),mask:j?`url(#${l(A)})`:void 0,children:["area"===b&&/* @__PURE__ */d("path",{d:g(a),fill:r,fillOpacity:.18,stroke:"none"}),
|
|
11
|
+
/* @__PURE__ */d("path",{d:g(a),fill:"none",stroke:r,strokeWidth:2,strokeLinejoin:"round"}),a.map(([e,t],l)=>/* @__PURE__ */d("circle",{cx:e,cy:t,r:3.5,fill:r,stroke:i.surface,strokeWidth:1.5},l))]},e.key)})]}),O&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:O.label,rows:k.map((e,t)=>({key:e.key,label:e.label,color:s(H,3,O.color,O.tone),value:C(O.values[t]??0)}))})}),
|
|
12
|
+
/* @__PURE__ */d("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:T.map((e,t)=>/* @__PURE__ */f("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
|
|
13
|
+
/* @__PURE__ */d("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:s(t,3,e.color,e.tone)}}),
|
|
14
|
+
/* @__PURE__ */d("span",{className:"flex-1 truncate",children:e.label})]},e.key))}),
|
|
15
|
+
/* @__PURE__ */d(e,{caption:F.acrossMeasures(T.map(e=>e.label),k.length),head:[F.tableSeries,...k.map(e=>e.label)],rows:T.map(e=>[e.label,...k.map((t,r)=>C(e.values[r]??0))])})]})}export{k as RADAR_SERIES_CAP,x as RadarChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{DropdownMenu as e}from"./chunk-
|
|
1
|
+
import{DropdownMenu as e}from"./chunk-NJY4HPNB.js";import{Fragment as t}from"react";import{jsxs as a,jsx as r,Fragment as n}from"react/jsx-runtime";var i="relative inline-flex items-center gap-2 px-4 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-40",s="bg-blue-50 text-blue-600",l="text-gray-600 hover:bg-gray-50 hover:text-gray-900";function c(){/* @__PURE__ */
|
|
2
2
|
return r("span",{className:"my-3 w-px shrink-0 bg-gray-200","aria-hidden":!0})}function m({item:e,active:t,caret:i}){/* @__PURE__ */
|
|
3
3
|
return a(n,{children:[e.icon&&/* @__PURE__ */r("span",{className:"h-4 w-4 shrink-0",children:e.icon}),
|
|
4
4
|
/* @__PURE__ */r("span",{className:"whitespace-nowrap",children:e.label}),null!=e.badge&&/* @__PURE__ */r("span",{className:"ml-0.5 inline-flex min-w-[1.25rem] items-center justify-center rounded-full bg-gray-100 px-2 text-2xs font-semibold leading-5 text-gray-600",children:e.badge}),i&&/* @__PURE__ */r("span",{className:"-ml-1 text-xs","aria-hidden":!0,children:"▾"}),t&&/* @__PURE__ */r("span",{className:"absolute inset-x-2 -bottom-px h-0.5 rounded-full bg-blue-600","aria-hidden":!0})]})}function d({items:n,activeKey:d,onSelect:o,brand:u,actions:b,linkAs:h,className:g}){/* @__PURE__ */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{Calendar as e}from"./chunk-PPHGBEJA.js";import{inputClasses as r,PLACEHOLDER_INK as t}from"./chunk-AYZY3YNC.js";import{calendarNames as a,userToday as n}from"./chunk-NHKT5IH6.js";import{fromDateKey as i,toDateKey as o}from"./chunk-JRQMX4PK.js";import{Icon as l}from"./chunk-ISVODSRP.js";import{onOverlayOpen as s}from"./chunk-PGN5ME7B.js";import{createShellPortal as d}from"./chunk-
|
|
2
|
-
return N("input",{ref:Z,type:"date",lang:ae,id:
|
|
1
|
+
import{Calendar as e}from"./chunk-PPHGBEJA.js";import{inputClasses as r,PLACEHOLDER_INK as t}from"./chunk-AYZY3YNC.js";import{calendarNames as a,userToday as n}from"./chunk-NHKT5IH6.js";import{fromDateKey as i,toDateKey as o}from"./chunk-JRQMX4PK.js";import{Icon as l}from"./chunk-ISVODSRP.js";import{onOverlayOpen as s}from"./chunk-PGN5ME7B.js";import{createShellPortal as d}from"./chunk-5QRHQCRG.js";import{Z_LAYERS as u}from"./chunk-62LW225J.js";import{useDropdownPosition as c}from"./chunk-TAHHZGRH.js";import{useBrowserLayoutEffect as m}from"./chunk-PU2GJVMG.js";import{registerModalEscapeInterceptor as p}from"./chunk-TWVUQUUD.js";import{useShellStrings as f,useShellLocale as b}from"./chunk-NRHG4R2Q.js";import{forwardRef as h,useState as v,useRef as g,useId as y,useEffect as x}from"react";import{jsx as N,jsxs as k}from"react/jsx-runtime";var j=/^\d{4}-\d{2}-\d{2}$/,w=/^(aria|data)-/,H=/* @__PURE__ */new Set(["aria-invalid","aria-required"]);function R(e){if(null==e||""===e)return"";if(e instanceof Date)return Number.isNaN(e.getTime())?"":o(e);if(j.test(e))return e;const r=new Date(e);return Number.isNaN(r.getTime())?"":o(r)}function C(e,r){const t=i(e);return t?r.longDate(t.getFullYear(),t.getMonth(),t.getDate()):""}var D=h(function({value:o,onChange:h,min:j,max:D,invalid:F,size:G,native:P,weekStartsOn:$,className:B="","aria-label":E,"aria-describedby":I,"aria-labelledby":S,id:q,name:O,disabled:Q,placeholder:T,required:W,clearable:z,form:J,title:M,tabIndex:U,autoFocus:Y,onFocus:A,onBlur:L,formatDisplay:V,...K},Z){const X=z??!W,_=R(o),ee=R(j),re=R(D),te=f().datePicker,ae=b(),ne=a(ae),[ie,oe]=v(!1),le=g(null),se=g(null),de=g(null),ue=y(),ce=y(),me=y(),pe=c(se,ie,{popupRef:de}),[fe,be]=v(!1);m(()=>{const e=!!q&&(se.current?.labels?.length??0)>0;e!==fe&&be(e)});const he=!E&&(!!S||fe);if(x(()=>{if(!ie)return;const e=e=>{const r=e.target;le.current?.contains(r)||de.current?.contains(r)||oe(!1)};document.addEventListener("pointerdown",e,!0);const r=s(()=>oe(!1));return()=>{document.removeEventListener("pointerdown",e,!0),r()}},[ie]),x(()=>{if(ie)return p(e=>"Escape"===e.key&&(oe(!1),se.current?.focus(),!0),()=>de.current)},[ie]),P)/* @__PURE__ */
|
|
2
|
+
return N("input",{ref:Z,type:"date",lang:ae,id:q,name:O,disabled:Q,"aria-label":E,"aria-describedby":I,"aria-invalid":F||void 0,value:_,min:ee||void 0,max:re||void 0,onChange:e=>h?.(i(e.target.value)),className:r({invalid:F,size:G,className:B}),"aria-labelledby":S,required:W,form:J,title:M,tabIndex:U,autoFocus:Y,onFocus:A,onBlur:L,...K});const ve=Object.fromEntries(Object.entries(K).filter(([e])=>w.test(e)&&!H.has(e))),ge=K["aria-required"],ye=!!W||!0===ge||"true"===ge,xe=[he?ce:void 0,ye?me:void 0,I].filter(Boolean).join(" ")||void 0,Ne=n(),ke=!!Ne&&(!ee||Ne>=ee)&&(!re||Ne<=re),je=T??te.placeholder;/* @__PURE__ */
|
|
3
3
|
return k("div",{ref:le,className:"relative",children:[
|
|
4
|
-
/* @__PURE__ */N("input",{ref:Z,type:"hidden",name:
|
|
5
|
-
/* @__PURE__ */k("button",{ref:se,type:"button",...ve,id:
|
|
6
|
-
/* @__PURE__ */N("span",{className:`min-w-0 truncate whitespace-nowrap ${_?"text-ink-strongest":t}`,children:_?V?V(_):
|
|
7
|
-
/* @__PURE__ */N(l,{name:"date",className:`h-4 w-4 shrink-0 ${t}`,strokeWidth:"1.75","aria-hidden":"true"})]}),he&&/* @__PURE__ */N("span",{id:ce,className:"sr-only",children:_?
|
|
8
|
-
/* @__PURE__ */k("div",{ref:de,id:ue,role:"dialog","aria-label":
|
|
9
|
-
/* @__PURE__ */N(e,{value:_||null,min:ee||null,max:re||null,weekStartsOn
|
|
4
|
+
/* @__PURE__ */N("input",{ref:Z,type:"hidden",name:O,form:J,value:_}),
|
|
5
|
+
/* @__PURE__ */k("button",{ref:se,type:"button",...ve,id:q,disabled:Q,title:M,tabIndex:U,autoFocus:Y,onFocus:A,onBlur:L,"aria-haspopup":"dialog","aria-expanded":ie,"aria-controls":ie?ue:void 0,"aria-labelledby":S,"aria-describedby":xe,"aria-label":E?`${E}${_?`, ${C(_,ne)}`:""}`:void 0,onClick:()=>oe(e=>!e),className:`${r({invalid:F,size:G,className:B})} flex items-center justify-between gap-2 text-left`,children:[
|
|
6
|
+
/* @__PURE__ */N("span",{className:`min-w-0 truncate whitespace-nowrap ${_?"text-ink-strongest":t}`,children:_?V?V(_):C(_,ne):je}),
|
|
7
|
+
/* @__PURE__ */N(l,{name:"date",className:`h-4 w-4 shrink-0 ${t}`,strokeWidth:"1.75","aria-hidden":"true"})]}),he&&/* @__PURE__ */N("span",{id:ce,className:"sr-only",children:_?C(_,ne):je}),ye&&/* @__PURE__ */N("span",{id:me,className:"sr-only",children:te.required}),ie&&d(
|
|
8
|
+
/* @__PURE__ */k("div",{ref:de,id:ue,role:"dialog","aria-label":E??te.dialog,className:"fixed w-72 rounded-xl border border-gray-200 bg-white p-3 shadow-lg",style:{zIndex:u.popup,left:pe?.left,right:pe?.right,top:pe?.top,bottom:pe?.bottom,maxWidth:pe?.maxWidth,visibility:pe?void 0:"hidden"},children:[
|
|
9
|
+
/* @__PURE__ */N(e,{value:_||null,min:ee||null,max:re||null,weekStartsOn:$,onSelect:e=>{oe(!1),se.current?.focus(),h?.(i(e))}}),(X||ke)&&/* @__PURE__ */k("div",{className:"mt-2 flex justify-between border-t border-gray-100 pt-2",children:[X&&/* @__PURE__ */N("button",{type:"button",onClick:()=>{oe(!1),se.current?.focus(),h?.(null)},className:"rounded-(--radius-control) px-2 py-1 text-sm text-gray-500 hover:bg-gray-100 hover:text-gray-700",children:te.clear}),ke&&/* @__PURE__ */N("button",{type:"button",onClick:()=>{oe(!1),se.current?.focus(),h?.(i(Ne))},className:"ml-auto rounded-(--radius-control) px-2 py-1 text-sm font-medium text-blue-600 hover:bg-blue-50",children:te.today})]})]}),document.body)]})});export{D as DatePicker_default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useWindowMenuItem as e,Modal as t}from"./chunk-
|
|
1
|
+
import{useWindowMenuItem as e,Modal as t}from"./chunk-4KPOTWYF.js";import{navIcons as r}from"./chunk-4LXCCZDM.js";import{VERSION as n}from"./chunk-2RLUG5ID.js";import{Icon as s}from"./chunk-ISVODSRP.js";import{DEFAULT_SHELL_STRINGS as i,useShellStrings as o,splitAround as a}from"./chunk-NRHG4R2Q.js";import{useState as l,useCallback as m,isValidElement as c,cloneElement as p}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";var h=i.aboutApp,x={notepad:{name:"Notepad",version:"1.1.0",route:"/notepad",description:h.notepad},preview:{name:"Preview",version:"1.5.1",route:"/preview",description:h.preview},files:{name:"Files",version:"2.0.1",route:"/files",description:h.files},browser:{name:"Browser",version:"1.0.3",route:"/browser",description:h.browser}},u=/* @__PURE__ */d(s,{name:"info",className:"h-4 w-4",strokeWidth:1.5}),w=/* @__PURE__ */d(s,{name:"window",className:"h-9 w-9",strokeWidth:1.5});function v({app:s}){const i=x[s],[h,v]=l(!1),N=m(()=>v(!0),[]),b=o().aboutApp,k=b.title(i.name);if(e(k,N,u),!h)return null;const g=r[i.route],y=c(g)?p(g,{className:"h-9 w-9"}):w,[j,R]=a(b.partOf);/* @__PURE__ */
|
|
2
2
|
return d(t,{open:!0,onClose:()=>v(!1),title:k,size:"sm",compact:!0,bodyScroll:!1,autoHeight:!0,dimensions:[320,320],children:/* @__PURE__ */f("div",{className:"flex flex-col items-center text-center px-5 pt-5 pb-4",children:[
|
|
3
3
|
/* @__PURE__ */d("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl bg-gray-100 text-gray-600 shrink-0",children:y}),
|
|
4
4
|
/* @__PURE__ */d("h2",{className:"mt-3 text-lg font-bold text-gray-900",children:i.name}),
|
|
@@ -6,4 +6,4 @@ return d(t,{open:!0,onClose:()=>v(!1),title:k,size:"sm",compact:!0,bodyScroll:!1
|
|
|
6
6
|
/* @__PURE__ */d("p",{className:"mt-2 text-xs text-gray-500 leading-relaxed",children:b[s]}),
|
|
7
7
|
/* @__PURE__ */f("div",{className:"mt-4 pt-3 border-t border-gray-200 w-full",children:[
|
|
8
8
|
/* @__PURE__ */f("p",{className:"text-2xs text-ink-faint",children:[j,
|
|
9
|
-
/* @__PURE__ */d("span",{className:"font-medium text-gray-700",children:"efficient-shell"}),
|
|
9
|
+
/* @__PURE__ */d("span",{className:"font-medium text-gray-700",children:"efficient-shell"}),R]}),n&&/* @__PURE__ */d("p",{className:"mt-0.5 text-2xs font-mono text-ink-faintest",children:b.shellVersion(n)})]})]})})}export{v as AboutApp,x as BUILTIN_APP_INFO};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{InputNumber_default as e,stepRounding as r}from"./chunk-
|
|
2
|
-
return s("div",{id:
|
|
3
|
-
/* @__PURE__ */d("div",{className:"w-30 shrink-0",children:/* @__PURE__ */d(e,{value:v,onChange:b,min:g,max:x,step:w,...r(w),placeholder:y,prefix:/* @__PURE__ */d("span",{"data-radius-mark":"","aria-hidden":"true",children:
|
|
4
|
-
/* @__PURE__ */d("div",{ref:
|
|
1
|
+
import{InputNumber_default as e,stepRounding as r}from"./chunk-TEYG2W7A.js";import{IconButton_default as a}from"./chunk-APFDZ2HG.js";import{Icon as i}from"./chunk-ISVODSRP.js";import{Tooltip as n}from"./chunk-CIZAUBWA.js";import{useShellStrings as l}from"./chunk-NRHG4R2Q.js";import{useState as t,useRef as o}from"react";import{jsxs as s,jsx as d}from"react/jsx-runtime";var u={tl:"",tr:"rotate-90",br:"rotate-180",bl:"-rotate-90"},c=["tl","tr","bl","br"];function m({label:m,value:f,corners:p,onChange:h,radius:v=null,onRadiusChange:b,radiusLabel:k,radiusMin:g=0,radiusMax:x,radiusStep:w=1,radiusPlaceholder:y,radiusUnit:A,units:j,disabled:R=!1,disabledReason:N,id:C,className:D=""}){const I=l(),K=function(e){const r=c.map(r=>e.find(e=>e.value===r));for(const a of e){if(c.includes(a.value))continue;const e=r.findIndex(e=>void 0===e);-1===e?r.push(a):r[e]=a}return r.filter(e=>void 0!==e)}(p),[M,S]=t(0),G=o(null);/* @__PURE__ */
|
|
2
|
+
return s("div",{id:C,role:"group","aria-label":m,className:`flex min-w-0 flex-wrap items-center gap-2 ${D}`.trim(),children:[b&&
|
|
3
|
+
/* @__PURE__ */d("div",{className:"w-30 shrink-0",children:/* @__PURE__ */d(e,{value:v,onChange:b,min:g,max:x,step:w,...r(w),placeholder:y,prefix:/* @__PURE__ */d("span",{"data-radius-mark":"","aria-hidden":"true",children:I.corners.radiusMark}),suffix:A??I.corners.unit,units:j,steppers:"compact",disabled:R,"aria-label":k??I.corners.radius})}),
|
|
4
|
+
/* @__PURE__ */d("div",{ref:G,"data-corners-grid":"",className:"grid shrink-0 grid-cols-2 gap-1",onKeyDown:e=>{if(e.altKey||e.ctrlKey||e.metaKey)return;const r=Array.from(G.current?.querySelectorAll("button[data-corner]")??[]),a=r.indexOf(document.activeElement);if(-1===a)return;const i=a%2,n=Math.floor(a/2),l="ArrowRight"===e.key?2*n+1:"ArrowLeft"===e.key?2*n:"ArrowDown"===e.key?2+i:"ArrowUp"===e.key?i:null;null!==l&&(e.preventDefault(),l<r.length&&r[l].focus())},children:K.map((e,r)=>{const l=f.includes(e.value),t=R||!0===e.disabled,o=t&&(!0===e.disabled&&e.title||(R?N:void 0))||void 0,s=/* @__PURE__ */d(a,{"aria-pressed":l,"aria-label":e.label,"aria-disabled":t||void 0,disabledReason:o,"data-corner":e.value,size:"sm",tabIndex:r===M?0:-1,onFocus:()=>S(r),onClick:()=>{t||h(l?f.filter(r=>r!==e.value):[...f,e.value])},children:/* @__PURE__ */d(i,{name:"corner",strokeWidth:2,className:["h-4 w-4",u[e.value]??""].filter(Boolean).join(" ")})},e.value);return o?s:/* @__PURE__ */d(n,{content:e.title??e.label,children:s},e.value)})})]})}export{m as CornersInput};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import{buildQuerySections as e,buildEmptySections as t,flattenRows as r,DEFAULT_MAGNIFIER as n,stepIndex as a,nextGroupIndex as s,SEE_ALL_ICON as l,resultTypeKey as o}from"./chunk-HGOWQO63.js";import{useDismissPopupsOnOpen as i}from"./chunk-DBQNYJZ6.js";import{SpinnerRing as c,LoadingSpinner as d}from"./chunk-R2VKEMZH.js";import{createShellPortal as u}from"./chunk-
|
|
1
|
+
import{buildQuerySections as e,buildEmptySections as t,flattenRows as r,DEFAULT_MAGNIFIER as n,stepIndex as a,nextGroupIndex as s,SEE_ALL_ICON as l,resultTypeKey as o}from"./chunk-HGOWQO63.js";import{useDismissPopupsOnOpen as i}from"./chunk-DBQNYJZ6.js";import{SpinnerRing as c,LoadingSpinner as d}from"./chunk-R2VKEMZH.js";import{createShellPortal as u}from"./chunk-5QRHQCRG.js";import{Z_LAYERS as p}from"./chunk-62LW225J.js";import{glassStyle as m}from"./chunk-5FYDNH4Y.js";import{useShellStrings as h}from"./chunk-NRHG4R2Q.js";import{useState as f,useRef as y,useEffect as g,useMemo as x,useId as b,useCallback as k}from"react";import{jsxs as v,jsx as w}from"react/jsx-runtime";function N(e){if(Array.isArray(e))return{results:e,truncatedTypes:[]};if(e&&"object"==typeof e&&Array.isArray(e.results)){const{results:t,truncatedTypes:r}=e;return{results:t,truncatedTypes:Array.isArray(r)?r:[]}}return{results:[],truncatedTypes:[]}}var A=[];function C(e,t,r){const[n,a]=f([]),[s,l]=f(A),[o,i]=f(!1),[c,d]=f("none"),u=y(function(){let e=0,t=null;const r=()=>{e+=1,t?.abort(),t=null};return{begin:()=>{r();const n=e,a=new AbortController;return t=a,{signal:a.signal,isCurrent:()=>n===e}},cancel:r}}());g(()=>{const n=u.current;if(e.length<r||!t||0===t.length)return n.cancel(),a(e=>0===e.length?e:[]),l(A),d("none"),void i(!1);i(!0);const s=setTimeout(async()=>{const r=n.begin(),s=await async function(e,t,r){const n=await Promise.all(e.map(async e=>{try{return{failed:!1,...N(await e(t,{signal:r}))}}catch(e){const t=r.aborted||function(e){if(!e||"object"!=typeof e)return!1;const{name:t,code:r}=e;return"AbortError"===t||"CanceledError"===t||"ERR_CANCELED"===r}(e);return{failed:!t,results:[],truncatedTypes:[]}}}));return{results:n.flatMap(e=>e.results),truncatedTypes:Array.from(new Set(n.flatMap(e=>e.truncatedTypes))),failed:n.filter(e=>e.failed).length}}(t,e,r.signal);r.isCurrent()&&(a(s.results),l(s.truncatedTypes),d(0===s.failed?"none":s.failed>=t.length?"all":"some"),i(!1))},250);return()=>{clearTimeout(s),n.cancel()}},[e,t,r]);return{results:n,truncatedTypes:s,loading:o,failure:c,reset:k(()=>{u.current.cancel(),a(e=>0===e.length?e:[]),l(A),d("none"),i(!1)},[])}}var L=(e,t)=>`${e}-opt-${t}`;function E(e,t){if("seeAll"===e.kind)return l;if("action"===e.kind)return e.icon??n;if(e.icon)return e.icon;const r=t?.[o(e.result)];return r||n}function j({sections:e,activeIdx:t,listId:r,label:n,typeIcons:a,groupCount:s,groupLabel:l,onHover:o,onPick:i}){let c=0;/* @__PURE__ */
|
|
2
2
|
return w("div",{id:r,role:"listbox","aria-label":n,className:"py-1",children:e.map(e=>/* @__PURE__ */v("div",{role:"group","aria-label":l(e.title,e.count,!!e.truncated),children:[
|
|
3
3
|
/* @__PURE__ */v("div",{"aria-hidden":"true",className:"flex items-center justify-between px-4 pt-2 pb-1 text-2xs font-semibold uppercase tracking-wide text-ink-faintest",children:[
|
|
4
4
|
/* @__PURE__ */w("span",{children:e.title}),
|
|
5
5
|
/* @__PURE__ */w("span",{className:"font-medium normal-case tracking-normal",children:s(e.count,!!e.truncated)})]}),e.rows.map(e=>{const n=c++,s=n===t,l="action"===e.kind||"seeAll"===e.kind?void 0:e.badge,d="action"===e.kind||"seeAll"===e.kind?void 0:e.sub,u="seeAll"===e.kind;/* @__PURE__ */
|
|
6
|
-
return v("div",{id:
|
|
6
|
+
return v("div",{id:L(r,n),role:"option","aria-selected":s,className:"flex items-center gap-3 w-full px-4 py-3 text-left cursor-pointer transition-colors "+(s?"bg-blue-50":"hover:bg-gray-50"),onMouseDown:e=>e.preventDefault(),onClick:()=>i(e),onMouseEnter:()=>o(n),children:[
|
|
7
7
|
/* @__PURE__ */w("svg",{className:"h-4 w-4 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:/* @__PURE__ */w("path",{strokeLinecap:"round",strokeLinejoin:"round",d:E(e,a)})}),
|
|
8
8
|
/* @__PURE__ */v("div",{className:"flex-1 min-w-0",children:[
|
|
9
|
-
/* @__PURE__ */w("p",{className:"text-sm font-medium truncate "+(u?"text-blue-600":"text-gray-900"),children:e.label}),d&&/* @__PURE__ */w("p",{className:"text-xs text-gray-400 truncate",children:d})]}),l&&/* @__PURE__ */w("span",{className:"shrink-0 rounded-full bg-gray-100 px-2 py-0.5 text-3xs font-medium text-ink-faint",children:l})]},e.key)})]},e.key))})}var
|
|
10
|
-
/* @__PURE__ */v("div",{"data-global-search":"",className:"fixed inset-0 flex items-start justify-center pt-[15vh]",style:{zIndex:p.overlay},onClick:()=>
|
|
9
|
+
/* @__PURE__ */w("p",{className:"text-sm font-medium truncate "+(u?"text-blue-600":"text-gray-900"),children:e.label}),d&&/* @__PURE__ */w("p",{className:"text-xs text-gray-400 truncate",children:d})]}),l&&/* @__PURE__ */w("span",{className:"shrink-0 rounded-full bg-gray-100 px-2 py-0.5 text-3xs font-medium text-ink-faint",children:l})]},e.key)})]},e.key))})}var T="react-os-shell:open-global-search";function D(){"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(T))}function R({providers:l,typeIcons:o,typeLabels:N,listRoutes:A,placeholder:E,quickActions:D,onSelect:R,recent:I,onRecord:K,favorites:H,hotkey:M=!0}={}){const $=h().search,B=E??$.placeholder,[P,Q]=f(!1),[G,W]=f(""),[z,F]=f(0),S=y(null),{results:Y,truncatedTypes:J,loading:O,failure:V,reset:Z}=C(G,l,2);g(()=>{const e=e=>{M&&!e.defaultPrevented&&(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),Q(e=>!e)),"Escape"===e.key&&P&&Q(!1)},t=()=>Q(!0);return window.addEventListener("keydown",e),window.addEventListener(T,t),()=>{window.removeEventListener("keydown",e),window.removeEventListener(T,t)}},[P,M]),i(P);const[q,U]=f(!1);P!==q&&(U(P),P&&(W(""),F(0),Z())),g(()=>{P?setTimeout(()=>S.current?.focus(),50):W("")},[P]),g(()=>{F(0)},[Y]);const _=G.length>=2,X=x(()=>_?e(Y,D,G,$.actions,{truncatedTypes:J,listRoutes:A,typeLabels:N,seeAllLabel:$.seeAll}):t({recent:I,favorites:H,actions:D,typeLabels:N},$),[_,Y,J,A,N,D,G,I,H,$]),ee=x(()=>r(X),[X]),te=Math.min(z,Math.max(ee.length-1,0)),re=b(),ne=ee.length>0;g(()=>{P&&0!==ee.length&&document.getElementById(L(re,te))?.scrollIntoView?.({block:"nearest"})},[P,te,ee.length,re]);const ae=k(e=>{Q(!1),"action"!==e.kind?("result"!==e.kind&&"recent"!==e.kind||K?.(e.result),R?.(e.result)):e.action.onSelect()},[R,K]);return P?u(
|
|
10
|
+
/* @__PURE__ */v("div",{"data-global-search":"",className:"fixed inset-0 flex items-start justify-center pt-[15vh]",style:{zIndex:p.overlay},onClick:()=>Q(!1),children:[
|
|
11
11
|
/* @__PURE__ */w("div",{"data-global-search-backdrop":"",className:"absolute inset-0 bg-black/50 backdrop-blur-sm"}),
|
|
12
12
|
/* @__PURE__ */v("div",{className:"relative z-10 w-full max-w-xl rounded-(--radius-popup) overflow-hidden",onClick:e=>e.stopPropagation(),style:m(),children:[
|
|
13
13
|
/* @__PURE__ */v("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-gray-200",children:[
|
|
14
14
|
/* @__PURE__ */w("svg",{className:"h-5 w-5 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */w("path",{strokeLinecap:"round",strokeLinejoin:"round",d:n})}),
|
|
15
|
-
/* @__PURE__ */w("input",{ref:
|
|
15
|
+
/* @__PURE__ */w("input",{ref:S,type:"text",value:G,onChange:e=>{W(e.target.value),F(0)},onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),F(a(te,1,ee.length))):"ArrowUp"===e.key?(e.preventDefault(),F(a(te,-1,ee.length))):"Tab"===e.key&&ee.length>0?(e.preventDefault(),F(s(X.map(e=>e.rows.length),te,e.shiftKey?-1:1))):"Enter"===e.key&&ee[te]&&ae(ee[te])},placeholder:B,role:"combobox","aria-expanded":ne,"aria-controls":ne?re:void 0,"aria-activedescendant":ne?L(re,te):void 0,"aria-autocomplete":"list",className:"flex-1 text-sm bg-transparent border-0 rosh-focus-ring placeholder-gray-400"}),O&&/* @__PURE__ */w("span",{"data-global-search-spinner":"",role:"status","aria-label":$.searching,className:"flex shrink-0",children:/* @__PURE__ */w(c,{className:"h-4 w-4",ink:"text-ink-faint"})}),
|
|
16
16
|
/* @__PURE__ */w("kbd",{className:"hidden sm:inline-flex items-center rounded border border-line-strong px-2 py-0.5 text-2xs font-medium text-ink-faintest",children:$.escBadge})]}),
|
|
17
|
-
/* @__PURE__ */v("div",{className:"max-h-[50vh] overflow-y-auto",children:[O&&0===ee.length&&/* @__PURE__ */w(d,{size:"sm",padding:"py-6",label:$.searching}),!O&&"all"===
|
|
17
|
+
/* @__PURE__ */v("div",{className:"max-h-[50vh] overflow-y-auto",children:[O&&0===ee.length&&/* @__PURE__ */w(d,{size:"sm",padding:"py-6",label:$.searching}),!O&&"all"===V&&_&&/* @__PURE__ */w("div",{role:"alert",className:"px-4 py-3 text-center text-sm text-red-600",children:$.searchFailed}),!O&&_&&0===ee.length&&"all"!==V&&/* @__PURE__ */w("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:$.noResults}),ne&&/* @__PURE__ */w(j,{sections:X,activeIdx:te,listId:re,label:$.listLabel,typeIcons:o,groupCount:$.groupCount,groupLabel:$.groupLabel,onHover:F,onPick:ae}),!O&&"some"===V&&_&&/* @__PURE__ */w("div",{role:"status",className:"px-4 py-2 text-xs text-amber-600",children:$.partialFailure}),!O&&!_&&0===ee.length&&/* @__PURE__ */w("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:$.minChars(2)})]}),
|
|
18
18
|
/* @__PURE__ */v("div",{className:"flex items-center justify-between px-4 py-2 border-t border-line-subtle bg-surface-sunken text-2xs text-ink-faintest",children:[
|
|
19
19
|
/* @__PURE__ */v("div",{className:"flex items-center gap-3",children:[
|
|
20
20
|
/* @__PURE__ */v("span",{className:"flex items-center gap-1",children:[
|
|
@@ -24,4 +24,4 @@ return v("div",{id:C(r,n),role:"option","aria-selected":s,className:"flex items-
|
|
|
24
24
|
/* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:$.enterKey}),` ${$.open}`]}),X.length>1&&/* @__PURE__ */v("span",{className:"flex items-center gap-1",children:[
|
|
25
25
|
/* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:$.tabKey}),` ${$.nextGroup}`]})]}),
|
|
26
26
|
/* @__PURE__ */v("span",{className:"flex items-center gap-1",children:[
|
|
27
|
-
/* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:$.escKey}),` ${$.close}`]})]})]})]}),document.body):null}export{
|
|
27
|
+
/* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:$.escKey}),` ${$.close}`]})]})]})]}),document.body):null}export{R as GlobalSearch,D as openGlobalSearch};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-ISVODSRP.js";import{Tooltip as t}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-ISVODSRP.js";import{Tooltip as t}from"./chunk-CIZAUBWA.js";import{useShellStrings as n}from"./chunk-NRHG4R2Q.js";import{useId as i}from"react";import{jsx as a,jsxs as r}from"react/jsx-runtime";var l=['input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled]):not(.es-default-reset)",'[tabindex]:not([tabindex="-1"])'].join(", "),s=e=>l.split(", ").map(t=>`${e} ${t}`).join(", ");function o({label:o,onReset:d,changed:c=!0,view:u="desktop",detail:b,name:p,tip:m,defaultAction:h,disabled:f,className:k}){const j=n().settingView,y=i(),N=["es-default-reset"];if(c&&N.push("is-changed"),k&&N.push(k),!c&&h)return N.push("is-pressable"),/* @__PURE__ */a(t,{content:h.title,children:/* @__PURE__ */a("button",{type:"button",className:N.join(" "),"aria-label":h.title,disabled:f,onClick:h.onPress,children:h.icon})});if(!c)/* @__PURE__ */return a("span",{className:N.join(" "),"aria-hidden":"true"});const x="desktop"===u,A=p??(x?j.resetName(o):j.inheritName(o)),S=b?j.backTo(b):x?j.backToDefault:j.backToAuto,g=m??(b?j.tip(A,S):A);
|
|
2
2
|
/* @__PURE__ */
|
|
3
|
-
return r(t,{content:
|
|
4
|
-
/* @__PURE__ */a("button",{type:"button",className:N.join(" "),"aria-label":
|
|
5
|
-
/* @__PURE__ */a("span",{id:y,hidden:!0,children:
|
|
3
|
+
return r(t,{content:g,describe:!1,children:[
|
|
4
|
+
/* @__PURE__ */a("button",{type:"button",className:N.join(" "),"aria-label":A,"aria-describedby":y,disabled:f,onClick:e=>{d(),function(e){const t=e.currentTarget,n=t.closest(".es-field");let i=n?.querySelector(s(".es-field-ctl"))??n?.querySelector(s(".es-field-head"))??null,a=n?null:t.parentElement;for(let e=0;!i&&a&&e<4;e+=1,a=a.parentElement)i=[...a.querySelectorAll(l)].find(e=>e!==t&&!e.closest('[aria-hidden="true"]'))??null;i?.focus()}(e)},children:/* @__PURE__ */a(e,{name:"revert",size:15,"aria-hidden":"true"})}),
|
|
5
|
+
/* @__PURE__ */a("span",{id:y,hidden:!0,children:S})]})}export{o as SettingReset};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Card as e}from"./chunk-RKSCB5BJ.js";import{Textarea_default as a}from"./chunk-PB7G6CJ7.js";import{Radio_default as l}from"./chunk-NI5FXWK5.js";import{Select_default as r}from"./chunk-
|
|
1
|
+
import{Card as e}from"./chunk-RKSCB5BJ.js";import{Textarea_default as a}from"./chunk-PB7G6CJ7.js";import{Radio_default as l}from"./chunk-NI5FXWK5.js";import{Select_default as r}from"./chunk-C4TG6XS4.js";import{FormField as n}from"./chunk-6KBDNYRW.js";import{Checkbox_default as i}from"./chunk-CGZBDI6C.js";import{Input_default as c}from"./chunk-D7MRZZVV.js";import{Button_default as o}from"./chunk-A4ROXNUF.js";import{useState as t}from"react";import{jsx as m,jsxs as d}from"react/jsx-runtime";function s(){const[s,h]=t("pro"),[u,p]=t(!0),[f,g]=t("us");/* @__PURE__ */
|
|
2
2
|
return m("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */d("form",{className:"mx-auto max-w-2xl space-y-5",onSubmit:e=>e.preventDefault(),children:[
|
|
3
3
|
/* @__PURE__ */d("div",{children:[
|
|
4
4
|
/* @__PURE__ */m("h1",{className:"text-xl font-semibold text-gray-900",children:"Account settings"}),
|