efficient-shell 8.12.0 → 8.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-6DD4J6S5.js → Browser-OOJUPENB.js} +14 -14
- package/dist/Calculator-PPH3FLQG.js +29 -0
- package/dist/{CurrencyConverter-USQIKK7H.js → CurrencyConverter-GTICX6V3.js} +9 -9
- package/dist/{Documents-V5EJRADW.js → Documents-RXNGM2OY.js} +1 -1
- package/dist/{Files-TDTCVNSE.js → Files-G2FQ5Z3R.js} +87 -87
- package/dist/{Notepad-UV4F6LGY.js → Notepad-7777T6ES.js} +10 -10
- package/dist/PdfViewer-Q7IS273H.js +1 -0
- package/dist/{PomodoroTimer-ZGJLP5LL.js → PomodoroTimer-VPRRRXVE.js} +19 -19
- package/dist/{Preview-ZMZ7CXAS.js → Preview-QBWSY7W7.js} +22 -22
- package/dist/Sidebar-NONBFVWE.js +43 -0
- package/dist/{Spreadsheet-62H5XUHC.js → Spreadsheet-JIOTLCIK.js} +13 -13
- package/dist/{Stock-Y3UQ22RS.js → Stock-OIDTOA6E.js} +3 -3
- package/dist/{Weather-H3CYKPAG.js → Weather-XT3S2O4X.js} +18 -18
- package/dist/{WorldClock-SHLNS6IU.js → WorldClock-QFPWQDD2.js} +6 -6
- package/dist/ai/index.js +13 -13
- 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/{chunk-WNJLY7CM.js → chunk-2KOXALIK.js} +11 -11
- package/dist/{chunk-VH3IMIS2.js → chunk-2LTB2DSA.js} +6 -6
- package/dist/chunk-2MBDZMZM.js +2 -0
- package/dist/{chunk-7PCV65OU.js → chunk-37S3WLBL.js} +6 -6
- package/dist/chunk-3UHHKER7.js +2 -0
- package/dist/{chunk-HEVNCBNZ.js → chunk-4GEAEYKA.js} +46 -46
- package/dist/chunk-4LQDWN6L.js +4 -0
- package/dist/chunk-4MHTK3LH.js +4 -0
- package/dist/{chunk-IQDIWKES.js → chunk-55IY2ZJY.js} +1 -1
- package/dist/{chunk-4A2X6KLQ.js → chunk-5GHLKEJQ.js} +1 -1
- package/dist/{chunk-WWEZQ7CF.js → chunk-6AB42T2W.js} +1 -1
- package/dist/chunk-6NLKMHX6.js +2 -0
- package/dist/{chunk-2QI3QFX6.js → chunk-76YDO3KA.js} +1 -1
- package/dist/chunk-7F65BNHY.js +2 -0
- package/dist/{chunk-SFNLRK5J.js → chunk-7HPOALEV.js} +5 -5
- package/dist/{chunk-RAHIWTPJ.js → chunk-7IF3RZF3.js} +12 -12
- package/dist/{chunk-KXTR2RPB.js → chunk-7IHH5CDD.js} +3 -3
- package/dist/{chunk-PPROO6JU.js → chunk-7JKFXRAR.js} +5 -5
- package/dist/{chunk-SBHLTCGU.js → chunk-7QLI3HAO.js} +1 -1
- package/dist/{chunk-KFMRV3MK.js → chunk-BKWLFZHI.js} +1 -1
- package/dist/chunk-BXDYFSP4.js +2 -0
- package/dist/{chunk-UHW2CFLV.js → chunk-C4YTKSXY.js} +1 -1
- package/dist/{chunk-EPHQ7UQV.js → chunk-CQXV3SJA.js} +1 -1
- package/dist/chunk-D5EXIRJF.js +2 -0
- package/dist/{chunk-US5YOYS3.js → chunk-DKY6X24V.js} +1 -1
- package/dist/{chunk-3OKD2ZZV.js → chunk-DXQCNU5I.js} +9 -9
- package/dist/chunk-EEG3KMP7.js +2 -0
- package/dist/{chunk-TAGZV46K.js → chunk-EK3JM3J2.js} +1 -1
- package/dist/{chunk-AP67GBSX.js → chunk-EXU3ZXKB.js} +8 -8
- package/dist/chunk-F6RM7RLQ.js +1 -0
- package/dist/{chunk-332V47ID.js → chunk-FDIJEOGV.js} +2 -2
- package/dist/{chunk-MTD66C5F.js → chunk-FEAOJLGA.js} +2 -2
- package/dist/{chunk-JK3QY266.js → chunk-G34KXE2L.js} +5 -5
- package/dist/{chunk-US5B4QYS.js → chunk-GLVEL6AQ.js} +15 -15
- package/dist/{chunk-7RDFRWF3.js → chunk-H3XEO4LR.js} +6 -6
- package/dist/{chunk-VUYWYMZZ.js → chunk-H62JMI7C.js} +2 -2
- package/dist/{chunk-7FNZUIXO.js → chunk-HHXP34PV.js} +4 -4
- package/dist/chunk-HJUK5AAM.js +2 -0
- package/dist/chunk-HMMNAJJQ.js +4 -0
- package/dist/{chunk-B772UFJ5.js → chunk-HTOZWATN.js} +1 -1
- package/dist/{chunk-IC2YI7WC.js → chunk-HXXUMKTV.js} +1 -1
- package/dist/chunk-I7GWKMYO.js +2 -0
- package/dist/{chunk-CMEN5O67.js → chunk-J6QU5JTZ.js} +1 -1
- package/dist/{chunk-6L7V25YL.js → chunk-J77ZVPF5.js} +5 -5
- package/dist/{chunk-CJUN2VOD.js → chunk-JF45HC5H.js} +1 -1
- package/dist/chunk-JTPBPEYK.js +2 -0
- package/dist/chunk-JXOBORLD.js +3 -0
- package/dist/{chunk-7MX6CMMN.js → chunk-JZ7NBWGB.js} +1 -1
- package/dist/chunk-KIYTUOVN.js +2 -0
- package/dist/chunk-KO5PBMCF.js +2 -0
- package/dist/chunk-KRWKHI7S.js +2 -0
- package/dist/chunk-KV5VLPII.js +1 -0
- package/dist/chunk-L3VD25XR.js +8 -0
- package/dist/{chunk-3RWLCKSR.js → chunk-L6CG37L3.js} +1 -1
- package/dist/{chunk-3XLVARRX.js → chunk-LKSHI57C.js} +6 -6
- package/dist/{chunk-BXRWPGAT.js → chunk-LR2X6MKB.js} +1 -1
- package/dist/{chunk-S2Q6BOAX.js → chunk-MSCILVJB.js} +6 -6
- package/dist/{chunk-EY74CLGD.js → chunk-NRWIULLI.js} +12 -12
- package/dist/{chunk-O4NTKMC5.js → chunk-O3WSAR62.js} +2 -2
- package/dist/chunk-OJ3RN3BG.js +20 -0
- package/dist/{chunk-XVPTBX4R.js → chunk-OS6GGLQQ.js} +3 -3
- package/dist/{chunk-3GMHX3WX.js → chunk-OSRLZZDO.js} +4 -4
- package/dist/chunk-P5SVBGLG.js +2 -0
- package/dist/{chunk-OIVLPNOR.js → chunk-PDPBIDHF.js} +1 -1
- package/dist/{chunk-GVTWQBRU.js → chunk-PG665FWX.js} +9 -9
- package/dist/chunk-PM2N2ZGV.js +2 -0
- package/dist/chunk-PWONLQFF.js +2 -0
- package/dist/chunk-Q7OGTJET.js +3 -0
- package/dist/chunk-QM5DFN7Z.js +2 -0
- package/dist/chunk-R362N2RJ.js +1 -0
- package/dist/chunk-RA5GR626.js +2 -0
- package/dist/chunk-RNBMWJYM.js +4 -0
- package/dist/{chunk-CP6FITHO.js → chunk-RP4ZLTXA.js} +16 -16
- package/dist/{chunk-XW7KN6HW.js → chunk-SNDYD76W.js} +12 -12
- package/dist/chunk-SXPBOX32.js +1 -0
- package/dist/{chunk-C7PQJOGD.js → chunk-TUT6SGH2.js} +1 -1
- package/dist/{chunk-MXDW5IFQ.js → chunk-U6FORQTI.js} +1 -1
- package/dist/chunk-UAXP4A2A.js +4 -0
- package/dist/{chunk-JWMQEWCV.js → chunk-UONWIAII.js} +15 -15
- package/dist/{chunk-M3DZDBS6.js → chunk-UOOHE3FX.js} +6 -6
- package/dist/chunk-USYTN7PE.js +2 -0
- package/dist/{chunk-TTE3GZWH.js → chunk-UWNL4FO2.js} +1 -1
- package/dist/{chunk-4OYSTWMQ.js → chunk-VANXHWGP.js} +1 -1
- package/dist/chunk-VGX7ODMS.js +4 -0
- package/dist/{chunk-C2HHGLLR.js → chunk-VJPJNCB4.js} +24 -4
- package/dist/{chunk-5J6IC25E.js → chunk-VX4OBI4U.js} +1 -1
- package/dist/{chunk-7A7HRAC6.js → chunk-WAMBQNDN.js} +11 -11
- package/dist/{chunk-QKIVMRK5.js → chunk-WCAQWHFD.js} +5 -5
- package/dist/{chunk-XYA7NPSZ.js → chunk-XF2NZVXW.js} +5 -5
- package/dist/{chunk-BKV6PH3R.js → chunk-XTPDXB4X.js} +1 -1
- package/dist/{chunk-BHGMJBJ2.js → chunk-XZLBPVRH.js} +1 -1
- package/dist/{chunk-VJ56YZY6.js → chunk-Y5W6POQE.js} +5 -5
- package/dist/{chunk-B6FBDJUL.js → chunk-YL44UDNT.js} +6 -6
- package/dist/chunk-Z5UVBCEE.js +9 -0
- package/dist/{chunk-BJKXFEZN.js → chunk-ZEDYXP2J.js} +1 -1
- package/dist/{chunk-N7LV32EQ.js → chunk-ZKRWJILC.js} +1 -1
- package/dist/{chunk-2K76HRXS.js → chunk-ZSTBFMQE.js} +1 -1
- package/dist/chunk-ZZIJFMZG.js +4 -0
- package/dist/data/ListLoadError.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/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/PositionInput.d.ts +25 -0
- package/dist/forms/PositionInput.js +2 -0
- package/dist/forms/Select.d.ts +1 -1
- package/dist/forms/Select.js +1 -1
- package/dist/forms/SidesInput.d.ts +10 -2
- 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/WidthsBar.js +1 -1
- package/dist/icons/efficient-glyphs.d.ts +8 -0
- package/dist/icons/efficient-glyphs.js +1 -1
- package/dist/icons/efficient-looks.d.ts +16 -0
- package/dist/icons/efficient-looks.js +1 -1
- package/dist/icons/efficient-meanings.d.ts +9 -1
- package/dist/icons/efficient-meanings.js +1 -1
- package/dist/icons/efficient.d.ts +8 -0
- package/dist/icons/efficient.js +1 -1
- package/dist/icons/glyphs/CropBottomIcon.d.ts +8 -0
- package/dist/icons/glyphs/CropBottomIcon.js +1 -0
- package/dist/icons/glyphs/CropLeftIcon.d.ts +8 -0
- package/dist/icons/glyphs/CropLeftIcon.js +1 -0
- package/dist/icons/glyphs/CropLeftRightIcon.d.ts +8 -0
- package/dist/icons/glyphs/CropLeftRightIcon.js +1 -0
- package/dist/icons/glyphs/CropRightIcon.d.ts +8 -0
- package/dist/icons/glyphs/CropRightIcon.js +1 -0
- package/dist/icons/glyphs/CropTopIcon.d.ts +8 -0
- package/dist/icons/glyphs/CropTopIcon.js +1 -0
- package/dist/icons/glyphs/CropYIcon.d.ts +8 -0
- package/dist/icons/glyphs/CropYIcon.js +1 -0
- package/dist/icons/glyphs/NudgeXIcon.d.ts +8 -0
- package/dist/icons/glyphs/NudgeXIcon.js +1 -0
- package/dist/icons/glyphs/NudgeYIcon.d.ts +8 -0
- package/dist/icons/glyphs/NudgeYIcon.js +1 -0
- package/dist/icons/index.d.ts +2 -2
- package/dist/icons/index.js +1 -1
- package/dist/icons/looks/CropBottomMiniIcon.d.ts +8 -0
- package/dist/icons/looks/CropBottomMiniIcon.js +1 -0
- package/dist/icons/looks/CropBottomSolidIcon.d.ts +8 -0
- package/dist/icons/looks/CropBottomSolidIcon.js +1 -0
- package/dist/icons/looks/CropLeftMiniIcon.d.ts +8 -0
- package/dist/icons/looks/CropLeftMiniIcon.js +1 -0
- package/dist/icons/looks/CropLeftRightMiniIcon.d.ts +8 -0
- package/dist/icons/looks/CropLeftRightMiniIcon.js +1 -0
- package/dist/icons/looks/CropLeftRightSolidIcon.d.ts +8 -0
- package/dist/icons/looks/CropLeftRightSolidIcon.js +1 -0
- package/dist/icons/looks/CropLeftSolidIcon.d.ts +8 -0
- package/dist/icons/looks/CropLeftSolidIcon.js +1 -0
- package/dist/icons/looks/CropRightMiniIcon.d.ts +8 -0
- package/dist/icons/looks/CropRightMiniIcon.js +1 -0
- package/dist/icons/looks/CropRightSolidIcon.d.ts +8 -0
- package/dist/icons/looks/CropRightSolidIcon.js +1 -0
- package/dist/icons/looks/CropTopMiniIcon.d.ts +8 -0
- package/dist/icons/looks/CropTopMiniIcon.js +1 -0
- package/dist/icons/looks/CropTopSolidIcon.d.ts +8 -0
- package/dist/icons/looks/CropTopSolidIcon.js +1 -0
- package/dist/icons/looks/CropYMiniIcon.d.ts +8 -0
- package/dist/icons/looks/CropYMiniIcon.js +1 -0
- package/dist/icons/looks/CropYSolidIcon.d.ts +8 -0
- package/dist/icons/looks/CropYSolidIcon.js +1 -0
- package/dist/icons/looks/NudgeXMiniIcon.d.ts +8 -0
- package/dist/icons/looks/NudgeXMiniIcon.js +1 -0
- package/dist/icons/looks/NudgeXSolidIcon.d.ts +8 -0
- package/dist/icons/looks/NudgeXSolidIcon.js +1 -0
- package/dist/icons/looks/NudgeYMiniIcon.d.ts +8 -0
- package/dist/icons/looks/NudgeYMiniIcon.js +1 -0
- package/dist/icons/looks/NudgeYSolidIcon.d.ts +8 -0
- package/dist/icons/looks/NudgeYSolidIcon.js +1 -0
- package/dist/icons/looks/map.js +1 -1
- package/dist/icons/sets.js +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +694 -694
- package/dist/map/index.js +3 -3
- package/dist/markdown/index.js +1 -1
- package/dist/names-DcR-HlYV.d.ts +21 -0
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/shell/Accordion.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/LanguageSelect.js +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/telemetry/index.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.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 +3 -2
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-7WH3RUWW.js +0 -29
- package/dist/PdfViewer-IQQM7DOH.js +0 -1
- package/dist/Sidebar-EIGME7VA.js +0 -43
- package/dist/chunk-2355YEWO.js +0 -1
- package/dist/chunk-BEWEQ6BP.js +0 -3
- package/dist/chunk-MXMBQS75.js +0 -20
- package/dist/chunk-OZ2ALRKX.js +0 -3
- package/dist/chunk-SXE6KZBU.js +0 -1
- package/dist/chunk-TKLH7V2R.js +0 -9
- package/dist/chunk-VIJ5BZ5U.js +0 -1
- package/dist/chunk-VLOJ4XJC.js +0 -8
- package/dist/chunk-XHILMSCK.js +0 -1
- package/dist/chunk-YVOGWINT.js +0 -4
- package/dist/names-CwL-QSC9.d.ts +0 -21
- /package/dist/{chunk-2CGVDBNO.js → chunk-4MNNVSHD.js} +0 -0
- /package/dist/{chunk-WHTINFQU.js → chunk-A6L6FYG4.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Banner as e}from"./chunk-
|
|
1
|
+
import{Banner as e}from"./chunk-UWNL4FO2.js";import{Button_default as t}from"./chunk-FSP63GKK.js";import{useShellStrings as n}from"./chunk-OVNRVFWS.js";import{useState as r,useEffect as i}from"react";import{jsx as o,jsxs as a}from"react/jsx-runtime";var s=6e4;function c({currentVersion:e,versionUrl:t="/version.json",pollMs:n=6e4}){const[o,a]=r(null);return i(()=>{if(!e||null!==o)return;let r=!1;const i=async()=>{if("undefined"==typeof document||"hidden"!==document.visibilityState)try{const n=t.includes("?")?"&":"?",i=await fetch(`${t}${n}t=${Date.now()}`,{cache:"no-store"});if(!i.ok)return;const o=await i.json(),s=o&&"object"==typeof o&&"string"==typeof o.version?o.version:null;!r&&s&&s!==e&&a(s)}catch{}};i();const s=setInterval(()=>{i()},n),c=()=>{"visible"===document.visibilityState&&i()};return document.addEventListener("visibilitychange",c),()=>{r=!0,clearInterval(s),document.removeEventListener("visibilitychange",c)}},[e,t,n,o]),o}function l({currentVersion:r,versionUrl:i,pollMs:s,message:l,onRefresh:m,className:u=""}){const d=c({currentVersion:r,versionUrl:i,pollMs:s}),p=n();if(null===d)return null;const f=m??(()=>window.location.reload());/* @__PURE__ */
|
|
2
2
|
return o("div",{"data-app-update-banner":"",className:`fixed left-1/2 top-3 z-(--z-toast) w-max max-w-[calc(100vw-1.5rem)] -translate-x-1/2 ${u}`.trim(),children:/* @__PURE__ */a(e,{tone:"warning",className:"shadow-lg",action:/* @__PURE__ */o(t,{type:"button",variant:"primary",size:"md",onClick:f,children:p.update.refreshNow}),children:[
|
|
3
3
|
/* @__PURE__ */o("span",{className:"font-medium",children:l??p.update.available}),
|
|
4
4
|
/* @__PURE__ */a("span",{className:"ml-2 whitespace-nowrap font-mono text-xs text-gray-500",children:[r," → ",d]})]})})}export{s as APP_UPDATE_POLL_MS,l as AppUpdateBanner,c as useAppUpdate};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-VJPJNCB4.js";import{useShellStrings as t}from"./chunk-OVNRVFWS.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,4 +1,4 @@
|
|
|
1
|
-
import{Modal as e}from"./chunk-
|
|
1
|
+
import{Modal as e}from"./chunk-4GEAEYKA.js";import{keepsNativeMenu as a}from"./chunk-GZCAFWWB.js";import{jsx as i,jsxs as n}from"react/jsx-runtime";var t={activeOpacity:70,inactiveOpacity:50,activeBlur:0,inactiveBlur:0};function r(e){try{const a=JSON.parse(localStorage.getItem(e)||"");return null!=a.blur&&null==a.activeBlur&&(a.activeBlur=a.blur,a.inactiveBlur=a.blur,delete a.blur),{...t,...a}}catch{return t}}function l({open:t,onClose:r,title:l,appearance:c,onAppearanceChange:s,onSave:d,children:o}){if(!t)return null;const u="w-full h-1.5 rounded-full appearance-none bg-gray-200 cursor-pointer accent-blue-500",p="flex items-center justify-between text-xs text-gray-500";/* @__PURE__ */
|
|
2
2
|
return i("div",{onPointerDown:e=>e.stopPropagation(),onContextMenu:e=>{e.stopPropagation(),a(e.target)||e.preventDefault()},children:/* @__PURE__ */i(e,{open:t,onClose:r,title:l,size:"sm",children:/* @__PURE__ */n("div",{className:"space-y-4",children:[o,
|
|
3
3
|
/* @__PURE__ */n("div",{children:[
|
|
4
4
|
/* @__PURE__ */i("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Appearance"}),
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as A}from"react/jsx-runtime";function L({size:L=18,...M}){/* @__PURE__ */
|
|
2
|
+
return A("svg",{width:L,height:L,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",...M,children:/* @__PURE__ */A("path",{d:"M3.75 4.5L4.75 4.5A0.75 0.75 0 0 1 4.75 3L3.75 3A0.75 0.75 0 0 1 3.75 4.5ZM8.75 4.5L9.75 4.5A0.75 0.75 0 0 1 9.75 3L8.75 3A0.75 0.75 0 0 1 8.75 4.5ZM14.25 4.5L15.25 4.5A0.75 0.75 0 0 1 15.25 3L14.25 3A0.75 0.75 0 0 1 14.25 4.5ZM19.25 4.5L20.25 4.5A0.75 0.75 0 0 1 20.25 3L19.25 3A0.75 0.75 0 0 1 19.25 4.5ZM19.5 3.75L19.5 4.75A0.75 0.75 0 0 1 21 4.75L21 3.75A0.75 0.75 0 0 1 19.5 3.75ZM19.5 8.75L19.5 9.75A0.75 0.75 0 0 1 21 9.75L21 8.75A0.75 0.75 0 0 1 19.5 8.75ZM19.5 14.25L19.5 15.25A0.75 0.75 0 0 1 21 15.25L21 14.25A0.75 0.75 0 0 1 19.5 14.25ZM19.5 19.25L19.5 20.25A0.75 0.75 0 0 1 21 20.25L21 19.25A0.75 0.75 0 0 1 19.5 19.25ZM3.75 21L4.75 21A0.75 0.75 0 0 1 4.75 19.5L3.75 19.5A0.75 0.75 0 0 1 3.75 21ZM8.75 21L9.75 21A0.75 0.75 0 0 1 9.75 19.5L8.75 19.5A0.75 0.75 0 0 1 8.75 21ZM14.25 21L15.25 21A0.75 0.75 0 0 1 15.25 19.5L14.25 19.5A0.75 0.75 0 0 1 14.25 21ZM19.25 21L20.25 21A0.75 0.75 0 0 1 20.25 19.5L19.25 19.5A0.75 0.75 0 0 1 19.25 21ZM3 3.75L3 4.75A0.75 0.75 0 0 1 4.5 4.75L4.5 3.75A0.75 0.75 0 0 1 3 3.75ZM3 8.75L3 9.75A0.75 0.75 0 0 1 4.5 9.75L4.5 8.75A0.75 0.75 0 0 1 3 8.75ZM3 14.25L3 15.25A0.75 0.75 0 0 1 4.5 15.25L4.5 14.25A0.75 0.75 0 0 1 3 14.25ZM3 19.25L3 20.25A0.75 0.75 0 0 1 4.5 20.25L4.5 19.25A0.75 0.75 0 0 1 3 19.25ZM1.5 9.75L22.5 9.75A1.5 1.5 0 0 1 22.5 6.75L1.5 6.75A1.5 1.5 0 0 1 1.5 9.75ZM1.5 17.25L22.5 17.25A1.5 1.5 0 0 1 22.5 14.25L1.5 14.25A1.5 1.5 0 0 1 1.5 17.25Z"})})}export{L as CropYSolidIcon};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{isSafeLinkHref as e}from"./chunk-PJPK2ADX.js";import{Icon as r}from"./chunk-
|
|
1
|
+
import{isSafeLinkHref as e}from"./chunk-PJPK2ADX.js";import{Icon as r}from"./chunk-VJPJNCB4.js";import{useShellStrings as t}from"./chunk-OVNRVFWS.js";import{jsx as n,jsxs as s}from"react/jsx-runtime";var a=/!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]+)\]\(([^)]+)\)|\*\*([^*]+)\*\*|`([^`]+)`|\*([^*]+)\*/g,l=r=>e(r.trim());function c(e){const r=[];let t,c=0,o=0;for(a.lastIndex=0;null!==(t=a.exec(e));)t.index>c&&r.push(e.slice(c,t.index)),void 0!==t[1]?r.push(
|
|
2
2
|
/* @__PURE__ */s("span",{className:"text-gray-400",children:["[",t[1],"]"]},o++)):void 0!==t[3]?r.push(
|
|
3
3
|
/* @__PURE__ */n("a",{href:l(t[4])?t[4]:void 0,target:"_blank",rel:"noreferrer",className:"text-blue-600 hover:underline",children:t[3]},o++)):void 0!==t[5]?r.push(
|
|
4
4
|
/* @__PURE__ */n("strong",{className:"font-semibold text-gray-900",children:t[5]},o++)):void 0!==t[6]?r.push(
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as A}from"react/jsx-runtime";function L({size:L=18,...M}){/* @__PURE__ */
|
|
2
|
+
return A("svg",{width:L,height:L,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",...M,children:/* @__PURE__ */A("path",{d:"M3.75 4.5L4.75 4.5A0.75 0.75 0 0 1 4.75 3L3.75 3A0.75 0.75 0 0 1 3.75 4.5ZM8.75 4.5L9.75 4.5A0.75 0.75 0 0 1 9.75 3L8.75 3A0.75 0.75 0 0 1 8.75 4.5ZM14.25 4.5L15.25 4.5A0.75 0.75 0 0 1 15.25 3L14.25 3A0.75 0.75 0 0 1 14.25 4.5ZM19.25 4.5L20.25 4.5A0.75 0.75 0 0 1 20.25 3L19.25 3A0.75 0.75 0 0 1 19.25 4.5ZM19.5 3.75L19.5 4.75A0.75 0.75 0 0 1 21 4.75L21 3.75A0.75 0.75 0 0 1 19.5 3.75ZM19.5 8.75L19.5 9.75A0.75 0.75 0 0 1 21 9.75L21 8.75A0.75 0.75 0 0 1 19.5 8.75ZM19.5 14.25L19.5 15.25A0.75 0.75 0 0 1 21 15.25L21 14.25A0.75 0.75 0 0 1 19.5 14.25ZM19.5 19.25L19.5 20.25A0.75 0.75 0 0 1 21 20.25L21 19.25A0.75 0.75 0 0 1 19.5 19.25ZM3.75 21L4.75 21A0.75 0.75 0 0 1 4.75 19.5L3.75 19.5A0.75 0.75 0 0 1 3.75 21ZM8.75 21L9.75 21A0.75 0.75 0 0 1 9.75 19.5L8.75 19.5A0.75 0.75 0 0 1 8.75 21ZM14.25 21L15.25 21A0.75 0.75 0 0 1 15.25 19.5L14.25 19.5A0.75 0.75 0 0 1 14.25 21ZM19.25 21L20.25 21A0.75 0.75 0 0 1 20.25 19.5L19.25 19.5A0.75 0.75 0 0 1 19.25 21ZM3 3.75L3 4.75A0.75 0.75 0 0 1 4.5 4.75L4.5 3.75A0.75 0.75 0 0 1 3 3.75ZM3 8.75L3 9.75A0.75 0.75 0 0 1 4.5 9.75L4.5 8.75A0.75 0.75 0 0 1 3 8.75ZM3 14.25L3 15.25A0.75 0.75 0 0 1 4.5 15.25L4.5 14.25A0.75 0.75 0 0 1 3 14.25ZM3 19.25L3 20.25A0.75 0.75 0 0 1 4.5 20.25L4.5 19.25A0.75 0.75 0 0 1 3 19.25ZM14.25 1.5L14.25 22.5A1.5 1.5 0 0 1 17.25 22.5L17.25 1.5A1.5 1.5 0 0 1 14.25 1.5Z"})})}export{L as CropRightSolidIcon};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{resolveColumnShares as e,COLUMN_SHARES_EQUAL as t,COLUMN_SHARE_MIN as r,COLUMN_COUNT_MAX as n}from"./chunk-PLGJOHEG.js";import{InputNumber_default as o}from"./chunk-
|
|
1
|
+
import{resolveColumnShares as e,COLUMN_SHARES_EQUAL as t,COLUMN_SHARE_MIN as r,COLUMN_COUNT_MAX as n}from"./chunk-PLGJOHEG.js";import{InputNumber_default as o}from"./chunk-FDIJEOGV.js";import{Button_default as i}from"./chunk-FSP63GKK.js";import{Tooltip as l}from"./chunk-Z3WKHMVB.js";import{useShellStrings as a}from"./chunk-OVNRVFWS.js";import{useId as s,useRef as c,useState as d,useEffect as u,Fragment as h}from"react";import{jsxs as f,jsx as m}from"react/jsx-runtime";var p=(e,t,r)=>Math.min(r,Math.max(t,e)),v=e=>e.reduce((e,t)=>e+t,0),g=(e,t)=>e.length===t.length&&e.every((e,r)=>e===t[r]);var y,b="w-0.5",w=`${b} group-hover/widths:w-1 group-focus-visible/widths:w-1`;var x=["text-blue-700","text-gray-600"];function k({count:k,value:$,onChange:C,label:N,"aria-labelledby":P,readOnly:j=!1,disabled:M=!1,footer:R=!0,className:z=""}){const K=a().widths,S=s(),B=p(Math.round(k)||1,1,n),O=e($,B),A=O??[...t[B]??[]],D=[...A,100-v(A)],E=j||M,F=c(null),T=c({onChange:C,shown:A,locked:E,n:B,stored:O});T.current={onChange:C,shown:A,locked:E,n:B,stored:O};const V=t=>{const{onChange:r,shown:n,locked:o,n:i}=T.current;if(o)return!1;const l=e(t,i);return!(!l||g(l,n))&&(r(l),!0)},G=(e,t,n)=>{const o=e[t]+e[t+1],i=[...e];i[t]=p(Math.round(n),r,o-r),i[t+1]=o-i[t],V(i.slice(0,-1))&&(ie.current=null)},H=e=>t=>{if(t.altKey||t.ctrlKey||t.metaKey)return;const n=t.shiftKey?10:1,o=D[e]+D[e+1],i="ArrowRight"===t.key?D[e]+n:"ArrowLeft"===t.key?D[e]-n:"PageUp"===t.key?D[e]+10:"PageDown"===t.key?D[e]-10:"Home"===t.key?r:"End"===t.key?o-r:null;null!==i&&(t.preventDefault(),G(D,e,i))},I=c(null),[W,L]=d(null),J=()=>{I.current=null,L(null),document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")};u(()=>J,[]);const U=e=>t=>{if(0!==t.button||E)return;t.preventDefault();const r=F.current?.getBoundingClientRect().width??0;r<=0||(I.current={i:e,x:t.clientX,width:r,from:D,moved:!1,pointer:t.pointerId},L(e),t.currentTarget.setPointerCapture?.(t.pointerId),document.body.style.cursor="col-resize",document.body.style.userSelect="none")},X=e=>{const t=I.current;if(!t)return;if(0===e.buttons)return void J();const r=e.clientX-t.x;if(!t.moved){if(Math.abs(r)<3)return;t.moved=!0}G(t.from,t.i,t.from[t.i]+r/t.width*100)},q=e=>{const t=I.current;t&&(e.currentTarget.hasPointerCapture?.(t.pointer)&&e.currentTarget.releasePointerCapture(t.pointer),J())},Z=(e,t)=>{const{shown:n}=T.current,o=function(e,t,n){const o=e.length,i=[...e];if(o<2)return i;const l=p(Math.round(n),r,100-(o-1)*r);let a=l-i[t];i[t]=l;const s=[...Array.from({length:o-1-t},(e,r)=>t+1+r),...Array.from({length:t},(e,r)=>t-1-r)];if(a<0)return i[s[0]]-=a,i;for(const e of s){if(a<=0)break;const t=Math.min(a,i[e]-r);i[e]-=t,a-=t}return i}([...n,100-v(n)],e,t);return V(o.slice(0,-1))?o:null},[Q,Y]=d(0);u(()=>{const e=F.current;if(!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Y(e.getBoundingClientRect().width));return t.observe(e),()=>t.disconnect()},[]);const _=c(null),[ee,te]=d(null),[re,ne]=d([]),oe=(e,t)=>te(r=>t?e:r===e?null:r),ie=c(null),le=(e,t)=>{const r=ie.current;if(!r||r.column!==e||r.share!==t)return!1;const{onChange:n,locked:o,stored:i}=T.current;var l,a;return o||(l=i,a=r.stored,void 0===l||void 0===a?l===a:g(l,a))||n(r.stored),!0},ae=D.join(",");u(()=>{const e=null===ee?[]:function(e,t){if(!e)return[];const r=Array.from(e.querySelectorAll("input[data-widths-label]")),n=r[t]?.getBoundingClientRect();if(!n||0===n.width)return[];if(void 0===y&&(y=document.createElement("canvas").getContext("2d")),!y)return[];const o=y;return r.flatMap((e,r)=>{if(r===t)return[];const i=e.getBoundingClientRect(),l=getComputedStyle(e);o.font=`${l.fontWeight} ${l.fontSize} ${l.fontFamily}`;const a=o.measureText(e.value).width/2,s=(i.left+i.right)/2;return s+a>n.left&&s-a<n.right?[r]:[]})}(_.current,ee);ne(t=>g(t,e)?t:e)},[ee,ae,Q]);const se=D.slice(0,-1).map((e,t)=>v(D.slice(0,t+1)));/* @__PURE__ */
|
|
2
2
|
return f("div",{role:"group","aria-label":P?void 0:N,"aria-labelledby":P,"aria-describedby":B>1?S:void 0,className:`flex w-full min-w-0 flex-col gap-2 ${M?"opacity-60":""} ${z}`.trim(),children:[
|
|
3
3
|
/* @__PURE__ */f("div",{ref:_,"data-widths-bar":"",className:"relative h-8",children:[
|
|
4
|
-
/* @__PURE__ */m("div",{ref:
|
|
5
|
-
/* @__PURE__ */m("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 rounded-(--radius-control) border border-gray-300"}),B>1&&
|
|
6
|
-
return m("div",{className:"absolute inset-y-0 "+(n?"z-20":""),style:{left:`clamp(0px, calc(${i+e/2}% - ${l} / 2), calc(100% - ${l}))`,width:l},children:/* @__PURE__ */m(o,{appearance:"bare",value:e,display:()=>(e=>Q>0&&Q*e/100<36?String(e):`${e}%`)(e),suffix:"%",min:r,max:100-(B-1)*r,step:1,shiftStep:10,precision:0,allowEmpty:!1,reportWhileTyping:!1,readOnly:j,disabled:M,"aria-label":K.column(t+1),"aria-describedby":S,"data-widths-label":"",onChange:e=>{null===e||le(t,e)||Z(t,e)},onRevert:e=>((e,t)=>{
|
|
4
|
+
/* @__PURE__ */m("div",{ref:F,"data-widths-track":"",className:"flex h-full w-full overflow-hidden rounded-(--radius-control) bg-white",children:D.map((e,t)=>/* @__PURE__ */m("div",{"data-widths-segment":"",style:{flexBasis:`${e}%`},className:`flex min-w-0 shrink-0 grow-0 items-center justify-center overflow-hidden whitespace-nowrap text-xs font-medium tabular-nums ${x[t%2]} ${t%2==0?"bg-blue-50":""}`,children:1===B&&/* @__PURE__ */m("span",{"data-widths-label":"",children:`${e}%`})},t))}),
|
|
5
|
+
/* @__PURE__ */m("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 rounded-(--radius-control) border border-gray-300"}),B>1&&D.map((e,t)=>/* @__PURE__ */f(h,{children:[(()=>{const n=ee===t,i=v(D.slice(0,t)),l=n?`max(${e}%, 40px)`:`${e}%`;/* @__PURE__ */
|
|
6
|
+
return m("div",{className:"absolute inset-y-0 "+(n?"z-20":""),style:{left:`clamp(0px, calc(${i+e/2}% - ${l} / 2), calc(100% - ${l}))`,width:l},children:/* @__PURE__ */m(o,{appearance:"bare",value:e,display:()=>(e=>Q>0&&Q*e/100<36?String(e):`${e}%`)(e),suffix:"%",min:r,max:100-(B-1)*r,step:1,shiftStep:10,precision:0,allowEmpty:!1,reportWhileTyping:!1,readOnly:j,disabled:M,"aria-label":K.column(t+1),"aria-describedby":S,"data-widths-label":"",onChange:e=>{null===e||le(t,e)||Z(t,e)},onRevert:e=>((e,t)=>{T.current.locked||null===t||le(e,t)||Z(e,t)})(t,e),onFocus:()=>{ie.current={column:t,share:e,stored:T.current.stored},oe(t,!0)},onBlur:()=>oe(t,!1),className:`absolute inset-0 text-xs font-medium ${x[t%2]} ${re.includes(t)&&!n?"opacity-0":""}`})})})(),t<B-1&&/* @__PURE__ */m("div",{className:"absolute inset-y-0 z-10 w-3 -translate-x-1/2",style:{left:`${se[t]}%`},children:/* @__PURE__ */m(l,{content:K.dragHint,delay:600,className:"relative flex h-full w-full",children:/* @__PURE__ */m("div",{role:"separator",tabIndex:M?-1:0,"aria-orientation":"vertical","aria-label":K.divider(t+1,t+2),"aria-valuenow":D[t],"aria-valuemin":r,"aria-valuemax":D[t]+D[t+1]-r,"aria-valuetext":K.dividerValue(t+1,D[t],t+2,D[t+1]),"aria-disabled":E||void 0,onKeyDown:E?void 0:H(t),onPointerDown:U(t),onPointerMove:X,onPointerUp:q,onPointerCancel:q,onLostPointerCapture:()=>{I.current&&J()},className:"group/widths flex h-full w-full touch-none justify-center rounded-(--radius-control) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(E?"cursor-default":"cursor-col-resize"),children:/* @__PURE__ */m("span",{"aria-hidden":"true","data-widths-line":"",className:"h-full rounded-full "+(E?`${b} bg-gray-300`:`bg-blue-600 transition-[width,background-color] duration-(--motion-fast) group-hover/widths:bg-blue-700 ${W===t?"w-1":w}`)})})})})]},t))]}),B>1&&!R&&/* @__PURE__ */m("span",{id:S,className:"sr-only",children:K.hint(B,r)}),B>1&&R&&/* @__PURE__ */m("div",{"data-widths-footer":"",className:"@container",children:/* @__PURE__ */f("div",{className:"flex items-center justify-between gap-2 @max-[264px]:flex-col @max-[264px]:items-end",children:[
|
|
7
7
|
/* @__PURE__ */m("span",{id:S,"data-widths-hint":"",className:"text-2xs leading-tight text-gray-500 @max-[264px]:self-stretch",children:K.hint(B,r)}),
|
|
8
|
-
/* @__PURE__ */m(i,{variant:"secondary",size:"sm",disabled:
|
|
8
|
+
/* @__PURE__ */m(i,{variant:"secondary",size:"sm",disabled:E,onClick:()=>{E||void 0===$||C(void 0)},className:"shrink-0",children:K.reset})]})})]})}export{k as WidthsBar};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import{keepsNativeMenu as e}from"./chunk-GZCAFWWB.js";import{optionNoteClass as t}from"./chunk-QR4RM7PO.js";import{Icon as n}from"./chunk-
|
|
2
|
-
return k("span","checkbox"===e?{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center rounded border "+(t?"border-blue-600 bg-blue-600 text-white":"border-gray-400"),children:t&&j}:{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:t&&j})}var
|
|
3
|
-
return w("button",{ref:f,id:u,role:"radio"===T?"menuitemradio":"checkbox"===T?"menuitemcheckbox":a??(C?"menuitem":void 0),"aria-checked":T?l:void 0,"aria-labelledby":b?x:void 0,"aria-describedby":b?N:void 0,tabIndex:s,onClick:()=>{e?.(),g&&g.depth>0&&"checkbox"!==T&&g.closeTree()},onMouseEnter:()=>{g?.scheduleClose(g.depth),h?.()},disabled:i,className:W.className,style:W.style,children:[T&&/* @__PURE__ */k(
|
|
1
|
+
import{keepsNativeMenu as e}from"./chunk-GZCAFWWB.js";import{optionNoteClass as t}from"./chunk-QR4RM7PO.js";import{Icon as n}from"./chunk-VJPJNCB4.js";import{onOverlayOpen as r}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as o}from"./chunk-62LW225J.js";import{useHydrated as i,useBrowserLayoutEffect as a}from"./chunk-D65T4H6J.js";import{glassStyle as l,GLASS_DIVIDER as c}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as d}from"./chunk-TWVUQUUD.js";import{createContext as s,forwardRef as u,useContext as p,useId as m,useRef as h,useState as f,useEffect as g,useMemo as y,useCallback as b}from"react";import{createPortal as x}from"react-dom";import{jsxs as w,jsx as k,Fragment as v}from"react/jsx-runtime";function N(e,t,n){return e.length===t+1&&e[t].key===n.key?e:[...e.slice(0,t),n]}function C(e,t){const n=Math.max(0,t);return e.length>n?e.slice(0,n):e}function W(e,t,n){if(0===t.length||0===e.length)return[];const r=[e];for(let e=1;e<t.length;e++){const o=r[e-1].find(n=>n.to===t[e].key),i=o?n(o):[];if(0===i.length)break;r.push(i)}return r}function T(e,t,n,r){const o=Math.max(0,r-n),i=Math.min(t,o),a=e-i/2;return a<n?n:a+i>r?Math.max(n,r-i):a}function E(e,t,n,r,o,i=!1,a=8){const l=t+o,c=e-o-n,d=c>=a;return i&&d?{left:c,flipped:!0}:l+n<=r-a?{left:l,flipped:!1}:d?{left:c,flipped:!0}:i?{left:a,flipped:!0}:{left:Math.max(a,r-a-n),flipped:!1}}function M(){try{return getComputedStyle(document.documentElement).getPropertyValue("--menu-density")?.trim()||"normal"}catch{return"normal"}}var B=s(null),$=s(!1);function L({children:t,style:n,className:a="",onClose:c,minWidth:s=180,portal:u=!1}){const p=h(null),b=m(),[w,v]=f([]),W=h();g(()=>()=>clearTimeout(W.current),[]);const T=i(),E=y(()=>{const e=()=>clearTimeout(W.current);return{id:b,depth:0,path:w,open:(t,n)=>{e(),v(e=>N(e,t,n))},scheduleClose:t=>{e(),W.current=setTimeout(()=>v(e=>C(e,t)),200)},closeBelow:t=>{e(),v(e=>C(e,t))},cancelClose:e,closeTree:()=>{e(),v([]),c?.()},root:p}},[b,w,c]);g(()=>{if(!c)return;const e=e=>{e.target.closest("[data-menu-toggle]")||e.target.closest?.(`[data-popup-menu-tree="${b}"]`)||p.current&&!p.current.contains(e.target)&&c()},t=e=>{"Escape"===e.key&&c()};window.addEventListener("pointerdown",e),window.addEventListener("keydown",t);const n=r(c),o=d(()=>!1,()=>p.current);return()=>{window.removeEventListener("pointerdown",e),window.removeEventListener("keydown",t),n(),o()}},[c,b]),g(()=>{const e=p.current;e&&requestAnimationFrame(()=>{const t=e.getBoundingClientRect();if(t.right>window.innerWidth-8){const n=t.right-window.innerWidth+8;e.style.left?e.style.left=parseFloat(e.style.left)-n+"px":e.style.right||(e.style.left=t.left-n+"px")}if(t.left<8&&(e.style.left?e.style.left="8px":e.style.right&&(e.style.right=window.innerWidth-t.width-8+"px")),t.bottom>window.innerHeight-8){const n=t.bottom-window.innerHeight+8;e.style.top?e.style.top=parseFloat(e.style.top)-n+"px":e.style.bottom?e.style.bottom="8px":e.style.top=t.top-n+"px"}t.top<8&&(e.style.top?e.style.top="8px":e.style.bottom&&(e.style.bottom=window.innerHeight-t.height-8+"px"))})});const $=M(),L=/(^|[\s:])!?z-/.test(a),R=/* @__PURE__ */k("div",{ref:p,"data-popup-menu-tree":b,className:`fixed rounded-(--radius-popup) ${"tight"===$?"py-1":"large"===$?"py-2":"py-1"} ${a}`,onContextMenu:t=>{e(t.target)||t.preventDefault()},style:{...L?{}:{zIndex:o.menu},minWidth:s,animation:"popup-in 0.12s ease-out",...l(),...n},children:/* @__PURE__ */k(B.Provider,{value:E,children:t})});return u?T?x(R,document.body):null:R}function R(e,t,n,r=!1){const o=M(),i="tight"===o?"0.25rem":"large"===o?"0.6rem":0;return{className:`w-full flex items-center gap-2 text-left transition-colors rounded-lg mx-auto\n ${e?"text-red-600 not-disabled:not-aria-disabled:hover:bg-red-50":r?"bg-blue-50 text-blue-700":"text-gray-700 not-disabled:not-aria-disabled:hover:bg-blue-50 not-disabled:not-aria-disabled:hover:text-blue-700"}\n ${t?"opacity-40 cursor-not-allowed":""}\n ${n}`,style:{width:"calc(100% - 8px)",marginLeft:4,marginRight:4,fontSize:"var(--menu-font-size, 14px)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:i,paddingBottom:i,..."normal"===o?{minHeight:"calc(var(--row-height-menu, 2.25rem) + 2 * (var(--menu-padding-y, 0.5rem) - 0.5rem))"}:{}}}}var j=/* @__PURE__ */k(n,{name:"check","aria-hidden":!0,className:"h-4 w-4",strokeWidth:2});function A({kind:e,checked:t}){/* @__PURE__ */
|
|
2
|
+
return k("span","checkbox"===e?{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center rounded border "+(t?"border-blue-600 bg-blue-600 text-white":"border-gray-400"),children:t&&j}:{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:t&&j})}var D=u(function({onClick:e,children:n,className:r="",danger:o,disabled:i,role:a,checked:l,icon:c,description:d,tabIndex:s,id:u,onMouseEnter:h},f){const g=p(B),y=m(),b=null!=d&&!1!==d,x=`${u??y}-label`,N=`${u??y}-note`,C=p($),W=R(o,i,r),T=void 0===l?null:"menuitemradio"===a?"radio":"checkbox";/* @__PURE__ */
|
|
3
|
+
return w("button",{ref:f,id:u,role:"radio"===T?"menuitemradio":"checkbox"===T?"menuitemcheckbox":a??(C?"menuitem":void 0),"aria-checked":T?l:void 0,"aria-labelledby":b?x:void 0,"aria-describedby":b?N:void 0,tabIndex:s,onClick:()=>{e?.(),g&&g.depth>0&&"checkbox"!==T&&g.closeTree()},onMouseEnter:()=>{g?.scheduleClose(g.depth),h?.()},disabled:i,className:W.className,style:W.style,children:[T&&/* @__PURE__ */k(A,{kind:T,checked:!!l}),b?
|
|
4
4
|
/* @__PURE__ */w("span",{className:"block min-w-0 flex-1 py-2",children:[
|
|
5
|
-
/* @__PURE__ */w("span",{className:"flex items-center gap-2",children:[null!=c&&/* @__PURE__ */k(
|
|
5
|
+
/* @__PURE__ */w("span",{className:"flex items-center gap-2",children:[null!=c&&/* @__PURE__ */k(P,{children:c}),
|
|
6
6
|
/* @__PURE__ */k("span",{id:x,className:"min-w-0",children:n})]}),
|
|
7
|
-
/* @__PURE__ */k("span",{id:N,"data-menu-note":"",className:t(),style:null!=c?{paddingLeft:"1.5rem"}:void 0,children:d})]}):/* @__PURE__ */w(v,{children:[null!=c&&/* @__PURE__ */k(
|
|
8
|
-
return k("span",{"aria-hidden":"true","data-menu-icon":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:e})}var
|
|
7
|
+
/* @__PURE__ */k("span",{id:N,"data-menu-note":"",className:t(),style:null!=c?{paddingLeft:"1.5rem"}:void 0,children:d})]}):/* @__PURE__ */w(v,{children:[null!=c&&/* @__PURE__ */k(P,{children:c}),n]})]})});function P({children:e}){/* @__PURE__ */
|
|
8
|
+
return k("span",{"aria-hidden":"true","data-menu-icon":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:e})}var H=/* @__PURE__ */k(n,{name:"chevron-right","aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0 ml-auto",strokeWidth:2});function F(e){let t=o.menu;for(let n=e;n&&n!==document.body;n=n.parentElement){const e=parseInt(getComputedStyle(n).zIndex,10);Number.isNaN(e)||(t=e)}return t}function I(e){return e?[...e.querySelectorAll("button:not([disabled])")].filter(t=>t.closest("[data-popup-submenu-panel]")===e):[]}function z({label:t,icon:n,children:r,disabled:o,className:i="",minWidth:c=180,maxHeight:s}){const u=p(B),f=m(),N=h(null),C=h(null),W=h(),$=h(!1),L=`${f}-menu`;g(()=>()=>clearTimeout(W.current),[]);const j=u?.depth??0,A=u?.path[j],D=!!A&&A.key===f&&!o,P=b(e=>{if(!u||o||!N.current)return;clearTimeout(W.current),$.current=e;const t=N.current.getBoundingClientRect(),n=N.current.closest("[data-popup-submenu-panel]")??N.current.closest("[data-popup-menu-tree]"),r=n?.getBoundingClientRect()??t,i=j>0&&(u.path[j-1]?.flipped??!1),a=E(r.left,r.right,c,window.innerWidth,4,i);u.open(j,{key:f,y:t.top,...a})},[u,o,j,f,c]),z=e=>{u?.closeBelow(j),N.current?.focus()};g(()=>{if(D)return d(e=>"Escape"===e.key&&(!(u&&u.path.length>j+1)&&(z(),!0)),()=>C.current)}),a(()=>{if(!D||!A)return;const e=()=>{const e=C.current;if(!e||!N.current)return;const t=N.current.closest("[data-popup-submenu-panel]")??N.current.closest("[data-popup-menu-tree]"),n=t?.getBoundingClientRect()??N.current.getBoundingClientRect(),r=j>0&&(u?.path[j-1]?.flipped??!1),o=e.offsetWidth||c,i=E(n.left,n.right,o,window.innerWidth,4,r,8),a=e.offsetHeight,l=T(N.current.getBoundingClientRect().top+a/2,a,8,window.innerHeight-8);e.style.left=`${i.left}px`,e.style.top=`${l}px`,e.dataset.flipped=String(i.flipped)};e();let t=0;const n=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>{cancelAnimationFrame(n),cancelAnimationFrame(t)}}),g(()=>{D&&$.current&&($.current=!1,I(C.current)[0]?.focus())},[D]);const S=y(()=>u&&{...u,depth:j+1},[u,j]);if(!u)throw new Error("PopupSubmenu must be rendered inside a PopupMenu");const J=R(!1,o,i,D),q=M();/* @__PURE__ */
|
|
9
9
|
return w(v,{children:[
|
|
10
|
-
/* @__PURE__ */w("button",{ref:N,type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":
|
|
11
|
-
/* @__PURE__ */k("span",{className:"min-w-0 flex-1 truncate",children:t}),
|
|
12
|
-
/* @__PURE__ */k("div",{ref:C,id
|
|
13
|
-
return k("div",{className:`border-t ${c} ${"tight"===e?"my-0.5":"large"===e?"my-2":"my-1"} mx-3`})}function
|
|
14
|
-
return k("div",{className:"text-xs font-medium uppercase tracking-wide",style:
|
|
15
|
-
return k("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */k("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})})}export{
|
|
10
|
+
/* @__PURE__ */w("button",{ref:N,type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":D,"aria-controls":D?L:void 0,disabled:o,"data-popup-submenu-row":!0,className:J.className,style:J.style,onClick:e=>{const t=0===e.detail;D?t&&I(C.current)[0]?.focus():P(t)},onKeyDown:e=>{"ArrowRight"===e.key&&(e.preventDefault(),e.stopPropagation(),P(!0))},onMouseEnter:()=>{o||(u.cancelClose(),D?u.closeBelow(j+1):(clearTimeout(W.current),W.current=setTimeout(()=>P(!1),120)))},onMouseLeave:()=>{clearTimeout(W.current),u.scheduleClose(j)},children:[n,
|
|
11
|
+
/* @__PURE__ */k("span",{className:"min-w-0 flex-1 truncate",children:t}),H]}),D&&x(
|
|
12
|
+
/* @__PURE__ */k("div",{ref:C,id:L,role:"menu","data-popup-menu-tree":u.id,"data-popup-submenu-panel":!0,className:"fixed rounded-(--radius-popup) overflow-x-hidden overflow-y-auto overscroll-contain "+("tight"===q?"py-1":"large"===q?"py-2":"py-1"),style:{left:A.left,top:A.y,minWidth:c,maxHeight:void 0===s?"calc(100vh - 16px)":`min(${"number"==typeof s?`${s}px`:s}, calc(100vh - 16px))`,zIndex:F(u.root.current)+j+1,animation:(A.flipped?"popup-submenu-in-left":"popup-submenu-in")+" 0.1s ease-out",...l()},onKeyDown:e=>{if(e.target.closest("[data-popup-submenu-panel]")!==e.currentTarget)return;const t=I(C.current),n=t.indexOf(document.activeElement),r=n=>{e.preventDefault(),e.stopPropagation(),t[(n+t.length)%t.length]?.focus()};"ArrowDown"===e.key?r(n+1):"ArrowUp"===e.key?r(n<0?t.length-1:n-1):"Home"===e.key?r(0):"End"===e.key?r(t.length-1):"ArrowLeft"===e.key&&(e.preventDefault(),e.stopPropagation(),z())},onMouseEnter:()=>{u.cancelClose(),clearTimeout(W.current)},onMouseLeave:()=>u.scheduleClose(j+1),onContextMenu:t=>{e(t.target)||t.preventDefault()},children:/* @__PURE__ */k(B.Provider,{value:S,children:r})}),document.body)]})}function S(){const e=M();/* @__PURE__ */
|
|
13
|
+
return k("div",{className:`border-t ${c} ${"tight"===e?"my-0.5":"large"===e?"my-2":"my-1"} mx-3`})}function J(){const e=M(),t="tight"===e?"0.125rem":"large"===e?"0.375rem":"0.25rem";return{color:"var(--ink-muted)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:t,paddingBottom:t}}function q({children:e}){/* @__PURE__ */
|
|
14
|
+
return k("div",{className:"text-xs font-medium uppercase tracking-wide",style:J(),children:e})}function U({d:e,className:t="h-4 w-4"}){/* @__PURE__ */
|
|
15
|
+
return k("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */k("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})})}export{A as MenuCheckMark,U as MenuIcon,$ as MenuSemanticsContext,L as PopupMenu,S as PopupMenuDivider,D as PopupMenuItem,q as PopupMenuLabel,z as PopupSubmenu,T as clampMenuTop,C as closeMenuBelow,R as itemLook,E as menuPanelLeft,J as menuTextRowStyle,N as openMenuLevel,W as resolveMenuLevels};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{CountBadge as e}from"./chunk-IJMV4F2Q.js";import{Icon as n}from"./chunk-
|
|
2
|
-
return o("div",{"data-accordion":$,className:`@container/acc flex flex-col ${"band"===$?"gap-0.5":""} ${g}`.trim(),children:d.map(i=>{const t=
|
|
1
|
+
import{CountBadge as e}from"./chunk-IJMV4F2Q.js";import{Icon as n}from"./chunk-VJPJNCB4.js";import{useShellStrings as i,useShellLocale as t}from"./chunk-OVNRVFWS.js";import{formatPlain as r}from"./chunk-C3QOHMR6.js";import{useState as a,useId as s}from"react";import{jsx as o,jsxs as c,Fragment as l}from"react/jsx-runtime";var d="px-4 @max-[260px]/acc:px-3",h={band:{head:`${d} py-3 bg-(--rosh-fold-band)`,press:"hover:bg-(--rosh-fold-band-hover)",title:"text-base font-semibold text-(--ink-strongest)",chev:"text-(--ink-strongest)",body:`${d} pb-2`},row:{head:`${d} py-2`,press:"hover:bg-gray-50",title:"text-sm font-medium text-(--ink-strong)",chev:"text-(--ink-strong)",body:`${d} pb-2`}},m=e=>[...e].map(e=>/[A-Za-z0-9_-]/.test(e)?e:`-u${e.codePointAt(0).toString(16)}-`).join(""),u="m-0 p-0 border-0 [font:inherit] [letter-spacing:inherit] [text-transform:inherit]";function f({items:d,defaultOpenIds:f=[],openIds:p,onOpenChange:b,allowMultiple:v=!1,level:x=3,tier:$="band",className:g=""}){const N=h[$],y=i(),k=t(),[w,j]=a(f),C=s(),O=`h${x}`,V=p??w;/* @__PURE__ */
|
|
2
|
+
return o("div",{"data-accordion":$,className:`@container/acc flex flex-col ${"band"===$?"gap-0.5":""} ${g}`.trim(),children:d.map(i=>{const t=V.includes(i.id),a=`${C}-${m(i.id)}-head`,s=`${C}-${m(i.id)}-panel`;/* @__PURE__ */
|
|
3
3
|
return c("div",{children:[
|
|
4
|
-
/* @__PURE__ */o(O,{className:u,children:/* @__PURE__ */c("button",{type:"button",id:a,disabled:i.disabled,"aria-expanded":t,"aria-controls":t?s:void 0,onClick:()=>(e=>{const n=
|
|
4
|
+
/* @__PURE__ */o(O,{className:u,children:/* @__PURE__ */c("button",{type:"button",id:a,disabled:i.disabled,"aria-expanded":t,"aria-controls":t?s:void 0,onClick:()=>(e=>{const n=V.includes(e)?V.filter(n=>n!==e):v?[...V,e]:[e];void 0===p&&j(n),b?.(n)})(i.id),className:`flex w-full items-center gap-2 text-left transition-colors duration-(--motion-fast) disabled:cursor-not-allowed disabled:opacity-50 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${N.head} ${N.press}`,children:[null!=i.icon&&/* @__PURE__ */o("span",{"aria-hidden":"true",className:`inline-flex h-4 w-4 shrink-0 items-center justify-center ${N.chev}`,children:i.icon}),
|
|
5
5
|
/* @__PURE__ */o("span",{className:`min-w-0 flex-1 ${N.title}`,children:i.title}),"number"==typeof i.count&&i.count>0&&
|
|
6
6
|
/* @__PURE__ */c(l,{children:[
|
|
7
7
|
/* @__PURE__ */o("span",{"aria-hidden":"true",className:"inline-flex",children:/* @__PURE__ */o(e,{count:i.count,tone:"accent"})}),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{IconButton_default as e}from"./chunk-JHDWTYZ4.js";import{toast_default as t}from"./chunk-2LKH6JM5.js";import{Icon as r}from"./chunk-
|
|
1
|
+
import{IconButton_default as e}from"./chunk-JHDWTYZ4.js";import{toast_default as t}from"./chunk-2LKH6JM5.js";import{Icon as r}from"./chunk-VJPJNCB4.js";import{currentShellStrings as n,useShellStrings as a}from"./chunk-OVNRVFWS.js";import{useState as o,useRef as i,useEffect as l,useCallback as c}from"react";import{jsxs as d,jsx as u,Fragment as s}from"react/jsx-runtime";function m(e){let t=null;try{t=window.getSelection()}catch{return null}if(!t||0===t.rangeCount||t.isCollapsed)return null;const r=e;if(r&&"number"==typeof r.nodeType){let e=!1;for(let n=0;n<t.rangeCount&&!e;n++)e=t.getRangeAt(n).intersectsNode(r);if(!e)return null}const n=t.toString();if(!n.trim())return null;const a=document.createElement("div");for(let e=0;e<t.rangeCount;e++)a.appendChild(t.getRangeAt(e).cloneContents());return{text:n,html:a.innerHTML}}async function p(e,t){try{if(t&&"undefined"!=typeof ClipboardItem&&navigator.clipboard?.write)return await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([e],{type:"text/plain"}),"text/html":new Blob([t],{type:"text/html"})})]),!0;if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0}catch{}const r=r=>{r.clipboardData?.setData("text/plain",e),t&&r.clipboardData?.setData("text/html",t),r.preventDefault()},n=document.createElement("textarea");n.value=e,n.style.position="fixed",n.style.opacity="0",document.body.appendChild(n),n.select(),document.addEventListener("copy",r);try{return document.execCommand("copy")}catch{return!1}finally{document.removeEventListener("copy",r),n.remove()}}async function y(e,r,a){const o=await p(r,a),i=n().copy;return o?t.success(i.copiedLabel(e)):t.error(i.failed),o}var b={bordered:"border border-gray-300 bg-white",flat:"bg-gray-100"},f={sm:{box:"gap-2 px-3 py-1 text-xs",button:"-my-1"},md:{box:"gap-2 px-3 min-h-8 py-1 text-sm",button:"-my-0.5"}};function h(){/* @__PURE__ */
|
|
2
2
|
return u(r,{name:"copy",className:"h-4 w-4","aria-hidden":"true"})}function x(){/* @__PURE__ */
|
|
3
|
-
return u(r,{name:"check",className:"h-4 w-4 text-green-600","aria-hidden":"true"})}function g({value:r,children:n,symbol:m,label:y,size:g="md",variant:w="bordered",hideCopyButton:v=!1,onCopy:C,multiline:N=!1,id:k,"aria-describedby":
|
|
4
|
-
return d("div",{id:
|
|
3
|
+
return u(r,{name:"check",className:"h-4 w-4 text-green-600","aria-hidden":"true"})}function g({value:r,children:n,symbol:m,label:y,size:g="md",variant:w="bordered",hideCopyButton:v=!1,onCopy:C,multiline:N=!1,id:k,"aria-describedby":T,className:j=""}){const[D,L]=o(!1),B=i(null),E=a().copy;l(()=>()=>{B.current&&clearTimeout(B.current)},[]);const J=c(async()=>{await p(r)?(L(!0),B.current&&clearTimeout(B.current),B.current=setTimeout(()=>{L(!1),B.current=null},2e3),C?.(r)):t.error(E.failed)},[r,C,E]),{box:H,button:R}=f[g],S=!v;/* @__PURE__ */
|
|
4
|
+
return d("div",{id:S?void 0:k,"aria-describedby":S?void 0:T,className:["inline-flex max-w-full items-center rounded-md",b[w],H,j].filter(Boolean).join(" "),children:[null!=m&&""!==m&&/* @__PURE__ */u("span",{"aria-hidden":"true",className:"shrink-0 select-none font-mono text-gray-400",children:m}),
|
|
5
5
|
/* @__PURE__ */u("span",{className:"min-w-0 font-mono text-gray-800 "+(N?"whitespace-pre-wrap break-all":"truncate"),title:N?void 0:r,children:n??r}),!v&&/* @__PURE__ */d(s,{children:[
|
|
6
|
-
/* @__PURE__ */u(e,{id:k,"aria-label":y?
|
|
7
|
-
/* @__PURE__ */u("span",{"aria-live":"polite",className:"sr-only",children:
|
|
6
|
+
/* @__PURE__ */u(e,{id:k,"aria-label":y?E.copyLabel(y):E.copy,"aria-describedby":T,onClick:J,className:`${R} text-gray-400`,children:/* @__PURE__ */u(D?x:h,{})}),
|
|
7
|
+
/* @__PURE__ */u("span",{"aria-live":"polite",className:"sr-only",children:D?E.copied:""})]})]})}export{g as Snippet,y as copyToClipboard,m as selectionAt};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Card as e}from"./chunk-RD5UPROC.js";import{Select_default as l}from"./chunk-
|
|
1
|
+
import{Card as e}from"./chunk-RD5UPROC.js";import{Select_default as l}from"./chunk-OJ3RN3BG.js";import{Input_default as a}from"./chunk-UNEJ2ABD.js";import{FormField as r}from"./chunk-MVQBVPWP.js";import{Checkbox_default as i}from"./chunk-CGZBDI6C.js";import{Banner as c}from"./chunk-UWNL4FO2.js";import{Button_default as d}from"./chunk-FSP63GKK.js";import{useState as s}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]=s(!0),[p,u]=s("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,4 +1,4 @@
|
|
|
1
|
-
import{Popover as e}from"./chunk-FND3BDOO.js";import{IconButton_default as r}from"./chunk-JHDWTYZ4.js";import{Icon as n}from"./chunk-
|
|
1
|
+
import{Popover as e}from"./chunk-FND3BDOO.js";import{IconButton_default as r}from"./chunk-JHDWTYZ4.js";import{Icon as n}from"./chunk-VJPJNCB4.js";import{Tooltip as a}from"./chunk-Z3WKHMVB.js";import{useShellStrings as l}from"./chunk-OVNRVFWS.js";import{useRef as t}from"react";import{jsx as i,jsxs as o}from"react/jsx-runtime";var s={ArrowLeft:[0,-1],ArrowRight:[0,1],ArrowUp:[-1,0],ArrowDown:[1,0]};function c({value:c,onChange:m,options:u,label:d,emptyValue:h,columns:p=5,disabled:f=!1,className:v=""}){const g=l(),b=g.iconPicker,N=g.iconNames,x=e=>e.label??N[e.value]??e.value,w=t([]),k=Math.max(0,u.findIndex(e=>e.value===c)),j=u[k],D=j?.value===h,A=t(null);/* @__PURE__ */
|
|
2
2
|
return i(e,{className:v,disabled:f,triggerLabel:j?b.button(d,x(j)):d,"aria-label":d,initialFocus:A,panelClassName:"!p-2",trigger:/* @__PURE__ */o("span",{className:"inline-flex items-center gap-2",children:[/* @__PURE__ */i("span",D||!j?{className:"text-sm",children:j?x(j):""}:{"aria-hidden":"true",className:"inline-flex [&_svg]:h-4 [&_svg]:w-4",children:j.icon}),
|
|
3
3
|
/* @__PURE__ */i(n,{name:"chevron-down",className:"h-4 w-4"})]}),children:({close:e})=>/* @__PURE__ */i("div",{role:"listbox","aria-label":d,className:"grid gap-1",style:{gridTemplateColumns:`repeat(${p}, 2rem)`},children:u.map((n,l)=>{const t=n.value===c;/* @__PURE__ */
|
|
4
4
|
return i(a,{content:x(n),children:/* @__PURE__ */i(r,{ref:e=>{w.current[l]=e,l===k&&(A.current=e)},role:"option","aria-selected":t,"aria-label":x(n),pressed:t,tabIndex:l===k?0:-1,onKeyDown:e=>((e,r)=>{const n=s[r.key];if(!n)return;r.preventDefault();const a=Math.floor(e/p)+n[0],l=e%p+n[1];if(a<0||l<0||l>=p)return;const t=a*p+l;if(!(t>=u.length)){for(const[e,r]of w.current.entries())r?.setAttribute("tabindex",e===t?"0":"-1");w.current[t]?.focus()}})(l,e),onClick:()=>{m(n.value),e()},children:/* @__PURE__ */i("span",{"aria-hidden":"true",className:"inline-flex [&_svg]:h-4 [&_svg]:w-4",children:n.icon})})},n.value)})})})}export{c as IconPicker};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as A}from"react/jsx-runtime";function L({size:L=18,...M}){/* @__PURE__ */
|
|
2
|
+
return A("svg",{width:L,height:L,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",...M,children:/* @__PURE__ */A("path",{d:"M3.125 3.75L3.9583 3.75A0.625 0.625 0 0 1 3.9583 2.5L3.125 2.5A0.625 0.625 0 0 1 3.125 3.75ZM7.2917 3.75L8.125 3.75A0.625 0.625 0 0 1 8.125 2.5L7.2917 2.5A0.625 0.625 0 0 1 7.2917 3.75ZM11.875 3.75L12.7083 3.75A0.625 0.625 0 0 1 12.7083 2.5L11.875 2.5A0.625 0.625 0 0 1 11.875 3.75ZM16.0417 3.75L16.875 3.75A0.625 0.625 0 0 1 16.875 2.5L16.0417 2.5A0.625 0.625 0 0 1 16.0417 3.75ZM16.25 3.125L16.25 3.9583A0.625 0.625 0 0 1 17.5 3.9583L17.5 3.125A0.625 0.625 0 0 1 16.25 3.125ZM16.25 7.2917L16.25 8.125A0.625 0.625 0 0 1 17.5 8.125L17.5 7.2917A0.625 0.625 0 0 1 16.25 7.2917ZM16.25 11.875L16.25 12.7083A0.625 0.625 0 0 1 17.5 12.7083L17.5 11.875A0.625 0.625 0 0 1 16.25 11.875ZM16.25 16.0417L16.25 16.875A0.625 0.625 0 0 1 17.5 16.875L17.5 16.0417A0.625 0.625 0 0 1 16.25 16.0417ZM3.125 17.5L3.9583 17.5A0.625 0.625 0 0 1 3.9583 16.25L3.125 16.25A0.625 0.625 0 0 1 3.125 17.5ZM7.2917 17.5L8.125 17.5A0.625 0.625 0 0 1 8.125 16.25L7.2917 16.25A0.625 0.625 0 0 1 7.2917 17.5ZM11.875 17.5L12.7083 17.5A0.625 0.625 0 0 1 12.7083 16.25L11.875 16.25A0.625 0.625 0 0 1 11.875 17.5ZM16.0417 17.5L16.875 17.5A0.625 0.625 0 0 1 16.875 16.25L16.0417 16.25A0.625 0.625 0 0 1 16.0417 17.5ZM2.5 3.125L2.5 3.9583A0.625 0.625 0 0 1 3.75 3.9583L3.75 3.125A0.625 0.625 0 0 1 2.5 3.125ZM2.5 7.2917L2.5 8.125A0.625 0.625 0 0 1 3.75 8.125L3.75 7.2917A0.625 0.625 0 0 1 2.5 7.2917ZM2.5 11.875L2.5 12.7083A0.625 0.625 0 0 1 3.75 12.7083L3.75 11.875A0.625 0.625 0 0 1 2.5 11.875ZM2.5 16.0417L2.5 16.875A0.625 0.625 0 0 1 3.75 16.875L3.75 16.0417A0.625 0.625 0 0 1 2.5 16.0417ZM1.25 14.375L18.75 14.375A1.25 1.25 0 0 1 18.75 11.875L1.25 11.875A1.25 1.25 0 0 1 1.25 14.375Z"})})}export{L as CropBottomMiniIcon};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{SidebarLayout as e}from"./chunk-
|
|
1
|
+
import{SidebarLayout as e}from"./chunk-G34KXE2L.js";import{Avatar as r}from"./chunk-UL4WB3VH.js";import{Button_default as t}from"./chunk-FSP63GKK.js";import{useState as a}from"react";import{jsx as i,jsxs as l}from"react/jsx-runtime";var s=[{id:"inbox",label:"Inbox",count:12},{id:"starred",label:"Starred",count:3},{id:"sent",label:"Sent"},{id:"drafts",label:"Drafts",count:1},{id:"archive",label:"Archive"},{id:"trash",label:"Trash"}],n=[{id:1,from:"Marco Reyes",subject:"Q3 roadmap review",preview:"Sharing the deck ahead of Thursday — let me know what you think before the review.",time:"9:14",unread:!0},{id:2,from:"Priya Patel",subject:"Design handoff",preview:"The Figma file is ready for engineering. I exported every icon at 1x and 2x.",time:"8:02",unread:!0},{id:3,from:"GitHub",subject:"[acme/web] PR #482 merged",preview:"Your pull request was merged into main by the release bot after all checks passed.",time:"Yest"},{id:4,from:"Sara Lind",subject:"Lunch Friday?",preview:"A few of us are heading to the new place on 5th at noon if you want to join.",time:"Yest"}];function d(){const[d,c]=a(1),o=n.find(e=>e.id===d)??n[0];/* @__PURE__ */
|
|
2
2
|
return i("div",{className:"h-full",children:/* @__PURE__ */i(e,{side:"left",defaultWidth:200,sidebar:/* @__PURE__ */l("div",{className:"flex h-full flex-col p-2",children:[
|
|
3
3
|
/* @__PURE__ */i(t,{block:!0,className:"mb-2",children:"Compose"}),s.map((e,r)=>/* @__PURE__ */l("button",{className:"flex items-center justify-between rounded-md px-3 py-2 text-left text-sm "+(0===r?"bg-blue-50 font-medium text-blue-700":"text-gray-700 hover:bg-gray-100"),children:[
|
|
4
4
|
/* @__PURE__ */i("span",{children:e.label}),null!=e.count&&/* @__PURE__ */i("span",{className:"text-xs text-gray-400",children:e.count})]},e.id))]}),children:/* @__PURE__ */l("div",{className:"flex h-full",children:[
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{TransferProgress as e}from"./chunk-EZQXLIG3.js";import{Icon as r}from"./chunk-
|
|
1
|
+
import{TransferProgress as e}from"./chunk-EZQXLIG3.js";import{Icon as r}from"./chunk-VJPJNCB4.js";import{DEFAULT_SHELL_STRINGS as t}from"./chunk-OVNRVFWS.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 u(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 c(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-white",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,2 @@
|
|
|
1
|
+
import{jsx as A}from"react/jsx-runtime";function L({size:L=18,...M}){/* @__PURE__ */
|
|
2
|
+
return A("svg",{width:L,height:L,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",...M,children:/* @__PURE__ */A("path",{d:"M3.125 3.75L3.9583 3.75A0.625 0.625 0 0 1 3.9583 2.5L3.125 2.5A0.625 0.625 0 0 1 3.125 3.75ZM7.2917 3.75L8.125 3.75A0.625 0.625 0 0 1 8.125 2.5L7.2917 2.5A0.625 0.625 0 0 1 7.2917 3.75ZM11.875 3.75L12.7083 3.75A0.625 0.625 0 0 1 12.7083 2.5L11.875 2.5A0.625 0.625 0 0 1 11.875 3.75ZM16.0417 3.75L16.875 3.75A0.625 0.625 0 0 1 16.875 2.5L16.0417 2.5A0.625 0.625 0 0 1 16.0417 3.75ZM16.25 3.125L16.25 3.9583A0.625 0.625 0 0 1 17.5 3.9583L17.5 3.125A0.625 0.625 0 0 1 16.25 3.125ZM16.25 7.2917L16.25 8.125A0.625 0.625 0 0 1 17.5 8.125L17.5 7.2917A0.625 0.625 0 0 1 16.25 7.2917ZM16.25 11.875L16.25 12.7083A0.625 0.625 0 0 1 17.5 12.7083L17.5 11.875A0.625 0.625 0 0 1 16.25 11.875ZM16.25 16.0417L16.25 16.875A0.625 0.625 0 0 1 17.5 16.875L17.5 16.0417A0.625 0.625 0 0 1 16.25 16.0417ZM3.125 17.5L3.9583 17.5A0.625 0.625 0 0 1 3.9583 16.25L3.125 16.25A0.625 0.625 0 0 1 3.125 17.5ZM7.2917 17.5L8.125 17.5A0.625 0.625 0 0 1 8.125 16.25L7.2917 16.25A0.625 0.625 0 0 1 7.2917 17.5ZM11.875 17.5L12.7083 17.5A0.625 0.625 0 0 1 12.7083 16.25L11.875 16.25A0.625 0.625 0 0 1 11.875 17.5ZM16.0417 17.5L16.875 17.5A0.625 0.625 0 0 1 16.875 16.25L16.0417 16.25A0.625 0.625 0 0 1 16.0417 17.5ZM2.5 3.125L2.5 3.9583A0.625 0.625 0 0 1 3.75 3.9583L3.75 3.125A0.625 0.625 0 0 1 2.5 3.125ZM2.5 7.2917L2.5 8.125A0.625 0.625 0 0 1 3.75 8.125L3.75 7.2917A0.625 0.625 0 0 1 2.5 7.2917ZM2.5 11.875L2.5 12.7083A0.625 0.625 0 0 1 3.75 12.7083L3.75 11.875A0.625 0.625 0 0 1 2.5 11.875ZM2.5 16.0417L2.5 16.875A0.625 0.625 0 0 1 3.75 16.875L3.75 16.0417A0.625 0.625 0 0 1 2.5 16.0417ZM1.25 8.125L18.75 8.125A1.25 1.25 0 0 1 18.75 5.625L1.25 5.625A1.25 1.25 0 0 1 1.25 8.125ZM1.25 14.375L18.75 14.375A1.25 1.25 0 0 1 18.75 11.875L1.25 11.875A1.25 1.25 0 0 1 1.25 14.375Z"})})}export{L as CropYMiniIcon};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Card as e}from"./chunk-RD5UPROC.js";import{Radio_default as a}from"./chunk-NI5FXWK5.js";import{Select_default as l}from"./chunk-
|
|
1
|
+
import{Card as e}from"./chunk-RD5UPROC.js";import{Radio_default as a}from"./chunk-NI5FXWK5.js";import{Select_default as l}from"./chunk-OJ3RN3BG.js";import{Input_default as r}from"./chunk-UNEJ2ABD.js";import{FormField as n}from"./chunk-MVQBVPWP.js";import{Checkbox_default as i}from"./chunk-CGZBDI6C.js";import{Textarea_default as c}from"./chunk-AWY3F6PV.js";import{Button_default as o}from"./chunk-FSP63GKK.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,12 +1,12 @@
|
|
|
1
|
-
import{nextEnabledIndex as e}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as t,filterOptionItems as n,optionMatches as r,groupedRows as l,OptionCheck as o,OptionSublabel as a}from"./chunk-
|
|
2
|
-
return S("button",{type:"button","aria-label":t,onMouseDown:t=>{t.preventDefault(),t.stopPropagation(),e()},className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity text-base leading-none",children:"×"})}function
|
|
3
|
-
return C("div",{ref:ye,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&(ye.current?.contains(t)||xe.current?.contains(t))||je.current||document.activeElement!==we.current&&De(!0)},children:[(Ye=/* @__PURE__ */S("input",{id:de,ref:we,type:"text",autoComplete:"off",role:"combobox","aria-expanded":ae,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-controls":ae?he:void 0,"aria-activedescendant":ae&&se>=0&&se<
|
|
4
|
-
/* @__PURE__ */S("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */S("span",{ref:
|
|
5
|
-
/* @__PURE__ */C("div",{ref:xe,onMouseDownCapture:()=>{je.current=!0,setTimeout(()=>{je.current=!1},0)},className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:p.popup,left:We?.left,right:We?.right,top:We?.top,bottom:We?.bottom,minWidth:We?.minWidth,width:We?.width,...re&&{maxWidth:We?.maxWidth},visibility:We?void 0:"hidden",...v()},children:[Z&&te&&
|
|
1
|
+
import{nextEnabledIndex as e}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as t,filterOptionItems as n,optionMatches as r,groupedRows as l,OptionCheck as o,OptionSublabel as a}from"./chunk-TUT6SGH2.js";import{INPUT_BASE_ON as i,INPUT_BASE as s}from"./chunk-JFSYWEHD.js";import{Button_default as u}from"./chunk-FSP63GKK.js";import{LoadingSpinner as c}from"./chunk-Q5MD3VY6.js";import{Tooltip as d}from"./chunk-Z3WKHMVB.js";import{onOverlayOpen as h}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as p}from"./chunk-62LW225J.js";import{useDropdownPosition as m,MENU_MAX_HEIGHT as f}from"./chunk-T53TXXOC.js";import{useBrowserLayoutEffect as g}from"./chunk-D65T4H6J.js";import{GLASS_DIVIDER as b,glassStyle as v}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{useShellStrings as w}from"./chunk-OVNRVFWS.js";import{useState as x,useId as k,useRef as $,useMemo as j,useEffect as D}from"react";import{createPortal as N}from"react-dom";import{jsxs as C,jsx as S}from"react/jsx-runtime";function W(e,t){const n=e.length;if(0===n||t(e.join(", ")))return{shown:n,cut:!1};if(1===n)return{shown:1,cut:!0};let r=0;for(let l=1;l<n&&t(`${e.slice(0,l).join(", ")} +${n-l}`);l+=1)r=l;return{shown:r,cut:!1}}function T({onClear:e,ariaLabel:t}){/* @__PURE__ */
|
|
2
|
+
return S("button",{type:"button","aria-label":t,onMouseDown:t=>{t.preventDefault(),t.stopPropagation(),e()},className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity text-base leading-none",children:"×"})}function F(F){const{options:R,placeholder:M,emptyOptionLabel:E,className:L="",disabled:z,id:O,filter:H=!1,allowFreeText:A=!1,freeTextOption:I,onSearchChange:U,loading:V=!1,error:B,onRetry:J,rightAdornment:K,renderOption:G,clearable:P=!0,"aria-label":X,"aria-labelledby":Q,"aria-describedby":Y}=F,Z=!0===F.multiple,q=F.multiple?F.value:F.value?[F.value]:[],_=F.multiple?"":F.value,ee=e=>{F.multiple?F.onChange(e):F.onChange(e[0]??"")},te=q.length>0,ne=H&&te&&!z,re=Z||H,le=null!=I,oe=A||le,[ae,ie]=x(!1),[se,ue]=x(-1),ce=k(),de=O??`${ce}-input`,he=`${ce}-listbox`,pe=e=>`${ce}-opt-${e}`,[me,fe]=x(""),ge=w(),be=E??ge.select.none,ve=e=>{fe(e),ue(-1),U?.(e)},ye=$(null),we=$(null),xe=$(null),ke=$(null),$e=$(ae);$e.current=ae;const je=$(!1),De=e=>{$e.current&&($e.current=!1,e&&A&&!le&&Pe&&(Z?q.includes(Pe)||ee([...q,Pe]):Pe!==_&&ee([Pe])),ie(!1),ve(""))},Ne=(e,t)=>{if(!e.disabled){if(Z)return ee(q.includes(e.value)?q.filter(t=>t!==e.value):[...q,e.value]),void(e===Xe?ve(""):ue(t));ee([e.value]),De(!1)}},[Ce,Se]=x(null);g(()=>{if(!K||ae)return void Se(null);const e=ke.current?.offsetWidth??0;Se(e?e+(Ee?32:8)+6:null)});const We=m(we,ae,re?{popupRef:xe}:{matchTriggerWidth:!0}),Te=j(()=>t(R),[R]),Fe=q.join("\0"),Re=j(()=>{const e=[],t=/* @__PURE__ */new Set;for(const n of Te)q.includes(n.value)&&!t.has(n.value)&&(t.add(n.value),e.push(n.label));if(oe)for(const n of q)t.has(n)||e.push(n);return e},[Te,Fe,oe]),Me=Re.join(", "),Ee=P&&te&&!z,[Le,ze]=x(null),Oe=$(null),He=$(""),Ae=$(()=>{});Ae.current=()=>{const e=we.current,t=Oe.current;if(!Z||!e||!t)return;const n=getComputedStyle(e),r=e.clientWidth-(parseFloat(n.paddingLeft)||0)-(parseFloat(n.paddingRight)||0),l=[n.fontStyle,n.fontWeight,n.fontSize,n.fontFamily,n.letterSpacing].join("|"),o=`${r}|${l}|${Re.join("\0")}`;if(o===He.current)return;He.current=o;let a=null;r>0&&Re.length>0&&(t.style.fontStyle=n.fontStyle,t.style.fontWeight=n.fontWeight,t.style.fontSize=n.fontSize,t.style.fontFamily=n.fontFamily,t.style.letterSpacing=n.letterSpacing,a=W(Re,e=>(t.textContent=e,t.getBoundingClientRect().width<=r)),t.textContent=""),ze(e=>e?.shown===a?.shown&&e?.cut===a?.cut?e:a)},g(()=>{Ae.current()}),D(()=>{const e=we.current;if(!Z||!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Ae.current());return t.observe(e),()=>t.disconnect()},[Z]);const Ie=Re.length,Ue=!Z||!Le||Le.shown>=Ie?Me:0===Le.shown?ge.select.selectedCount(Ie):`${Re.slice(0,Le.shown).join(", ")} +${Ie-Le.shown}`,Ve=Z&&null!==Le&&(Le.shown<Ie||Le.cut),Be=ae&&te&&re;D(()=>{if(!ae)return;const e=e=>{const t=e.target;ye.current?.contains(t)||xe.current?.contains(t)||De(!0)};document.addEventListener("mousedown",e);const t=h(()=>De(!0));return()=>{document.removeEventListener("mousedown",e),t()}},[ae,A,me,Fe,F.onChange]),D(()=>{if(ae)return y(e=>!("Escape"!==e.key||!$e.current)&&(De(!1),we.current?.blur(),!0),()=>xe.current)},[ae]);const Je=j(()=>{const e=/* @__PURE__ */new Set;return n(R,t=>!e.has(t.value)&&(e.add(t.value),!0))},[R]),Ke=j(()=>{if(U)return Je;const e=me.trim().toLowerCase();return e?n(Je,t=>r(t,e)):Je},[Je,me,U]),Ge=j(()=>t(Ke),[Ke]),Pe=me.trim(),Xe=j(()=>le&&Pe?Te.some(e=>e.label===Pe)||q.includes(Pe)?null:{value:Pe,label:Pe}:null,[le,Pe,Te,Fe]),Qe=j(()=>Xe?[...Ge,Xe]:Ge,[Ge,Xe]);/* @__PURE__ */
|
|
3
|
+
return C("div",{ref:ye,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&(ye.current?.contains(t)||xe.current?.contains(t))||je.current||document.activeElement!==we.current&&De(!0)},children:[(Ye=/* @__PURE__ */S("input",{id:de,ref:we,type:"text",autoComplete:"off",role:"combobox","aria-expanded":ae,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-controls":ae?he:void 0,"aria-activedescendant":ae&&se>=0&&se<Qe.length?pe(se):void 0,"aria-label":Q?void 0:X,"aria-labelledby":Q,"aria-describedby":Y,value:ae?me:Ue,onChange:e=>{ve(e.target.value),ie(!0)},onFocus:()=>{z||(ve(""),ie(!0))},onKeyDown:t=>{if("ArrowDown"===t.key||"ArrowUp"===t.key){if(z)return;if(t.preventDefault(),!ae)return void ie(!0);if(0===Qe.length)return;const n="ArrowDown"===t.key?1:-1;return void ue(t=>e(Qe,t,n))}"Enter"===t.key?(t.preventDefault(),ae&&se>=0&&se<Qe.length?Ne(Qe[se],se):1!==Ge.length||Ge[0].disabled?A&&!le&&Pe&&(Z?(q.includes(Pe)||ee([...q,Pe]),ve("")):(ee([Pe]),De(!1),we.current?.blur())):Ne(Ge[0],0)):"Escape"===t.key?(De(!1),we.current?.blur()):"Tab"===t.key&&De(!0)},placeholder:Be?Ue:M||be,className:`${ne?i:s} ${L} ${Ee?"pr-8":""} ${z?"bg-gray-50 text-gray-400 cursor-not-allowed":""} truncate${Be?" rosh-field-shows-choice":""}`,style:Ce?{paddingRight:Ce}:void 0,disabled:z}),Z?/* @__PURE__ */S(d,{content:!ae&&Ve?Me:null,className:"block",children:Ye}):Ye),Z&&
|
|
4
|
+
/* @__PURE__ */S("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */S("span",{ref:Oe,className:"whitespace-pre"})}),Ee&&/* @__PURE__ */S(T,{ariaLabel:ge.select.clear,onClear:()=>{ee([]),De(!1)}}),K&&!ae&&/* @__PURE__ */S("div",{ref:ke,className:`absolute top-1/2 -translate-y-1/2 ${Ee?"right-8":"right-2"} flex items-center gap-1 flex-nowrap justify-end pointer-events-none`,children:K}),ae&&N(
|
|
5
|
+
/* @__PURE__ */C("div",{ref:xe,onMouseDownCapture:()=>{je.current=!0,setTimeout(()=>{je.current=!1},0)},className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:p.popup,left:We?.left,right:We?.right,top:We?.top,bottom:We?.bottom,minWidth:We?.minWidth,width:We?.width,...re&&{maxWidth:We?.maxWidth},visibility:We?void 0:"hidden",...v()},children:[Z&&te&&P&&!z&&
|
|
6
6
|
/* @__PURE__ */S("button",{type:"button",tabIndex:-1,onMouseDown:e=>{e.preventDefault(),ee([])},className:`block w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm text-gray-600 hover:bg-gray-50 border-b ${b}`,children:ge.select.clearAll}),V?
|
|
7
7
|
/* @__PURE__ */S(c,{size:"sm",padding:"py-2",label:ge.search.searching}):B?/* @__PURE__ */C("div",{role:"alert",className:"flex items-center gap-2 px-3 py-2 text-sm text-red-600",children:[
|
|
8
|
-
/* @__PURE__ */S("span",{className:"min-w-0 flex-1",children:B}),
|
|
9
|
-
/* @__PURE__ */C("div",{id:he,role:
|
|
8
|
+
/* @__PURE__ */S("span",{className:"min-w-0 flex-1",children:B}),J&&/* @__PURE__ */S(u,{variant:"link",size:"sm",onMouseDown:e=>e.preventDefault(),onClick:J,className:"shrink-0",children:ge.list.retry})]}):null,
|
|
9
|
+
/* @__PURE__ */C("div",{id:he,role:Qe.length?"listbox":void 0,"aria-labelledby":Qe.length?Q??(X?void 0:de):void 0,"aria-label":Qe.length&&!Q?X:void 0,"aria-multiselectable":!(!Qe.length||!Z)||void 0,className:"overflow-y-auto",style:{maxHeight:We?.maxHeight??f},children:[0===Qe.length?V||B?null:/* @__PURE__ */S("p",{className:"px-3 py-3 text-sm text-gray-400 text-center",children:ge.select.noMatches}):0===Ge.length?null:l(Ke,(e,t)=>{const n=q.includes(e.value);/* @__PURE__ */
|
|
10
10
|
return C("button",{id:pe(t),type:"button",role:"option","aria-selected":n,"aria-disabled":e.disabled||void 0,tabIndex:-1,onMouseDown:n=>{(e.disabled||Z)&&n.preventDefault(),Ne(e,t)},className:"w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center justify-between gap-2 whitespace-nowrap "+(e.disabled?"cursor-not-allowed text-gray-400":`hover:bg-gray-50 ${n?"text-blue-600 font-medium":"text-gray-700"} ${t===se?"bg-gray-100":n?"bg-blue-50/50":""}`),children:[Z&&/* @__PURE__ */S(o,{selected:n}),
|
|
11
|
-
/* @__PURE__ */S("span",{className:`min-w-0 ${re?"flex-auto":"flex-1"} truncate`,children:
|
|
12
|
-
/* @__PURE__ */S("button",{id:pe(
|
|
11
|
+
/* @__PURE__ */S("span",{className:`min-w-0 ${re?"flex-auto":"flex-1"} truncate`,children:G?G(e,{selected:n,active:t===se}):e.label}),e.sublabel&&/* @__PURE__ */S(a,{grows:re,children:e.sublabel})]},e.value)},ce),Xe&&I&&
|
|
12
|
+
/* @__PURE__ */S("button",{id:pe(Ge.length),type:"button",role:"option","aria-selected":!1,tabIndex:-1,onMouseDown:e=>{Z&&e.preventDefault(),Ne(Xe,Ge.length)},className:`w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 whitespace-nowrap text-gray-700 hover:bg-gray-50 ${Ge.length?`border-t ${b}`:""} ${se===Ge.length?"bg-gray-100":""}`,children:/* @__PURE__ */S("span",{className:"min-w-0 flex-1 truncate",children:I(Xe.value)})},`${ce}-typed`)]})]}),document.body)]});var Ye}export{F as SearchableSelect,W as fitChoice};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as A}from"react/jsx-runtime";function r({size:r=18,...L}){/* @__PURE__ */
|
|
2
|
+
return A("svg",{width:r,height:r,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",...L,children:/* @__PURE__ */A("path",{d:"M8.75 10A1.25 1.25 0 1 1 11.25 10A1.25 1.25 0 1 1 8.75 10ZM10.625 7.5L10.625 3.125A0.625 0.625 0 0 1 9.375 3.125L9.375 7.5A0.625 0.625 0 0 1 10.625 7.5ZM8.5669 5.4419L10.4419 3.5669A0.625 0.625 0 0 1 9.5581 2.6831L7.6831 4.5581A0.625 0.625 0 0 1 8.5669 5.4419ZM9.5581 3.5669L11.4331 5.4419A0.625 0.625 0 0 1 12.3169 4.5581L10.4419 2.6831A0.625 0.625 0 0 1 9.5581 3.5669ZM9.375 12.5L9.375 16.875A0.625 0.625 0 0 1 10.625 16.875L10.625 12.5A0.625 0.625 0 0 1 9.375 12.5ZM7.6831 15.4419L9.5581 17.3169A0.625 0.625 0 0 1 10.4419 16.4331L8.5669 14.5581A0.625 0.625 0 0 1 7.6831 15.4419ZM10.4419 17.3169L12.3169 15.4419A0.625 0.625 0 0 1 11.4331 14.5581L9.5581 16.4331A0.625 0.625 0 0 1 10.4419 17.3169Z"})})}export{r as NudgeYMiniIcon};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Card as e}from"./chunk-RD5UPROC.js";import{Select_default as a}from"./chunk-
|
|
1
|
+
import{Card as e}from"./chunk-RD5UPROC.js";import{Select_default as a}from"./chunk-OJ3RN3BG.js";import{Input_default as r}from"./chunk-UNEJ2ABD.js";import{Pagination as t}from"./chunk-XKCEVZZB.js";import{StatusBadgeProvider as i,StatusBadge as s}from"./chunk-BOGBLZKS.js";import{TH_ONE_LINE as l}from"./chunk-QMQVOUIV.js";import{Button_default as c}from"./chunk-FSP63GKK.js";import{Icon as m}from"./chunk-VJPJNCB4.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[m,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,9 +1,9 @@
|
|
|
1
|
-
import{toISODate as e}from"./chunk-
|
|
2
|
-
return y("input",{ref:
|
|
1
|
+
import{toISODate as e}from"./chunk-UONWIAII.js";import{Calendar as t}from"./chunk-SNDYD76W.js";import{calendarNames as r}from"./chunk-5OTS2G3M.js";import{inputClasses as a,PLACEHOLDER_INK as n}from"./chunk-JFSYWEHD.js";import{Icon as i}from"./chunk-VJPJNCB4.js";import{onOverlayOpen as o}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as l}from"./chunk-62LW225J.js";import{useDropdownPosition as s}from"./chunk-T53TXXOC.js";import{useBrowserLayoutEffect as d}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as u}from"./chunk-TWVUQUUD.js";import{useShellStrings as c,useShellLocale as m}from"./chunk-OVNRVFWS.js";import{forwardRef as f,useState as b,useRef as p,useId as h,useEffect as v}from"react";import{createPortal as g}from"react-dom";import{jsx as y,jsxs as x}from"react/jsx-runtime";var N=/^\d{4}-\d{2}-\d{2}$/,k=/^(aria|data)-/,j=/* @__PURE__ */new Set(["aria-invalid","aria-required"]);function w(t){if(null==t||""===t)return"";if(t instanceof Date)return Number.isNaN(t.getTime())?"":e(t);if(N.test(t))return t;const r=new Date(t);return Number.isNaN(r.getTime())?"":e(r)}function D(e){if(!N.test(e))return null;const[t,r,a]=e.split("-").map(Number),n=new Date(t,r-1,a);return n.getMonth()===r-1&&n.getDate()===a?n:null}function F(e,t){const r=D(e);return r?t.longDate(r.getFullYear(),r.getMonth(),r.getDate()):""}var W=f(function({value:f,onChange:N,min:W,max:O,invalid:S,size:C,native:I,weekStartsOn:T,className:B="","aria-label":E,"aria-describedby":$,"aria-labelledby":q,id:J,name:z,disabled:M,placeholder:U,required:V,clearable:L,form:P,title:Y,tabIndex:G,autoFocus:H,onFocus:R,onBlur:X,...A},Q){const K=L??!V,Z=w(f),_=w(W),ee=w(O),te=c().datePicker,re=m(),ae=r(re),[ne,ie]=b(!1),oe=p(null),le=p(null),se=p(null),de=h(),ue=h(),ce=h(),me=s(le,ne,{popupRef:se}),[fe,be]=b(!1);d(()=>{const e=!!J&&(le.current?.labels?.length??0)>0;e!==fe&&be(e)});const pe=!E&&(!!q||fe);if(v(()=>{if(!ne)return;const e=e=>{const t=e.target;oe.current?.contains(t)||se.current?.contains(t)||ie(!1)};document.addEventListener("pointerdown",e,!0);const t=o(()=>ie(!1));return()=>{document.removeEventListener("pointerdown",e,!0),t()}},[ne]),v(()=>{if(ne)return u(e=>"Escape"===e.key&&(ie(!1),le.current?.focus(),!0),()=>se.current)},[ne]),I)/* @__PURE__ */
|
|
2
|
+
return y("input",{ref:Q,type:"date",lang:re,id:J,name:z,disabled:M,"aria-label":E,"aria-describedby":$,"aria-invalid":S||void 0,value:Z,min:_||void 0,max:ee||void 0,onChange:e=>N?.(D(e.target.value)),className:a({invalid:S,size:C,className:B}),"aria-labelledby":q,required:V,form:P,title:Y,tabIndex:G,autoFocus:H,onFocus:R,onBlur:X,...A});const he=Object.fromEntries(Object.entries(A).filter(([e])=>k.test(e)&&!j.has(e))),ve=A["aria-required"],ge=!!V||!0===ve||"true"===ve,ye=[pe?ue:void 0,ge?ce:void 0,$].filter(Boolean).join(" ")||void 0,xe=e(/* @__PURE__ */new Date),Ne=(!_||xe>=_)&&(!ee||xe<=ee),ke=U??te.placeholder;/* @__PURE__ */
|
|
3
3
|
return x("div",{ref:oe,className:"relative",children:[
|
|
4
|
-
/* @__PURE__ */y("input",{ref:
|
|
5
|
-
/* @__PURE__ */x("button",{ref:le,type:"button",...he,id:
|
|
6
|
-
/* @__PURE__ */y("span",{className:Z?"text-gray-900":"text-gray-400",children:Z?
|
|
7
|
-
/* @__PURE__ */y(i,{name:"date",className:`h-4 w-4 shrink-0 ${n}`,strokeWidth:"1.75","aria-hidden":"true"})]}),pe&&/* @__PURE__ */y("span",{id:ue,className:"sr-only",children:Z?
|
|
8
|
-
/* @__PURE__ */x("div",{ref:se,id:de,role:"dialog","aria-label":
|
|
9
|
-
/* @__PURE__ */y(t,{value:Z||null,min:_||null,max:ee||null,weekStartsOn:T,onSelect:e=>{ie(!1),le.current?.focus(),N?.(D(e))}}),(
|
|
4
|
+
/* @__PURE__ */y("input",{ref:Q,type:"hidden",name:z,form:P,value:Z}),
|
|
5
|
+
/* @__PURE__ */x("button",{ref:le,type:"button",...he,id:J,disabled:M,title:Y,tabIndex:G,autoFocus:H,onFocus:R,onBlur:X,"aria-haspopup":"dialog","aria-expanded":ne,"aria-controls":ne?de:void 0,"aria-labelledby":q,"aria-describedby":ye,"aria-label":E?`${E}${Z?`, ${F(Z,ae)}`:""}`:void 0,onClick:()=>ie(e=>!e),className:`${a({invalid:S,size:C,className:B})} flex items-center justify-between text-left`,children:[
|
|
6
|
+
/* @__PURE__ */y("span",{className:Z?"text-gray-900":"text-gray-400",children:Z?F(Z,ae):ke}),
|
|
7
|
+
/* @__PURE__ */y(i,{name:"date",className:`h-4 w-4 shrink-0 ${n}`,strokeWidth:"1.75","aria-hidden":"true"})]}),pe&&/* @__PURE__ */y("span",{id:ue,className:"sr-only",children:Z?F(Z,ae):ke}),ge&&/* @__PURE__ */y("span",{id:ce,className:"sr-only",children:te.required}),ne&&g(
|
|
8
|
+
/* @__PURE__ */x("div",{ref:se,id:de,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:l.popup,left:me?.left,right:me?.right,top:me?.top,bottom:me?.bottom,maxWidth:me?.maxWidth,visibility:me?void 0:"hidden"},children:[
|
|
9
|
+
/* @__PURE__ */y(t,{value:Z||null,min:_||null,max:ee||null,weekStartsOn:T,onSelect:e=>{ie(!1),le.current?.focus(),N?.(D(e))}}),(K||Ne)&&/* @__PURE__ */x("div",{className:"mt-2 flex justify-between border-t border-gray-100 pt-2",children:[K&&/* @__PURE__ */y("button",{type:"button",onClick:()=>{ie(!1),le.current?.focus(),N?.(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}),Ne&&/* @__PURE__ */y("button",{type:"button",onClick:()=>{ie(!1),le.current?.focus(),N?.(/* @__PURE__ */new Date)},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{W as DatePicker_default};
|