efficient-shell 8.12.0 → 8.14.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-26TOVDOP.js} +14 -14
- package/dist/Calculator-HGMW57YU.js +29 -0
- package/dist/{CurrencyConverter-USQIKK7H.js → CurrencyConverter-T6TJDZZW.js} +9 -9
- package/dist/{Documents-V5EJRADW.js → Documents-OYR25EJW.js} +13 -13
- package/dist/Files-TBNWVUGD.js +87 -0
- package/dist/{Notepad-UV4F6LGY.js → Notepad-24DNVRUJ.js} +9 -9
- package/dist/PdfViewer-Q7IS273H.js +1 -0
- package/dist/{PomodoroTimer-ZGJLP5LL.js → PomodoroTimer-MOW3OPPP.js} +5 -5
- package/dist/{Preview-ZMZ7CXAS.js → Preview-K7BU5P3L.js} +15 -15
- package/dist/Sidebar-NONBFVWE.js +43 -0
- package/dist/{Spreadsheet-62H5XUHC.js → Spreadsheet-LLBS5VAM.js} +11 -11
- package/dist/{Stock-Y3UQ22RS.js → Stock-RMZ2KVZX.js} +3 -3
- package/dist/{Weather-H3CYKPAG.js → Weather-H4OYMT3J.js} +16 -16
- package/dist/{WorldClock-SHLNS6IU.js → WorldClock-NYIJMHX7.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-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-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-WWEZQ7CF.js → chunk-7YM4CMWO.js} +1 -1
- package/dist/chunk-ARC3R4I2.js +3 -0
- 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-IC2YI7WC.js → chunk-HXXUMKTV.js} +1 -1
- package/dist/chunk-I7GWKMYO.js +2 -0
- 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-L3VD25XR.js +8 -0
- package/dist/{chunk-3RWLCKSR.js → chunk-L6CG37L3.js} +1 -1
- package/dist/{chunk-CMEN5O67.js → chunk-LES7RIWM.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-CP6FITHO.js → chunk-LT2MMSHH.js} +16 -16
- package/dist/chunk-MOJ2AKFM.js +1 -0
- package/dist/{chunk-S2Q6BOAX.js → chunk-MSCILVJB.js} +6 -6
- package/dist/{chunk-B772UFJ5.js → chunk-NMQOXQLH.js} +1 -1
- 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-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-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-XW7KN6HW.js → chunk-SNDYD76W.js} +12 -12
- package/dist/chunk-SXPBOX32.js +1 -0
- package/dist/{chunk-XVPTBX4R.js → chunk-TBPB7HL3.js} +3 -3
- package/dist/{chunk-HEVNCBNZ.js → chunk-TFDKULWU.js} +45 -45
- 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/hooks/useTheme.d.ts +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 +4 -3
- 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/ErrorBoundary.d.ts +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/Files-TDTCVNSE.js +0 -87
- 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
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{InputNumber_default as e}from"./chunk-FDIJEOGV.js";import{IconButton_default as a}from"./chunk-JHDWTYZ4.js";import{Icon as r}from"./chunk-VJPJNCB4.js";import{Tooltip as i}from"./chunk-Z3WKHMVB.js";import{jsx as t,jsxs as n,Fragment as o}from"react/jsx-runtime";var d="h-3.5 w-3.5",s={padding:{top:/* @__PURE__ */t(r,{name:"padding-top","aria-hidden":"true",className:d}),right:/* @__PURE__ */t(r,{name:"padding-right","aria-hidden":"true",className:d}),bottom:/* @__PURE__ */t(r,{name:"padding-bottom","aria-hidden":"true",className:d}),left:/* @__PURE__ */t(r,{name:"padding-left","aria-hidden":"true",className:d}),vertical:/* @__PURE__ */t(r,{name:"padding-y","aria-hidden":"true",className:d}),horizontal:/* @__PURE__ */t(r,{name:"padding-left-right","aria-hidden":"true",className:d})},crop:{top:/* @__PURE__ */t(r,{name:"crop-top","aria-hidden":"true",className:d}),right:/* @__PURE__ */t(r,{name:"crop-right","aria-hidden":"true",className:d}),bottom:/* @__PURE__ */t(r,{name:"crop-bottom","aria-hidden":"true",className:d}),left:/* @__PURE__ */t(r,{name:"crop-left","aria-hidden":"true",className:d}),vertical:/* @__PURE__ */t(r,{name:"crop-y","aria-hidden":"true",className:d}),horizontal:/* @__PURE__ */t(r,{name:"crop-left-right","aria-hidden":"true",className:d})}},l=/* @__PURE__ */t(r,{name:"sides-each","aria-hidden":"true",className:"h-4 w-4"});var m=(e,a,r)=>null===e[r]?a[r]:String(e[r]);function c(e,a){const r=r=>m(e,a,r);return r("left")!==r("right")||r("top")!==r("bottom")}function h({label:a,value:r,onChange:i,each:d,placeholder:l,words:c,min:h=0,max:p=200,step:u=4,readOnly:g,glyphs:f="padding"}){const b=s[f],N=(a,n,o)=>{const d=function(e,a){const r=a.map(a=>e[a]);return r.every(e=>e===r[0])?r[0]:"mixed"}(r,a),s=a.map(e=>m(r,l,e)),f="mixed"!==d&&s.every(e=>e===s[0])?s[0]:"–";/* @__PURE__ */
|
|
2
|
+
return t("div",{"data-side":a.join("-"),className:"min-w-0",children:/* @__PURE__ */t(e,{value:"mixed"===d?null:d,onChange:e=>((e,a)=>{const t={...r};for(const r of e)t[r]=a;i(t)})(a,e),min:h,max:p,step:u,snap:!0,precision:0,steppers:"compact",readOnly:g,placeholder:f,prefix:o,suffix:c.unit,"aria-label":n})})};/* @__PURE__ */
|
|
3
|
+
return t("div",{role:"group","aria-label":a,"data-sides":d?"each":"pairs",className:"grid min-w-0 grid-cols-2 gap-2",children:/* @__PURE__ */n(o,d?{children:[N(["left"],c.sides.left,b.left),N(["top"],c.sides.top,b.top),N(["right"],c.sides.right,b.right),N(["bottom"],c.sides.bottom,b.bottom)]}:{children:[N(["left","right"],c.horizontal,b.horizontal),N(["top","bottom"],c.vertical,b.vertical)]})})}function p({each:e,onChange:r,label:n,disabled:o}){/* @__PURE__ */
|
|
4
|
+
return t(i,{content:n,children:/* @__PURE__ */t(a,{size:"sm","aria-label":n,"aria-pressed":e,disabled:o,onClick:()=>r(!e),children:l})})}export{p as SidesEachToggle,h as SidesInput,c as sidesStartEach};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import{Calendar as e,fromKey as t}from"./chunk-
|
|
2
|
-
/* @__PURE__ */N("button",{type:"button",onClick:()=>oe("Custom"),className:
|
|
3
|
-
/* @__PURE__ */N(e,{mode:"range",min:
|
|
1
|
+
import{Calendar as e,fromKey as t}from"./chunk-SNDYD76W.js";import{calendarNames as r}from"./chunk-5OTS2G3M.js";import{FILTER_ON as n,FILTER_ON_INK as a,FILTER_OFF as o}from"./chunk-JFSYWEHD.js";import{buttonClasses as l}from"./chunk-K7U4RWXJ.js";import{Icon as i}from"./chunk-VJPJNCB4.js";import{onOverlayOpen as s}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as d}from"./chunk-62LW225J.js";import{useDropdownPosition as c}from"./chunk-T53TXXOC.js";import{useBrowserLayoutEffect as m}from"./chunk-D65T4H6J.js";import{glassStyle as u}from"./chunk-DTJRIWFR.js";import{useShellStrings as p,useShellLocale as h}from"./chunk-OVNRVFWS.js";import{useState as f,useRef as g,useId as b,useEffect as x}from"react";import{createPortal as y}from"react-dom";import{jsxs as v,Fragment as w,jsx as N}from"react/jsx-runtime";var k=["last2Weeks","lastMonth","last3Months","last6Months","last12Months"],C=e=>`${e.getFullYear()}-${D(e.getMonth()+1)}`,D=e=>String(e).padStart(2,"0");function W(e){return`${e.getFullYear()}-${D(e.getMonth()+1)}-${D(e.getDate())}`}function $(e,t){const r=t.getFullYear(),n=t.getMonth(),a=new Date(r,n,t.getDate()),o=new Date(r,n,0),l=e=>new Date(r,n-e,1);switch(e){case"last2Weeks":return{from:W(new Date(r,n,t.getDate()-14)),to:W(a)};case"lastMonth":return{from:W(l(1)),to:W(o)};case"last3Months":return{from:W(l(3)),to:W(o)};case"last6Months":return{from:W(l(6)),to:W(o)};case"last12Months":return{from:W(l(12)),to:W(o)}}}function M(e,t,r){const n=C(e);return t&&n<t.slice(0,7)?t.slice(0,7):r&&n>r.slice(0,7)?r.slice(0,7):n}function j(e){const[t,r,n]=e.split("-").map(Number);return new Date(t,r-1,n)}function S(e){const[t,r,n]=e.split("-");return t&&r&&n?`${n}/${r}/${t}`:e}var F=/* @__PURE__ */new Map;function O({from:D,to:W,onChange:O,formatDisplay:T,clearable:R,required:J=!1,name:Y,id:H,"aria-labelledby":E,"aria-label":B,weekStartsOn:L,placeholder:V,fullWidth:q=!1,min:G,max:I,disabled:U=!1,allowOpenEnd:X=!1}){const A=p().dateRange,P=h(),z=T??(P?function(e){let t=F.get(e);t||(t=new Intl.DateTimeFormat(e,{year:"numeric",month:"2-digit",day:"2-digit",timeZone:"UTC",calendar:"gregory"}),F.set(e,t));const r=t;return e=>{const[t,n,a]=e.split("-").map(Number);return t&&n&&a?r.format(new Date(Date.UTC(t,n-1,a))):e}}(P):S),K=V??A.placeholder,Z=R??!J,[Q,_]=f(!1),[ee,te]=f(D),[re,ne]=f(W),[ae,oe]=f(null),[le,ie]=f("from"),se=g(null),de=g(null),ce=g(null),me=b(),ue=b(),pe=b(),[he,fe]=f(!1),ge=c(se,Q,{preferredMaxWidth:520,preferredMaxHeight:he?720:560,popupRef:ce}),be=g(null),xe=g(null),[ye,ve]=f(!0);m(()=>{const e=xe.current;if(!Q||!he||!e)return;const t=getComputedStyle(e).gridTemplateColumns.split(" ").filter(Boolean).length||1,r=parseFloat(getComputedStyle(e).columnGap)||0,n=(e.clientWidth-r*(t-1))/t,a=Math.max(...Array.from(e.querySelectorAll("[data-preset-measure]"),e=>e.offsetWidth))+24+2<=n+.5;a!==ye&&ve(a)});const we=g(null);m(()=>{const e=ce.current;if(!Q||!ge||!e)return;const t=getComputedStyle(e),r=ge.maxWidth-(e.offsetWidth-e.clientWidth)-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight);if(he)null!==we.current&&we.current<=r&&fe(!1);else{const e=be.current?.offsetWidth??0;if(0===e)return;we.current=e,e>r+.5&&fe(!0)}});const[Ne,ke]=f(!1);m(()=>{const e=!!H&&(de.current?.labels?.length??0)>0;e!==Ne&&ke(e)});const Ce=!!B||!!E||Ne,De=/* @__PURE__ */new Date,[We,$e]=f(()=>D?C(j(D)):M(De,G,I)),Me=k.filter(e=>((e,t,r)=>(!t||e.from>=t)&&(!r||e.to<=r))($(e,De),G,I)),je=e=>e?z(e):"";x(()=>{if(!Q)return;const e=e=>{const t=e.target;se.current?.contains(t)||ce.current?.contains(t)||_(!1)};document.addEventListener("mousedown",e);const t=s(()=>_(!1));return()=>{document.removeEventListener("mousedown",e),t()}},[Q]),x(()=>{U&&_(!1)},[U]);const Se=()=>{O("",""),_(!1)},Fe=D&&W?`${je(D)} — ${je(W)}`:D?A.fromOnly(je(D)):W?A.toOnly(je(W)):"",Oe=r(P),Te=e=>{const r=t(e);return r?Oe.longDate(r.getFullYear(),r.getMonth(),r.getDate()):e},Re=D&&W?A.range(Te(D),Te(W)):D?A.fromOnly(Te(D)):W?A.toOnly(Te(W)):K,Je=e=>he?"h-8 w-full min-w-0 truncate rounded-(--radius-control) border px-3 text-sm transition-colors "+(ae===e?"border-blue-300 bg-blue-50 text-blue-700 font-medium":"border-gray-200 text-gray-700 hover:bg-gray-50"):"h-8 text-left px-3 text-sm rounded-(--radius-control) transition-colors "+(ae===e?"bg-blue-50 text-blue-700 font-medium":"text-gray-700 hover:bg-gray-50"),Ye=/* @__PURE__ */v(w,{children:[Me.map(e=>/* @__PURE__ */N("button",{type:"button",onClick:()=>(e=>{if("Custom"===e)return;const t=$(e,De);te(t.from),ne(t.to),oe(e),$e(t.from.slice(0,7))})(e),className:Je(e),"aria-label":he?A[e]:void 0,children:he?ye?A[e]:A[`${e}Short`]:A[e]},e)),
|
|
2
|
+
/* @__PURE__ */N("button",{type:"button",onClick:()=>oe("Custom"),className:Je("Custom"),children:A.custom})]}),He=(e,t)=>X?/* @__PURE__ */N("button",{type:"button","data-range-end":e,"aria-pressed":le===e,onClick:()=>ie(e),className:"flex items-center gap-2 whitespace-nowrap rounded rosh-focus-ring",children:t}):/* @__PURE__ */N("div",{className:"flex items-center gap-2 whitespace-nowrap",children:t}),Ee=e=>X&&le===e?" ring-1 ring-blue-400":"",Be=
|
|
3
|
+
/* @__PURE__ */N(e,{mode:"range",min:G,max:I,value:ee||null,endValue:re||null,month:We,onMonthChange:$e,onSelect:e=>{oe("Custom"),X?"from"===le?(re&&e>re?(te(re),ne(e)):te(e),ie("to")):ee&&e<ee?(ne(ee),te(e)):ne(e):!ee||ee&&re?(te(e),ne("")):e<ee?(ne(ee),te(e)):ne(e)},weekStartsOn:L,"aria-label":A.dialog});/* @__PURE__ */
|
|
4
4
|
return v("div",{className:"relative"+(q?" w-full":""),ref:se,children:[
|
|
5
|
-
/* @__PURE__ */v("div",{className:`${q?"flex w-full":"inline-flex"} h-8 items-center gap-2 border rounded-lg px-3 text-sm focus-within:border-blue-500 has-focus-visible:ring-1 has-focus-visible:ring-[color:var(--rosh-focus-ring-deep)] ${W
|
|
6
|
-
/* @__PURE__ */v("button",{ref:de,type:"button",onClick:()=>{U||(te(
|
|
5
|
+
/* @__PURE__ */v("div",{className:`${q?"flex w-full":"inline-flex"} h-8 items-center gap-2 border rounded-lg px-3 text-sm focus-within:border-blue-500 has-focus-visible:ring-1 has-focus-visible:ring-[color:var(--rosh-focus-ring-deep)] ${D||W?`${n} ${a}`:o}${U?" cursor-not-allowed opacity-60":""}`,children:[
|
|
6
|
+
/* @__PURE__ */v("button",{ref:de,type:"button",onClick:()=>{U||(te(D),ne(W),oe(null),ie(D&&!W?"to":"from"),$e(D?C(j(D)):M(De,G,I)),_(!0))},"aria-haspopup":"dialog","aria-expanded":Q,id:H,disabled:U||void 0,"aria-label":B,"aria-labelledby":E,"aria-describedby":[Ce?ue:void 0,J?pe:void 0].filter(Boolean).join(" ")||void 0,"aria-controls":Q?me:void 0,className:"inline-flex items-center gap-2 rosh-focus-ring"+(q?" min-w-0 flex-1 justify-start":""),children:[
|
|
7
7
|
/* @__PURE__ */N(i,{name:"date",className:"w-4 h-4 shrink-0",strokeWidth:"2","aria-hidden":"true"}),
|
|
8
|
-
/* @__PURE__ */N("span",{className:"truncate",children:Fe||
|
|
9
|
-
/* @__PURE__ */N("input",{type:"hidden",name:
|
|
10
|
-
/* @__PURE__ */N("input",{type:"hidden",name:
|
|
8
|
+
/* @__PURE__ */N("span",{className:"truncate",children:Fe||K})]}),Z&&!U&&(D||W)&&/* @__PURE__ */N("button",{type:"button",onClick:Se,"aria-label":A.clearRange,className:"text-blue-400 hover:text-red-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded",children:"×"})]}),Ce&&/* @__PURE__ */N("span",{id:ue,className:"sr-only",children:Re}),J&&/* @__PURE__ */N("span",{id:pe,className:"sr-only",children:A.required}),Y&&/* @__PURE__ */v(w,{children:[
|
|
9
|
+
/* @__PURE__ */N("input",{type:"hidden",name:Y.from,value:D,disabled:U||void 0}),
|
|
10
|
+
/* @__PURE__ */N("input",{type:"hidden",name:Y.to,value:W,disabled:U||void 0})]}),Q&&y(
|
|
11
11
|
/* @__PURE__ */v("div",{ref:ce,id:me,role:"dialog","aria-label":A.dialog,"data-layout":he?"stacked":"side",className:"fixed rounded-(--radius-popup) p-4",style:{zIndex:d.popup,left:ge?.left,right:ge?.right,top:ge?.top,bottom:ge?.bottom,width:he&&ge?ge.maxWidth:"max-content",maxWidth:ge?.maxWidth,maxHeight:ge?.maxHeight,overflowY:"auto",visibility:ge?void 0:"hidden",...u()},children:[
|
|
12
|
-
/* @__PURE__ */v("div",{className:he?"mb-3 flex flex-wrap items-center gap-x-4 gap-y-2":"flex items-center gap-3 mb-3",children:[
|
|
12
|
+
/* @__PURE__ */v("div",{className:he?"mb-3 flex flex-wrap items-center gap-x-4 gap-y-2":"flex items-center gap-3 mb-3",children:[He("from",/* @__PURE__ */v(w,{children:[
|
|
13
13
|
/* @__PURE__ */N("span",{className:"text-xs font-medium text-gray-500",children:A.from}),
|
|
14
|
-
/* @__PURE__ */N("span",{className:`text-sm px-2 py-1 rounded border min-w-[90px] ${ee?"border-blue-300 bg-blue-50 text-blue-700":"border-gray-200 bg-gray-50 text-gray-400"}${Ee("from")}`,children:ee?je(ee):A.start})]})),!he&&/* @__PURE__ */N("span",{className:"text-gray-300",children:"—"}),
|
|
14
|
+
/* @__PURE__ */N("span",{className:`text-sm px-2 py-1 rounded border min-w-[90px] ${ee?"border-blue-300 bg-blue-50 text-blue-700":"border-gray-200 bg-gray-50 text-gray-400"}${Ee("from")}`,children:ee?je(ee):A.start})]})),!he&&/* @__PURE__ */N("span",{className:"text-gray-300",children:"—"}),He("to",/* @__PURE__ */v(w,{children:[
|
|
15
15
|
/* @__PURE__ */N("span",{className:"text-xs font-medium text-gray-500",children:A.to}),
|
|
16
|
-
/* @__PURE__ */N("span",{className:`text-sm px-2 py-1 rounded border min-w-[90px] ${re?"border-blue-300 bg-blue-50 text-blue-700":"border-gray-200 bg-gray-50 text-gray-400"}${Ee("to")}`,children:re?je(re):A.end})]}))]}),he?/* @__PURE__ */v(w,{children:[
|
|
17
|
-
/* @__PURE__ */v("div",{ref:xe,className:"relative grid grid-cols-2 gap-2 @min-[320px]:grid-cols-3",children:[
|
|
18
|
-
/* @__PURE__ */N("div",{className:"w-full",children:
|
|
16
|
+
/* @__PURE__ */N("span",{className:`text-sm px-2 py-1 rounded border min-w-[90px] ${re?"border-blue-300 bg-blue-50 text-blue-700":"border-gray-200 bg-gray-50 text-gray-400"}${Ee("to")}`,children:re?je(re):A.end})]}))]}),he?/* @__PURE__ */v(w,{children:[Me.length>0&&/* @__PURE__ */v("div",{className:"mb-3 @container",children:[!ye&&/* @__PURE__ */N("p",{"aria-hidden":"true",className:"mb-1 text-xs font-medium text-gray-500",children:A.lastHeading}),
|
|
17
|
+
/* @__PURE__ */v("div",{ref:xe,className:"relative grid grid-cols-2 gap-2 @min-[320px]:grid-cols-3",children:[Ye,Me.map(e=>/* @__PURE__ */N("span",{"data-preset-measure":"","aria-hidden":"true",className:"invisible absolute left-0 top-0 whitespace-nowrap text-sm",children:A[e]},e))]})]}),
|
|
18
|
+
/* @__PURE__ */N("div",{className:"w-full",children:Be})]}):
|
|
19
19
|
/* @__PURE__ */v("div",{ref:be,className:"flex w-max gap-4",children:[
|
|
20
|
-
/* @__PURE__ */N("div",{className:"w-64",children:
|
|
20
|
+
/* @__PURE__ */N("div",{className:"w-64",children:Be}),Me.length>0&&/* @__PURE__ */N("div",{className:"border-l border-gray-200 pl-4 flex flex-col gap-1 min-w-[130px]",children:Ye})]}),
|
|
21
21
|
/* @__PURE__ */v("div",{className:"flex flex-wrap justify-end gap-2 mt-4 pt-3 border-t border-gray-200",children:[Z&&/* @__PURE__ */N("button",{type:"button",onClick:Se,className:l({variant:"ghost"}),children:A.clear}),
|
|
22
22
|
/* @__PURE__ */N("button",{type:"button",onClick:()=>_(!1),className:l({variant:"secondary"}),children:A.cancel}),
|
|
23
|
-
/* @__PURE__ */N("button",{type:"button",onClick:()=>{O(ee,re),_(!1)},disabled:
|
|
23
|
+
/* @__PURE__ */N("button",{type:"button",onClick:()=>{O(ee,re),_(!1)},disabled:X?!ee&&!re:!ee||!re,className:l({variant:"primary"}),children:A.apply})]})]}),document.body)]})}export{O as DateRangePicker,$ as presetRange,W as toISODate};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{FormField as e}from"./chunk-MVQBVPWP.js";import{dropzoneClass as t,zoneFocusClass as a,CloseGlyph as r}from"./chunk-
|
|
2
|
-
return o(e,{label:g,htmlFor:
|
|
3
|
-
/* @__PURE__ */o("button",{ref:
|
|
1
|
+
import{FormField as e}from"./chunk-MVQBVPWP.js";import{dropzoneClass as t,zoneFocusClass as a,CloseGlyph as r}from"./chunk-CQXV3SJA.js";import{useFileIntake as n,humanSize as i,FileIntakeAlert as s}from"./chunk-VAACOJ2H.js";import{useShellStrings as l}from"./chunk-OVNRVFWS.js";import{forwardRef as c,useId as m}from"react";import{jsxs as o,jsx as d}from"react/jsx-runtime";var p=c(function({files:c,onChange:p,accept:u,acceptHint:h,multiple:x=!0,maxSizeBytes:b,maxFiles:f,disabled:y=!1,label:g,hint:N,error:j,required:k,className:v=""},C){const V=m(),O=l().files,$=n({accept:u,acceptHint:h,maxSizeBytes:b,maxFiles:f,multiple:x,disabled:y,currentCount:c.length,onAccept:e=>p(x?[...c,...e]:e.slice(0,1))}),z=j?`${V}-error`:N?`${V}-hint`:void 0;/* @__PURE__ */
|
|
2
|
+
return o(e,{label:g,htmlFor:V,hint:N,error:j,required:k,className:v,children:[
|
|
3
|
+
/* @__PURE__ */o("button",{ref:C,type:"button",id:V,disabled:y,onClick:$.open,"aria-invalid":!!j||void 0,"aria-required":k||void 0,"aria-describedby":z,...$.zoneProps,className:t($.dragOver,y,a(y),"px-4 py-6"),children:[
|
|
4
4
|
/* @__PURE__ */o("span",{children:[
|
|
5
5
|
/* @__PURE__ */d("span",{className:"text-sm font-medium text-blue-600",children:x?O.chooseMany:O.chooseOne}),
|
|
6
6
|
/* @__PURE__ */d("span",{className:"text-sm text-gray-500",children:` ${x?O.dragMany:O.dragOne}`})]}),h&&/* @__PURE__ */d("span",{className:"text-xs text-gray-400",children:h})]}),
|
|
7
|
-
/* @__PURE__ */d("input",{
|
|
7
|
+
/* @__PURE__ */d("input",{...$.inputProps}),c.length>0&&/* @__PURE__ */d("ul",{className:"mt-2 flex flex-col gap-1",children:c.map((e,t)=>/* @__PURE__ */o("li",{className:"flex items-center justify-between gap-3 rounded-md bg-gray-50 px-3 py-2",children:[
|
|
8
8
|
/* @__PURE__ */d("span",{className:"min-w-0 flex-1 truncate text-sm text-gray-800",title:e.name,children:e.name}),
|
|
9
9
|
/* @__PURE__ */d("span",{className:"shrink-0 text-xs tabular-nums text-gray-500",children:i(e.size,O)}),
|
|
10
|
-
/* @__PURE__ */d("button",{type:"button",disabled:y,onClick:()=>{
|
|
11
|
-
/* @__PURE__ */d(s,{rejections
|
|
10
|
+
/* @__PURE__ */d("button",{type:"button",disabled:y,onClick:()=>{$.clearRejections(),p(c.filter((e,a)=>a!==t))},"aria-label":O.remove(e.name),className:"shrink-0 text-gray-400 hover:text-gray-600",children:/* @__PURE__ */d(r,{})})]},`${e.name}-${t}`))}),
|
|
11
|
+
/* @__PURE__ */d(s,{rejections:$.rejections})]})});export{p as FilePicker_default};
|
|
@@ -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.25ZM6.75 1.5L6.75 22.5A1.5 1.5 0 0 1 9.75 22.5L9.75 1.5A1.5 1.5 0 0 1 6.75 1.5ZM14.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 CropLeftRightSolidIcon};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-VJPJNCB4.js";import{useShellStrings as r}from"./chunk-OVNRVFWS.js";import{jsxs as t,jsx as n,Fragment as i}from"react/jsx-runtime";var a={info:{box:"bg-blue-50 border-blue-200",icon:"text-blue-600"},success:{box:"bg-green-50 border-green-200",icon:"text-green-600"},warning:{box:"bg-amber-50 border-amber-200",icon:"text-amber-600"},danger:{box:"bg-red-50 border-red-200",icon:"text-red-600"},neutral:{box:"bg-[var(--status-neutral-soft)] border-[color:var(--line)]",icon:"text-[color:var(--status-neutral-soft-ink)]"}},s={info:"bg-blue-700 border-blue-700 text-white",success:"bg-green-700 border-green-700 text-white",warning:"bg-amber-700 border-amber-700 text-white",danger:"bg-red-700 border-red-700 text-white",neutral:"bg-[var(--status-neutral-solid)] border-[color:var(--status-neutral-solid)] text-[color:var(--status-on-solid)]"};function o({tone:r}){const t={className:"h-5 w-5","aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
|
|
2
2
|
return n(e,{name:"check-circle",look:"mini",...t});case"warning":/* @__PURE__ */
|
|
3
3
|
return n(e,{name:"warning",look:"mini",...t});case"danger":/* @__PURE__ */
|
|
4
4
|
return n(e,{name:"close-circle",look:"mini",...t});default:/* @__PURE__ */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Breadcrumbs as e}from"./chunk-
|
|
1
|
+
import{Breadcrumbs as e}from"./chunk-XTPDXB4X.js";import{jsxs as t,jsx as s}from"react/jsx-runtime";function i({title:i,description:r,subtitle:c,actions:a,children:n,icon:l,breadcrumbs:m}){const d=r??c,h=a??n;/* @__PURE__ */
|
|
2
2
|
return t("div",{className:"mb-6",children:[m&&m.length>0&&/* @__PURE__ */s(e,{items:m,className:"mb-3"}),
|
|
3
3
|
/* @__PURE__ */t("div",{className:"flex items-start justify-between gap-4",children:[
|
|
4
4
|
/* @__PURE__ */t("div",{children:[
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{jsxs as r,jsx as e}from"react/jsx-runtime";function t({size:t=18,...L}){/* @__PURE__ */
|
|
2
|
+
return r("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...L,children:[
|
|
3
|
+
/* @__PURE__ */e("path",{d:"M3.75 3.75L4.75 3.75M8.75 3.75L9.75 3.75M14.25 3.75L15.25 3.75M19.25 3.75L20.25 3.75L20.25 4.75M20.25 8.75L20.25 9.75M20.25 14.25L20.25 15.25M20.25 19.25L20.25 20.25M3.75 20.25L4.75 20.25M8.75 20.25L9.75 20.25M14.25 20.25L15.25 20.25M19.25 20.25L20.25 20.25M3.75 3.75L3.75 4.75M3.75 8.75L3.75 9.75M3.75 14.25L3.75 15.25M3.75 19.25L3.75 20.25"}),
|
|
4
|
+
/* @__PURE__ */e("path",{strokeWidth:"3",d:"M1.5 8.25L22.5 8.25"})]})}export{t as CropTopIcon};
|
|
@@ -47,7 +47,25 @@ return t("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"currentColor","aria-h
|
|
|
47
47
|
return t("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...r,children:/* @__PURE__ */t("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.25 6.75 22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3-4.5 16.5"})})},collapse:function({size:e=18,...r}){/* @__PURE__ */
|
|
48
48
|
return t("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...r,children:/* @__PURE__ */t("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25"})})},copy:function({size:e=18,...r}){/* @__PURE__ */
|
|
49
49
|
return t("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...r,children:/* @__PURE__ */t("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 7.5V6.108c0-1.135.845-2.098 1.976-2.192.373-.03.748-.057 1.123-.08M15.75 18H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 0 0-1.123-.08M15.75 18.75v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5A3.375 3.375 0 0 0 6.375 7.5H5.25m11.9-3.664A2.251 2.251 0 0 0 15 2.25h-1.5a2.251 2.251 0 0 0-2.15 1.586m5.8 0c.065.21.1.433.1.664v.75h-6V4.5c0-.231.035-.454.1-.664M6.75 7.5H4.875c-.621 0-1.125.504-1.125 1.125v12c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V16.5a9 9 0 0 0-9-9Z"})})},corner:function({size:e=18,...r}){/* @__PURE__ */
|
|
50
|
-
return t("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r,children:/* @__PURE__ */t("path",{d:"M5.25 18.75V9a3.75 3.75 0 0 1 3.75-3.75h9.75"})})},
|
|
50
|
+
return t("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r,children:/* @__PURE__ */t("path",{d:"M5.25 18.75V9a3.75 3.75 0 0 1 3.75-3.75h9.75"})})},"crop-bottom":function({size:e=18,...r}){/* @__PURE__ */
|
|
51
|
+
return o("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r,children:[
|
|
52
|
+
/* @__PURE__ */t("path",{d:"M3.75 3.75L4.75 3.75M8.75 3.75L9.75 3.75M14.25 3.75L15.25 3.75M19.25 3.75L20.25 3.75L20.25 4.75M20.25 8.75L20.25 9.75M20.25 14.25L20.25 15.25M20.25 19.25L20.25 20.25M3.75 20.25L4.75 20.25M8.75 20.25L9.75 20.25M14.25 20.25L15.25 20.25M19.25 20.25L20.25 20.25M3.75 3.75L3.75 4.75M3.75 8.75L3.75 9.75M3.75 14.25L3.75 15.25M3.75 19.25L3.75 20.25"}),
|
|
53
|
+
/* @__PURE__ */t("path",{strokeWidth:"3",d:"M1.5 15.75L22.5 15.75"})]})},"crop-left":function({size:e=18,...r}){/* @__PURE__ */
|
|
54
|
+
return o("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r,children:[
|
|
55
|
+
/* @__PURE__ */t("path",{d:"M3.75 3.75L4.75 3.75M8.75 3.75L9.75 3.75M14.25 3.75L15.25 3.75M19.25 3.75L20.25 3.75L20.25 4.75M20.25 8.75L20.25 9.75M20.25 14.25L20.25 15.25M20.25 19.25L20.25 20.25M3.75 20.25L4.75 20.25M8.75 20.25L9.75 20.25M14.25 20.25L15.25 20.25M19.25 20.25L20.25 20.25M3.75 3.75L3.75 4.75M3.75 8.75L3.75 9.75M3.75 14.25L3.75 15.25M3.75 19.25L3.75 20.25"}),
|
|
56
|
+
/* @__PURE__ */t("path",{strokeWidth:"3",d:"M8.25 1.5L8.25 22.5"})]})},"crop-left-right":function({size:e=18,...r}){/* @__PURE__ */
|
|
57
|
+
return o("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r,children:[
|
|
58
|
+
/* @__PURE__ */t("path",{d:"M3.75 3.75L4.75 3.75M8.75 3.75L9.75 3.75M14.25 3.75L15.25 3.75M19.25 3.75L20.25 3.75L20.25 4.75M20.25 8.75L20.25 9.75M20.25 14.25L20.25 15.25M20.25 19.25L20.25 20.25M3.75 20.25L4.75 20.25M8.75 20.25L9.75 20.25M14.25 20.25L15.25 20.25M19.25 20.25L20.25 20.25M3.75 3.75L3.75 4.75M3.75 8.75L3.75 9.75M3.75 14.25L3.75 15.25M3.75 19.25L3.75 20.25"}),
|
|
59
|
+
/* @__PURE__ */t("path",{strokeWidth:"3",d:"M8.25 1.5L8.25 22.5M15.75 1.5L15.75 22.5"})]})},"crop-right":function({size:e=18,...r}){/* @__PURE__ */
|
|
60
|
+
return o("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r,children:[
|
|
61
|
+
/* @__PURE__ */t("path",{d:"M3.75 3.75L4.75 3.75M8.75 3.75L9.75 3.75M14.25 3.75L15.25 3.75M19.25 3.75L20.25 3.75L20.25 4.75M20.25 8.75L20.25 9.75M20.25 14.25L20.25 15.25M20.25 19.25L20.25 20.25M3.75 20.25L4.75 20.25M8.75 20.25L9.75 20.25M14.25 20.25L15.25 20.25M19.25 20.25L20.25 20.25M3.75 3.75L3.75 4.75M3.75 8.75L3.75 9.75M3.75 14.25L3.75 15.25M3.75 19.25L3.75 20.25"}),
|
|
62
|
+
/* @__PURE__ */t("path",{strokeWidth:"3",d:"M15.75 1.5L15.75 22.5"})]})},"crop-top":function({size:e=18,...r}){/* @__PURE__ */
|
|
63
|
+
return o("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r,children:[
|
|
64
|
+
/* @__PURE__ */t("path",{d:"M3.75 3.75L4.75 3.75M8.75 3.75L9.75 3.75M14.25 3.75L15.25 3.75M19.25 3.75L20.25 3.75L20.25 4.75M20.25 8.75L20.25 9.75M20.25 14.25L20.25 15.25M20.25 19.25L20.25 20.25M3.75 20.25L4.75 20.25M8.75 20.25L9.75 20.25M14.25 20.25L15.25 20.25M19.25 20.25L20.25 20.25M3.75 3.75L3.75 4.75M3.75 8.75L3.75 9.75M3.75 14.25L3.75 15.25M3.75 19.25L3.75 20.25"}),
|
|
65
|
+
/* @__PURE__ */t("path",{strokeWidth:"3",d:"M1.5 8.25L22.5 8.25"})]})},"crop-y":function({size:e=18,...r}){/* @__PURE__ */
|
|
66
|
+
return o("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r,children:[
|
|
67
|
+
/* @__PURE__ */t("path",{d:"M3.75 3.75L4.75 3.75M8.75 3.75L9.75 3.75M14.25 3.75L15.25 3.75M19.25 3.75L20.25 3.75L20.25 4.75M20.25 8.75L20.25 9.75M20.25 14.25L20.25 15.25M20.25 19.25L20.25 20.25M3.75 20.25L4.75 20.25M8.75 20.25L9.75 20.25M14.25 20.25L15.25 20.25M19.25 20.25L20.25 20.25M3.75 3.75L3.75 4.75M3.75 8.75L3.75 9.75M3.75 14.25L3.75 15.25M3.75 19.25L3.75 20.25"}),
|
|
68
|
+
/* @__PURE__ */t("path",{strokeWidth:"3",d:"M1.5 8.25L22.5 8.25M1.5 15.75L22.5 15.75"})]})},date:function({size:e=18,...r}){/* @__PURE__ */
|
|
51
69
|
return t("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...r,children:/* @__PURE__ */t("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5"})})},desktop:function({size:e=18,...r}){/* @__PURE__ */
|
|
52
70
|
return t("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...r,children:/* @__PURE__ */t("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 17.25v1.007a3 3 0 0 1-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0 1 15 18.257V17.25m6-12V15a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 15V5.25m18 0A2.25 2.25 0 0 0 18.75 3H5.25A2.25 2.25 0 0 0 3 5.25m18 0V12a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 12V5.25"})})},download:function({size:e=18,...r}){/* @__PURE__ */
|
|
53
71
|
return t("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...r,children:/* @__PURE__ */t("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3"})})},duplicate:function({size:e=18,...r}){/* @__PURE__ */
|
|
@@ -88,7 +106,9 @@ return t("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-h
|
|
|
88
106
|
return t("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...r,children:/* @__PURE__ */t("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 12.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 18.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5Z"})})},"more-vertical:solid":function({size:e=18,...r}){/* @__PURE__ */
|
|
89
107
|
return t("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",...r,children:/* @__PURE__ */t("path",{fillRule:"evenodd",d:"M10.5 6a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0Zm0 6a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0Zm0 6a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0Z",clipRule:"evenodd"})})},"no-symbol":function({size:e=18,...r}){/* @__PURE__ */
|
|
90
108
|
return t("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...r,children:/* @__PURE__ */t("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 0 0 5.636 5.636m12.728 12.728A9 9 0 0 1 5.636 5.636m12.728 12.728L5.636 5.636"})})},note:function({size:e=18,...r}){/* @__PURE__ */
|
|
91
|
-
return t("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r,children:/* @__PURE__ */t("path",{d:"M20.25 13.5V6A2.25 2.25 0 0 0 18 3.75H6A2.25 2.25 0 0 0 3.75 6v12A2.25 2.25 0 0 0 6 20.25h7.5l6.75-6.75ZM13.5 20.25V15.75a2.25 2.25 0 0 1 2.25-2.25h4.5"})})},"
|
|
109
|
+
return t("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r,children:/* @__PURE__ */t("path",{d:"M20.25 13.5V6A2.25 2.25 0 0 0 18 3.75H6A2.25 2.25 0 0 0 3.75 6v12A2.25 2.25 0 0 0 6 20.25h7.5l6.75-6.75ZM13.5 20.25V15.75a2.25 2.25 0 0 1 2.25-2.25h4.5"})})},"nudge-x":function({size:e=18,...r}){/* @__PURE__ */
|
|
110
|
+
return t("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r,children:/* @__PURE__ */t("path",{d:"M11.25 12a0.75 0.75 0 1 0 1.5 0a0.75 0.75 0 1 0 -1.5 0ZM9 12L3.75 12M6 9.75L3.75 12L6 14.25M15 12L20.25 12M18 9.75L20.25 12L18 14.25"})})},"nudge-y":function({size:e=18,...r}){/* @__PURE__ */
|
|
111
|
+
return t("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r,children:/* @__PURE__ */t("path",{d:"M11.25 12a0.75 0.75 0 1 0 1.5 0a0.75 0.75 0 1 0 -1.5 0ZM12 9L12 3.75M9.75 6L12 3.75L14.25 6M12 15L12 20.25M9.75 18L12 20.25L14.25 18"})})},"numbered-list":function({size:e=18,...r}){/* @__PURE__ */
|
|
92
112
|
return t("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...r,children:/* @__PURE__ */t("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.242 5.992h12m-12 6.003H20.24m-12 5.999h12M4.117 7.495v-3.75H2.99m1.125 3.75H2.99m1.125 0H5.24m-1.92 2.577a1.125 1.125 0 1 1 1.591 1.59l-1.83 1.83h2.16M2.99 15.745h1.125a1.125 1.125 0 0 1 0 2.25H3.74m0-.002h.375a1.125 1.125 0 0 1 0 2.25H2.99"})})},"padding-all":function({size:e=18,...r}){/* @__PURE__ */
|
|
93
113
|
return o("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r,children:[
|
|
94
114
|
/* @__PURE__ */t("path",{d:"M9.75 8.25h4.5a1.5 1.5 0 0 1 1.5 1.5v4.5a1.5 1.5 0 0 1 -1.5 1.5h-4.5a1.5 1.5 0 0 1 -1.5 -1.5v-4.5a1.5 1.5 0 0 1 1.5 -1.5Z"}),
|
|
@@ -139,5 +159,5 @@ return t("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"current
|
|
|
139
159
|
return t("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",...r,children:/* @__PURE__ */t("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"})})},widgets:function({size:e=18,...r}){/* @__PURE__ */
|
|
140
160
|
return t("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...r,children:/* @__PURE__ */t("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.25 6.087c0-.355.186-.676.401-.959.221-.29.349-.634.349-1.003 0-1.036-1.007-1.875-2.25-1.875s-2.25.84-2.25 1.875c0 .369.128.713.349 1.003.215.283.401.604.401.959v0a.64.64 0 0 1-.657.643 48.39 48.39 0 0 1-4.163-.3c.186 1.613.293 3.25.315 4.907a.656.656 0 0 1-.658.663v0c-.355 0-.676-.186-.959-.401a1.647 1.647 0 0 0-1.003-.349c-1.036 0-1.875 1.007-1.875 2.25s.84 2.25 1.875 2.25c.369 0 .713-.128 1.003-.349.283-.215.604-.401.959-.401v0c.31 0 .555.26.532.57a48.039 48.039 0 0 1-.642 5.056c1.518.19 3.058.309 4.616.354a.64.64 0 0 0 .657-.643v0c0-.355-.186-.676-.401-.959a1.647 1.647 0 0 1-.349-1.003c0-1.035 1.008-1.875 2.25-1.875 1.243 0 2.25.84 2.25 1.875 0 .369-.128.713-.349 1.003-.215.283-.4.604-.4.959v0c0 .333.277.599.61.58a48.1 48.1 0 0 0 5.427-.63 48.05 48.05 0 0 0 .582-4.717.532.532 0 0 0-.533-.57v0c-.355 0-.676.186-.959.401-.29.221-.634.349-1.003.349-1.035 0-1.875-1.007-1.875-2.25s.84-2.25 1.875-2.25c.37 0 .713.128 1.003.349.283.215.604.401.96.401v0a.656.656 0 0 0 .658-.663 48.422 48.422 0 0 0-.37-5.36c-1.886.342-3.81.574-5.766.689a.578.578 0 0 1-.61-.58v0Z"})})},window:function({size:e=18,...r}){/* @__PURE__ */
|
|
141
161
|
return t("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...r,children:/* @__PURE__ */t("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 8.25V18a2.25 2.25 0 0 0 2.25 2.25h13.5A2.25 2.25 0 0 0 21 18V8.25m-18 0V6a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 6v2.25m-18 0h18M5.25 6h.008v.008H5.25V6ZM7.5 6h.008v.008H7.5V6Zm2.25 0h.008v.008H9.75V6Z"})})},"zoom-in":function({size:e=18,...r}){/* @__PURE__ */
|
|
142
|
-
return t("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...r,children:/* @__PURE__ */t("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607ZM10.5 7.5v6m3-3h-6"})})}};function h(e,r){return(r?d[`${e}:${r}`]:void 0)??d[e]}var a={muted:"text-gray-500",accent:"text-blue-600",danger:"text-red-600",success:"text-green-600",warning:"text-amber-600"},
|
|
143
|
-
return t(f,{width:
|
|
162
|
+
return t("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...r,children:/* @__PURE__ */t("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607ZM10.5 7.5v6m3-3h-6"})})}};function h(e,r){return(r?d[`${e}:${r}`]:void 0)??d[e]}var a={muted:"text-gray-500",accent:"text-blue-600",danger:"text-red-600",success:"text-green-600",warning:"text-amber-600"},s=/* @__PURE__ */new Set;function u({name:o,glyph:d,size:u,tone:l,look:c,title:L,fallback:k,className:M,...v}){n(e,r,r);const p=o??d,f=i(p,c)??k??h(p,c);if(!f)return s.has(p)||(s.add(p),console.warn(`efficient-shell/icons: no registered icon set draws "${p}". Register one at startup, for example registerIconSet(efficient) from 'efficient-shell/icons/efficient'.`)),null;const g=void 0!==L||void 0!==v["aria-label"]||void 0!==v["aria-labelledby"],w=[l?a[l]:"",M??""].filter(Boolean).join(" ");/* @__PURE__ */
|
|
163
|
+
return t(f,{width:u??"1em",height:u??"1em","data-icon":p,"aria-hidden":!g||void 0,role:g?"img":void 0,"aria-label":L,...v,className:w||void 0})}export{u as Icon,h as kitDrawing};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{IconButton_default as e}from"./chunk-JHDWTYZ4.js";import{Icon as t}from"./chunk-
|
|
1
|
+
import{IconButton_default as e}from"./chunk-JHDWTYZ4.js";import{Icon as t}from"./chunk-VJPJNCB4.js";import{Tooltip as r}from"./chunk-Z3WKHMVB.js";import{useShellStrings as o}from"./chunk-OVNRVFWS.js";import{useId as i}from"react";import{jsxs as n,jsx as a}from"react/jsx-runtime";var s=['input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", ");function d({label:d,onReset:l,view:c="desktop",detail:b,disabled:m}){const f=o().settingView,u=i(),p="desktop"===c,h=p?f.resetName(d):f.inheritName(d),k=b?f.backTo(b):p?f.backToDefault:f.backToAuto;
|
|
2
2
|
/* @__PURE__ */
|
|
3
3
|
return n(r,{content:f.tip(h,k),describe:!1,children:[
|
|
4
4
|
/* @__PURE__ */a(e,{size:"sm","aria-label":h,"aria-describedby":u,disabled:m,className:"relative before:absolute before:-top-2.5 before:-bottom-2.5 before:-left-1 before:-right-4",onClick:e=>{l(),function(e){const t=e.currentTarget,r=t.closest("[data-setting-reset]")??t;let o=r.parentElement;for(let e=0;o&&e<4;e+=1,o=o.parentElement){const e=[...o.querySelectorAll(s)].find(e=>!r.contains(e)&&!e.closest('[aria-hidden="true"]'));if(e)return void e.focus()}}(e)},children:/* @__PURE__ */a(t,{name:"revert",size:16,"aria-hidden":"true"})}),
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import{toast_default as e}from"./chunk-2LKH6JM5.js";import{Icon as t}from"./chunk-
|
|
2
|
-
/* @__PURE__ */u("div",{className:"flex shrink-0 flex-wrap items-center gap-1 border-b border-gray-200 bg-gray-50 px-3 py-2 text-xs",children:e})}"undefined"==typeof window||c.GlobalWorkerOptions.workerSrc||(c.GlobalWorkerOptions.workerSrc=`https://unpkg.com/pdfjs-dist@${c.version}/build/pdf.worker.min.mjs`);var g={"jbig2.wasm":new URL("pdfjs-dist/wasm/jbig2.wasm",import.meta.url).href,"openjpeg.wasm":new URL("pdfjs-dist/wasm/openjpeg.wasm",import.meta.url).href},w=class{async fetch({kind:e,filename:t}){if("wasmUrl"!==e)throw new Error(`Ensure that the \`${e}\` API parameter is provided.`);const n=g[t];if(!n)throw new Error(`No bundled pdf.js wasm module for "${t}".`);const r=await fetch(n);if(!r.ok)throw new Error(`Unable to load wasm data at: ${n}`);const a=new Uint8Array(await r.arrayBuffer());if(!function(e){return e.length>=4&&0===e[0]&&97===e[1]&&115===e[2]&&109===e[3]}(a))throw h(n,t,a);return a}};function y(e){const t=e||("undefined"!=typeof window?window.__REACT_OS_SHELL_PDF_WASM__:void 0);return"string"==typeof t&&t?{wasmUrl:t.endsWith("/")?t:`${t}/`}:{BinaryDataFactory:w}}var v=[50,75,100,125,150,200,300,400];function b(e,t,n){const r=(t.width-40)/n.width,a="page"===e?Math.min(r,(t.height-40)/n.height):r;return Math.min(Math.max(a,.3),4)}function x({url:a,filename:o,fit:d="width",onDownload:h,onEmail:p,workerSrc:g,wasmUrl:w}){const x=r().pdf,k=i(null),C=i(null),N=i(null),[M,j]=s(null),[E,z]=s(1),[
|
|
1
|
+
import{toast_default as e}from"./chunk-2LKH6JM5.js";import{Icon as t}from"./chunk-VJPJNCB4.js";import{LoadingSpinner as n}from"./chunk-Q5MD3VY6.js";import{useShellStrings as r}from"./chunk-OVNRVFWS.js";import{createContext as a,useContext as o,useRef as i,useState as s,useEffect as l}from"react";import*as c from"pdfjs-dist";import{createPortal as d}from"react-dom";import{jsx as u,jsxs as m}from"react/jsx-runtime";function h(e,t,n){return new Error(`The response for ${e} is not a WebAssembly module (got ${function(e){if(0===e.length)return"an empty response";const t=Array.from(e.subarray(0,24)).map(e=>e>=32&&e<127?String.fromCharCode(e):".").join("");return`${e.length} bytes starting "${t}"`}(n)}). The bundler did not emit "${t}" as an asset, and the host answered with a fallback page instead of a 404. Serve pdfjs-dist/wasm/ yourself and point window.__REACT_OS_SHELL_PDF_WASM__ at it.`)}var p=a(null);function f({children:e}){const t=o(p);return t?d(e,t):
|
|
2
|
+
/* @__PURE__ */u("div",{className:"flex shrink-0 flex-wrap items-center gap-1 border-b border-gray-200 bg-gray-50 px-3 py-2 text-xs",children:e})}"undefined"==typeof window||c.GlobalWorkerOptions.workerSrc||(c.GlobalWorkerOptions.workerSrc=`https://unpkg.com/pdfjs-dist@${c.version}/build/pdf.worker.min.mjs`);var g={"jbig2.wasm":new URL("pdfjs-dist/wasm/jbig2.wasm",import.meta.url).href,"openjpeg.wasm":new URL("pdfjs-dist/wasm/openjpeg.wasm",import.meta.url).href},w=class{async fetch({kind:e,filename:t}){if("wasmUrl"!==e)throw new Error(`Ensure that the \`${e}\` API parameter is provided.`);const n=g[t];if(!n)throw new Error(`No bundled pdf.js wasm module for "${t}".`);const r=await fetch(n);if(!r.ok)throw new Error(`Unable to load wasm data at: ${n}`);const a=new Uint8Array(await r.arrayBuffer());if(!function(e){return e.length>=4&&0===e[0]&&97===e[1]&&115===e[2]&&109===e[3]}(a))throw h(n,t,a);return a}};function y(e){const t=e||("undefined"!=typeof window?window.__REACT_OS_SHELL_PDF_WASM__:void 0);return"string"==typeof t&&t?{wasmUrl:t.endsWith("/")?t:`${t}/`}:{BinaryDataFactory:w}}var v=[50,75,100,125,150,200,300,400];function b(e,t,n){const r=(t.width-40)/n.width,a="page"===e?Math.min(r,(t.height-40)/n.height):r;return Math.min(Math.max(a,.3),4)}function x({url:a,filename:o,fit:d="width",onDownload:h,onEmail:p,workerSrc:g,wasmUrl:w}){const x=r().pdf,k=i(null),C=i(null),N=i(null),[M,j]=s(null),[E,z]=s(1),[P,_]=s(0),[D,W]=s(1),[L,S]=s(!0),[$,O]=s(!0),T=i(x.loadFailed);T.current=x.loadFailed,l(()=>{let t=!1;return O(!0),z(1),g&&(c.GlobalWorkerOptions.workerSrc=g),c.getDocument({url:a,...y(w)}).promise.then(e=>{t||(j(e),_(e.numPages),O(!1))}).catch(()=>{t||(e.error(T.current),O(!1))}),()=>{t=!0}},[a,g,w]),l(()=>{if(!M||!L||!N.current)return;const e=()=>{const e=N.current;e&&M.getPage(E).then(t=>{if(!N.current)return;const n=t.getViewport({scale:1}),r=b(d,{width:e.clientWidth,height:e.clientHeight},{width:n.width,height:n.height});W(e=>Math.abs(e-r)<.005?e:r)})};e();const t=new ResizeObserver(e);return t.observe(N.current),()=>t.disconnect()},[M,E,L,d]),l(()=>{if(!M||!k.current)return;let e=!1,t=null,n=null;return M.getPage(E).then(r=>{if(e||!k.current)return;const a=r.getViewport({scale:D}),o=k.current;o.width=a.width,o.height=a.height,o.style.width=`${a.width}px`,o.style.height=`${a.height}px`;const i=o.getContext("2d");t=r.render({canvas:o,canvasContext:i,viewport:a}),t.promise.catch(()=>{});const s=C.current;s&&(s.replaceChildren(),s.style.setProperty("--total-scale-factor",String(a.scale)),n=new c.TextLayer({textContentSource:r.streamTextContent(),container:s,viewport:a}),n.render().then(()=>{if(e)return;const t=document.createElement("div");t.className="endOfContent",s.append(t)}).catch(()=>{}))}),()=>{e=!0,t?.cancel(),n?.cancel()}},[M,E,D]),l(()=>{const e=()=>C.current?.classList.remove("selecting");return window.addEventListener("pointerup",e),()=>window.removeEventListener("pointerup",e)},[]);const A="page"===d?x.fitPage:x.fitWidth,H="px-2 py-1 rounded hover:bg-gray-200 transition-colors text-gray-600 flex items-center gap-1";/* @__PURE__ */
|
|
3
3
|
return m("div",{className:"flex flex-col h-full",children:[
|
|
4
4
|
/* @__PURE__ */m(f,{children:[
|
|
5
5
|
/* @__PURE__ */u("button",{type:"button","aria-label":x.previousPage,onClick:()=>z(e=>Math.max(1,e-1)),disabled:E<=1,className:"px-1 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-600",children:/* @__PURE__ */u(t,{name:"chevron-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
|
|
6
|
-
/* @__PURE__ */u("span",{className:"text-gray-600 font-medium tabular-nums whitespace-nowrap",children:x.pageOf(E,
|
|
7
|
-
/* @__PURE__ */u("button",{type:"button","aria-label":x.nextPage,onClick:()=>z(e=>Math.min(
|
|
6
|
+
/* @__PURE__ */u("span",{className:"text-gray-600 font-medium tabular-nums whitespace-nowrap",children:x.pageOf(E,P)}),
|
|
7
|
+
/* @__PURE__ */u("button",{type:"button","aria-label":x.nextPage,onClick:()=>z(e=>Math.min(P,e+1)),disabled:E>=P,className:"px-1 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-600",children:/* @__PURE__ */u(t,{name:"chevron-right",className:"h-3.5 w-3.5",strokeWidth:2})}),
|
|
8
8
|
/* @__PURE__ */u("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
|
|
9
|
-
/* @__PURE__ */u("button",{type:"button","aria-label":x.zoomOut,title:x.zoomOut,onClick:()=>{S(!1),
|
|
10
|
-
/* @__PURE__ */m("select",{value:
|
|
11
|
-
/* @__PURE__ */u("option",{value:"fit",children:A}),!
|
|
12
|
-
/* @__PURE__ */u("button",{type:"button","aria-label":x.zoomIn,title:x.zoomIn,onClick:()=>{S(!1),
|
|
13
|
-
/* @__PURE__ */u("button",{type:"button",onClick:()=>S(!0),"aria-pressed":
|
|
9
|
+
/* @__PURE__ */u("button",{type:"button","aria-label":x.zoomOut,title:x.zoomOut,onClick:()=>{S(!1),W(e=>Math.max(.3,Math.round(100*(e-.25))/100))},className:H,children:/* @__PURE__ */u("span",{"aria-hidden":"true",children:"−"})}),
|
|
10
|
+
/* @__PURE__ */m("select",{value:L?"fit":v.includes(Math.round(100*D))?Math.round(100*D):"custom",onChange:e=>{const t=e.target.value;"fit"!==t?"custom"!==t&&(S(!1),W(Number(t)/100)):S(!0)},className:"bg-transparent hover:bg-gray-200 rounded px-1 py-1 text-gray-600 tabular-nums cursor-pointer focus:outline-none focus:ring-1 focus:ring-blue-400","aria-label":x.zoom,title:x.zoom,children:[
|
|
11
|
+
/* @__PURE__ */u("option",{value:"fit",children:A}),!L&&!v.includes(Math.round(100*D))&&/* @__PURE__ */m("option",{value:"custom",children:[Math.round(100*D),"%"]}),v.map(e=>/* @__PURE__ */m("option",{value:e,children:[e,"%"]},e))]}),
|
|
12
|
+
/* @__PURE__ */u("button",{type:"button","aria-label":x.zoomIn,title:x.zoomIn,onClick:()=>{S(!1),W(e=>Math.min(4,Math.round(100*(e+.25))/100))},className:H,children:/* @__PURE__ */u("span",{"aria-hidden":"true",children:"+"})}),
|
|
13
|
+
/* @__PURE__ */u("button",{type:"button",onClick:()=>S(!0),"aria-pressed":L,className:H+(L?" bg-gray-200 text-gray-900":""),title:x.fitHint,children:x.fit}),
|
|
14
14
|
/* @__PURE__ */u("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
|
|
15
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>{if(!M)return;const t=window.open("","_blank");if(!t)return void e.error(x.allowPopups);const n=[];for(let e=1;e<=
|
|
15
|
+
/* @__PURE__ */m("button",{type:"button",onClick:()=>{if(!M)return;const t=window.open("","_blank");if(!t)return void e.error(x.allowPopups);const n=[];for(let e=1;e<=P;e++)n.push(M.getPage(e).then(e=>{const t=e.getViewport({scale:2}),n=document.createElement("canvas");return n.width=t.width,n.height=t.height,e.render({canvas:n,canvasContext:n.getContext("2d"),viewport:t}).promise.then(()=>n.toDataURL())}));Promise.all(n).then(e=>{var n;t.document.write(`<html><head><title>${n=o,n.replace(/[&<>"]/g,e=>({"&":"&","<":"<",">":">",'"':"""}[e]))}</title><style>@media print{body{margin:0}img{width:100%;page-break-after:always}}</style></head><body>`),t.document.write(e.map(e=>`<img src="${e}"/>`).join("")),t.document.write("</body></html>"),t.document.close(),setTimeout(()=>{t.print(),t.close()},300)})},className:H,children:[
|
|
16
16
|
/* @__PURE__ */u(t,{name:"print",className:"h-3.5 w-3.5",strokeWidth:1.5}),x.print]}),
|
|
17
17
|
/* @__PURE__ */m("button",{type:"button",onClick:h??(()=>{const e=document.createElement("a");e.href=a,e.download=o,e.click()}),className:H,children:[
|
|
18
18
|
/* @__PURE__ */u(t,{name:"download",className:"h-3.5 w-3.5",strokeWidth:1.5}),x.download]}),p&&/* @__PURE__ */m("button",{type:"button",onClick:p,className:H,children:[
|
|
19
19
|
/* @__PURE__ */u(t,{name:"email",className:"h-3.5 w-3.5",strokeWidth:1.5}),x.email]})]}),
|
|
20
|
-
/* @__PURE__ */u("div",{ref:N,className:"flex-1 overflow-auto bg-gray-100 outline-none",tabIndex:0,onWheel:e=>{if(!M)return;if(e.ctrlKey||e.metaKey)return;const t=N.current;if(!t)return;const n=t.scrollTop<=0,r=t.scrollTop+t.clientHeight>=t.scrollHeight-1;e.deltaY>0&&r&&E<
|
|
20
|
+
/* @__PURE__ */u("div",{ref:N,className:"flex-1 overflow-auto bg-gray-100 outline-none",tabIndex:0,onWheel:e=>{if(!M)return;if(e.ctrlKey||e.metaKey)return;const t=N.current;if(!t)return;const n=t.scrollTop<=0,r=t.scrollTop+t.clientHeight>=t.scrollHeight-1;e.deltaY>0&&r&&E<P?(e.preventDefault(),z(e=>Math.min(P,e+1)),requestAnimationFrame(()=>{N.current&&(N.current.scrollTop=0)})):e.deltaY<0&&n&&E>1&&(e.preventDefault(),z(e=>Math.max(1,e-1)),requestAnimationFrame(()=>{N.current&&(N.current.scrollTop=N.current.scrollHeight)}))},onKeyDown:e=>{if(!M)return;const t=(document.activeElement?.tagName||"").toLowerCase();"input"===t||"textarea"===t||document.activeElement?.isContentEditable||("PageDown"===e.key||"ArrowRight"===e.key?E<P&&(e.preventDefault(),z(e=>Math.min(P,e+1))):"PageUp"===e.key||"ArrowLeft"===e.key?E>1&&(e.preventDefault(),z(e=>Math.max(1,e-1))):"Home"===e.key?(e.preventDefault(),z(1)):"End"===e.key&&(e.preventDefault(),z(P)))},children:$?/* @__PURE__ */u(n,{size:"sm",padding:"",className:"h-full",label:x.loading}):/* @__PURE__ */m("div",{className:"min-h-full flex items-center justify-center p-4",children:[
|
|
21
21
|
/* @__PURE__ */u("style",{children:'\n.preview-pdf-textlayer {\n position: absolute;\n inset: 0;\n overflow: clip;\n line-height: 1;\n text-align: initial;\n text-size-adjust: none;\n forced-color-adjust: none;\n transform-origin: 0 0;\n caret-color: CanvasText;\n --min-font-size: 1;\n --text-scale-factor: calc(var(--total-scale-factor, 1) * var(--min-font-size));\n --min-font-size-inv: calc(1 / var(--min-font-size));\n}\n.preview-pdf-textlayer :is(span, br) {\n color: transparent;\n position: absolute;\n white-space: pre;\n cursor: text;\n transform-origin: 0% 0%;\n}\n.preview-pdf-textlayer > :not(.markedContent),\n.preview-pdf-textlayer .markedContent span:not(.markedContent) {\n z-index: 1;\n --font-height: 0;\n font-size: calc(var(--text-scale-factor) * var(--font-height));\n --scale-x: 1;\n --rotate: 0deg;\n transform: rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv));\n}\n.preview-pdf-textlayer .markedContent {\n display: contents;\n}\n.preview-pdf-textlayer span[role="img"] {\n user-select: none;\n cursor: default;\n}\n.preview-pdf-textlayer ::selection {\n background: rgba(0, 80, 255, 0.25);\n}\n.preview-pdf-textlayer br::selection {\n background: transparent;\n}\n.preview-pdf-textlayer .endOfContent {\n display: block;\n position: absolute;\n inset: 100% 0 0;\n z-index: 0;\n cursor: default;\n user-select: none;\n}\n.preview-pdf-textlayer.selecting .endOfContent {\n top: 0;\n}\n'}),
|
|
22
22
|
/* @__PURE__ */m("div",{className:"relative shadow-lg rounded",children:[
|
|
23
23
|
/* @__PURE__ */u("canvas",{ref:k,className:"block rounded"}),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{InputNumber_default as e}from"./chunk-
|
|
2
|
-
return m(g.Provider,{value:r,children:e})}function F({value:r,onChange:a,min:c,max:S,step:F=1,shiftStep:z,precision:$,inputMin:k,inputMax:N,suffix:j,showInput:L=!0,emptyLabel:
|
|
3
|
-
return f("div",{"data-slider":"",className:`flex w-full min-w-0 items-center ${se?"flex-wrap gap-2":"gap-3"} ${
|
|
4
|
-
/* @__PURE__ */m("input",{id:
|
|
5
|
-
/* @__PURE__ */m("div",{ref:_,"data-slider-box":"",className:se?"ml-auto shrink-0":"shrink-0 text-xs",style:se?void 0:{width:ae?.width??le,...ee?{fontSize:ee.fontSize}:{}},children:/* @__PURE__ */m(e,{value:r,onChange:e=>{null!=e?e<
|
|
1
|
+
import{InputNumber_default as e}from"./chunk-FDIJEOGV.js";import{useSettingAuto as t,useInSettingRow as i}from"./chunk-E4Z5OXBI.js";import{useShellStrings as n}from"./chunk-OVNRVFWS.js";import{createContext as r,useState as l,useMemo as a,useId as o,useRef as d,useContext as s,useEffect as u,useLayoutEffect as c}from"react";import{jsx as m,jsxs as f}from"react/jsx-runtime";var p=(e,t,i)=>Math.min(i,Math.max(t,e));function h(e){const t=String(e),i=/e-(\d+)$/.exec(t);return i?Number(i[1]):t.split(".")[1]?.length??0}var v=8,x=40;function b(e){return Math.max(1,...e.map(e=>(e??"").length))}var w="undefined"==typeof window?u:c;function y(e,t,i,n){return Number(p(e,t,i).toFixed(n))}var g=r(null);function S({children:e}){const[t,i]=l({}),n=a(()=>(e,t)=>i(i=>{if(null===t){if(!(e in i))return i;const t={...i};return delete t[e],t}return i[e]===t?i:{...i,[e]:t}}),[]),r=a(()=>{const e=Object.values(t);return{set:n,width:e.length?`max(${e.join(", ")})`:null}},[t,n]);/* @__PURE__ */
|
|
2
|
+
return m(g.Provider,{value:r,children:e})}function F({value:r,onChange:a,min:c,max:S,step:F=1,shiftStep:z,precision:$,inputMin:k,inputMax:N,suffix:j,showInput:L=!0,emptyLabel:E,placeholderValue:K,stepFrom:M,label:V,"aria-labelledby":A,valueText:C,id:D,disabled:O,size:R="md",className:I="",auto:W}){const B=n(),q=o(),G=t(),J=W??G,P=o(),T=D??q,U=$??h(F),X=k??c,Z=N??S,H=void 0!==E||void 0!==K,Q=M??K,Y=p(r??K??c,c,S),_=d(null),[ee,te]=l(null),ie=Boolean(j);w(()=>{const e=()=>{const e=_.current?.querySelector("input");if(!e)return;const t=getComputedStyle(e),i=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"].reduce((e,i)=>e+(parseFloat(t[i])||0),0);i<=0||te(e=>e&&e.frame===i&&e.fontSize===t.fontSize?e:{frame:i,fontSize:t.fontSize})};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[ie,L]);const ne=e=>C?C(e):"string"==typeof j?`${e.toFixed(U)} ${j}`:void 0,re=null==r?E??(null!=K?ne(K)??String(K):void 0):ne(r),le=`calc(${b([c.toFixed(U),S.toFixed(U),r?.toFixed(U),E,K?.toFixed(U)])}ch + ${(ee?.frame??10+(ie?x:v))+2}px)`,ae=s(g),oe=o(),de=ae?.set;w(()=>{de&&de(oe,L?le:null)},[de,oe,le,L]),u(()=>()=>de?.(oe,null),[de,oe]);const se=i();/* @__PURE__ */
|
|
3
|
+
return f("div",{"data-slider":"",className:`flex w-full min-w-0 items-center ${se?"flex-wrap gap-2":"gap-3"} ${I}`.trim(),children:[
|
|
4
|
+
/* @__PURE__ */m("input",{id:T,type:"range",min:c,max:S,step:F,value:Y,disabled:O,"aria-label":A?void 0:V,"aria-labelledby":A,"aria-valuetext":re,"aria-describedby":J?P:void 0,onKeyDown:e=>{const t="ArrowUp"===e.key||"ArrowRight"===e.key?1:"ArrowDown"===e.key||"ArrowLeft"===e.key?-1:0;if(!t||e.altKey||e.ctrlKey||e.metaKey)return;const i=e.shiftKey&&null!=z;if(!i&&!(null==r&&null!=Q))return;e.preventDefault();a(y((r??Q??Y)+t*(i?z??F:F),c,S,U))},onChange:e=>a(y(Number(e.target.value),c,S,U)),className:`min-w-24 flex-1 ${se?"basis-24":""} cursor-pointer accent-blue-600 disabled:cursor-not-allowed disabled:opacity-60 ${"sm"===R?"h-1":"h-1.5"}`}),L&&
|
|
5
|
+
/* @__PURE__ */m("div",{ref:_,"data-slider-box":"",className:se?"ml-auto shrink-0":"shrink-0 text-xs",style:se?void 0:{width:ae?.width??le,...ee?{fontSize:ee.fontSize}:{}},children:/* @__PURE__ */m(e,{value:r,onChange:e=>{null!=e?e<X||e>Z||a(e):H&&a(null)},min:X,max:Z,step:F,shiftStep:z,stepFrom:Q,precision:U,snap:!0,allowEmpty:H,suffix:j,disabled:O,placeholder:E??(null!=K?K.toFixed(U):void 0),size:se?void 0:"sm",auto:J,"aria-label":V?B.slider.value(V):void 0,"aria-labelledby":V?void 0:A})}),J&&/* @__PURE__ */m("span",{id:P,hidden:!0,children:B.settingView.auto})]})}export{F as Slider,S as SliderGroup,y as settleSliderValue,b as sliderBoxChars,h as stepDecimals};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{dialogA11y as e}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as r}from"./chunk-PKXQDCNR.js";import{useFocusTrap as i,useScrollLock as t}from"./chunk-CDAJKLGL.js";import{Icon as o}from"./chunk-
|
|
2
|
-
return h("button",{type:"button",onClick:e,"aria-label":r.close,className:"rounded-(--radius-control) p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */h(o,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})}function p({open:o,onClose:a,side:p="right",size:x="md",title:g,description:y,footer:v,children:N,blocking:k=!1,initialFocus:j,"aria-label":w,"aria-labelledby":C,"aria-describedby":
|
|
1
|
+
import{dialogA11y as e}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as r}from"./chunk-PKXQDCNR.js";import{useFocusTrap as i,useScrollLock as t}from"./chunk-CDAJKLGL.js";import{Icon as o}from"./chunk-VJPJNCB4.js";import{Z_LAYERS as l}from"./chunk-62LW225J.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as a}from"./chunk-OVNRVFWS.js";import{useRef as n,useId as d,useEffect as c}from"react";import{jsxs as m,jsx as h}from"react/jsx-runtime";var f={sm:"sm:w-[320px]",md:"sm:w-[448px]",lg:"sm:w-[640px]"},u={right:"inset-y-0 right-0",left:"inset-y-0 left-0",bottom:"inset-x-0 bottom-0"};function b({onClose:e}){const r=a().dialog;/* @__PURE__ */
|
|
2
|
+
return h("button",{type:"button",onClick:e,"aria-label":r.close,className:"rounded-(--radius-control) p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */h(o,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})}function p({open:o,onClose:a,side:p="right",size:x="md",title:g,description:y,footer:v,children:N,blocking:k=!1,initialFocus:j,"aria-label":w,"aria-labelledby":C,"aria-describedby":W,className:V=""}){const J=n(null),L=d(),z=d(),B=d();if(r(o),i(J,o,j),t(o),c(()=>{if(o)return s(()=>(k||a(),!0),()=>J.current)},[o,k,a]),!o)return null;const D="bottom"===p,U=D?{maxHeight:"85vh"}:void 0;/* @__PURE__ */
|
|
3
3
|
return m("div",{className:"fixed inset-0",style:{zIndex:l.overlay},role:"presentation",children:[
|
|
4
4
|
/* @__PURE__ */h("div",{className:"fixed inset-0 bg-black/30",onClick:k?void 0:a,"aria-hidden":"true"}),
|
|
5
|
-
/* @__PURE__ */m("div",{ref:
|
|
5
|
+
/* @__PURE__ */m("div",{ref:J,...e({modal:!0,titleId:g?B:void 0,labelledBy:C,label:w}),"aria-describedby":W??(y?z:N?L:void 0),style:U,className:["fixed flex flex-col bg-white shadow-xl",D?"":`w-full max-w-full ${f[x]}`,u[p],D?"rounded-t-xl":"",V].filter(Boolean).join(" "),children:[g?/* @__PURE__ */m("div",{className:"flex shrink-0 items-center justify-between gap-4 border-b border-gray-100 px-4 py-3",children:[
|
|
6
6
|
/* @__PURE__ */m("div",{className:"min-w-0",children:[
|
|
7
|
-
/* @__PURE__ */h("h2",{id:
|
|
8
|
-
/* @__PURE__ */m("div",{id:
|
|
7
|
+
/* @__PURE__ */h("h2",{id:B,className:"text-base font-semibold text-gray-900",children:g}),y&&/* @__PURE__ */h("p",{id:z,className:"mt-0.5 text-sm text-gray-500",children:y})]}),!k&&/* @__PURE__ */h(b,{onClose:a})]}):!k&&/* @__PURE__ */h("div",{className:"absolute right-2 top-2 z-10",children:/* @__PURE__ */h(b,{onClose:a})}),
|
|
8
|
+
/* @__PURE__ */m("div",{id:L,className:"min-h-0 flex-1 overflow-y-auto px-4 py-4",children:[y&&!g&&/* @__PURE__ */h("p",{id:z,className:("mb-3 text-sm text-gray-500 "+(k?"":"pr-8")).trim(),children:y}),N]}),v&&/* @__PURE__ */h("div",{className:"flex shrink-0 justify-end gap-3 border-t border-gray-100 px-4 py-3",children:v})]})]})}export{p as Drawer};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-VJPJNCB4.js";import{useShellStrings as i}from"./chunk-OVNRVFWS.js";import{Fragment as t}from"react";import{jsx as n,jsxs as a}from"react/jsx-runtime";var s=/* @__PURE__ */n(e,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 text-gray-300","aria-hidden":!0}),r="inline-flex min-w-0 items-center gap-1 truncate rounded px-1 -mx-1 text-gray-500 transition-colors hover:text-gray-900 hover:underline rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]";function l({items:e,separator:l,maxItems:c=0,className:m}){const o=i().breadcrumbs;if(0===e.length)return null;const h=l??s,d=[],u=e.length-1;if(c>0&&e.length>c&&c>=2){const i=Math.max(1,c-1);d.push({kind:"item",item:e[0],isLast:!1}),d.push({kind:"ellipsis"});for(let t=e.length-i;t<=u;t++)d.push({kind:"item",item:e[t],isLast:t===u})}else e.forEach((e,i)=>d.push({kind:"item",item:e,isLast:i===u}));/* @__PURE__ */
|
|
2
2
|
return n("nav",{"aria-label":o.label,className:`min-w-0 ${m??""}`,children:/* @__PURE__ */n("ol",{className:"flex items-center gap-2 text-sm",children:d.map((e,i)=>/* @__PURE__ */a(t,{children:[i>0&&/* @__PURE__ */n("li",{"aria-hidden":!0,className:"flex items-center",children:h}),
|
|
3
3
|
/* @__PURE__ */n("li",{className:"flex min-w-0 items-center",children:"ellipsis"===e.kind?/* @__PURE__ */n("span",{className:"px-0.5 text-gray-400 select-none","aria-label":o.hidden,children:"…"}):e.isLast||!e.item.href&&!e.item.onClick?/* @__PURE__ */a("span",{"aria-current":e.isLast?"page":void 0,className:"inline-flex min-w-0 items-center gap-1 truncate "+(e.isLast?"font-medium text-gray-900":"text-gray-500"),children:[e.item.icon,
|
|
4
4
|
/* @__PURE__ */n("span",{className:"truncate",children:e.item.label})]}):e.item.href?/* @__PURE__ */a("a",{href:e.item.href,onClick:e.item.onClick,className:r,children:[e.item.icon,
|
|
@@ -1,2 +1,2 @@
|
|
|
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{jsxs as r,jsx as a}from"react/jsx-runtime";function n({title:n,message:s,description:d,hint:i,variant:m,frameless:c,icon:o,children:l}){const h=c?"none":m??"dashed",x="boolean"!=typeof o&&null!=o?o:null,p=!x&&(o??"card"!==h),u=t().emptyState,y=s??(n?void 0:u.message),f=d??i;/* @__PURE__ */
|
|
2
2
|
return r("div",{className:`flex flex-col items-center justify-center text-center ${"card"===h?"rounded-md border border-gray-200 bg-white px-6 py-12":"none"===h?"px-6 py-12":"rounded-lg border-2 border-dashed border-gray-300 px-6 py-12"}`,children:[x&&/* @__PURE__ */a("div",{className:"mb-3 flex h-10 w-10 items-center justify-center text-gray-300","aria-hidden":"true",children:x}),p&&/* @__PURE__ */a(e,{name:"inbox",className:"h-10 w-10 text-gray-300 mb-3","aria-hidden":"true",strokeWidth:1}),n&&/* @__PURE__ */a("h3",{className:"text-sm font-medium text-gray-900",children:n}),y&&/* @__PURE__ */a("p",{className:"text-sm text-gray-500 "+(n?"mt-2":""),children:y}),f&&/* @__PURE__ */a("p",{className:"text-xs text-gray-400 mt-1",children:f}),l&&/* @__PURE__ */a("div",{className:"mt-4",children:l})]})}export{n as EmptyState};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{SearchableSelect as e}from"./chunk-
|
|
1
|
+
import{SearchableSelect as e}from"./chunk-DXQCNU5I.js";import{Select_default as a}from"./chunk-OJ3RN3BG.js";import{Input_default as l}from"./chunk-UNEJ2ABD.js";import{labelClasses as t}from"./chunk-EQKUFYX6.js";import{isSafeLinkHref as r}from"./chunk-PJPK2ADX.js";import{INPUT_SIZES as n}from"./chunk-JFSYWEHD.js";import{Button_default as i}from"./chunk-FSP63GKK.js";import{Icon as o}from"./chunk-VJPJNCB4.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as u}from"./chunk-OVNRVFWS.js";import{useId as d,useRef as c,useState as p,useEffect as m}from"react";import{jsx as f,jsxs as v,Fragment as g}from"react/jsx-runtime";function h(e){return"select"===e.type?e.options:"groups"===e.type?e.groups.flatMap(e=>e.options):[]}var b="address",x={kindOf:()=>b,targetOf:e=>e,readFilter:()=>null,withFilter:e=>e},y=e=>r(e.trim());function k(r){const{value:n,kinds:o,rules:k=x,filtersFor:w,label:N,readOnly:C,placeholder:F,className:O=""}=r,j=void 0!==r.onApply,$=u().link,D=k.isSafe??y,E=d(),P=c(null),z=c(null),[J,U]=p({url:n}),A=j?J.url:n,[K,S]=p(!1),[W,R]=p(null),[V,B]=p(null),Q=c(()=>{});Q.current=j?r.onCancel:()=>{},m(()=>{if(j)return s(e=>{const a=P.current;return!!("Escape"===e.key&&a&&e.target instanceof Node&&a.contains(e.target))&&(Q.current(),!0)},()=>P.current)},[j]),m(()=>{if(!j)return;const e=z.current;e?(e.focus(),e.select()):P.current?.querySelector("button, input")?.focus()},[]);const T=o??[{value:b,label:$.address,target:{type:"text"}}],X=W&&W.against===A?W.kind:k.kindOf(A),G=T.filter(e=>!e.hideWhenEmpty||h(e.target).length>0||e.value===X),H=G.find(e=>"text"===e.target.type),L=G.find(e=>e.value===X)??H??G[0];if(!L)return null;const M="text"!==L.target.type,Y=M?k.targetOf(A):A,q=h(L.target),I=q.find(e=>e.value===Y),Z=e=>({value:e,label:$.unavailable(e)}),_="select"===L.target.type&&Y&&w?w(Y):null,ee=_?k.readFilter(A):null,ae=ee?_?.find(e=>e.param===ee.param):void 0,le=V&&V.against===A?V.text:A,te=!M&&""!==le.trim()&&!D(le),re=te&&(!j||K),ne=(e,a)=>{j?U({url:e,name:a}):void 0===a?r.onChange(e):r.onChange(e,a)},ie=(e,a)=>{R(a=>a?{...a,against:e}:a),ne(e,a)},oe=e=>{if(!e)return ie("");const a=q.find(a=>a.value===e);ie(e,a?.label)},se=M?A:le.trim(),ue=()=>{if(!j||!se)return;if(!M&&te)return void S(!0);const e=M&&J.url===se?J.name:void 0,a=r.onApply;void 0===e?a(se):a(se,e)},de=(e,a)=>a&&!e.some(e=>e.value===a)?[Z(a),...e]:[...e],ce=(l,t,r,n,i)=>{const o=[];for(const e of r){const a=o[o.length-1],l={value:e.value,label:e.label};e.group?a&&"options"in a&&a.label===e.group?a.options.push(l):o.push({label:e.group,options:[l]}):o.push(l)}if(i){const a=r.some(e=>""===e.value);/* @__PURE__ */
|
|
2
2
|
return f(e,{"aria-label":l,value:t,options:o,disabled:C,clearable:a,placeholder:r.find(e=>""===e.value)?.label,onChange:n})}/* @__PURE__ */
|
|
3
|
-
return f(a,{size:"sm","aria-label":l,value:t,options:o,readOnly:C,onChange:n})};let pe;if("text"===
|
|
4
|
-
return f("div",{ref:
|
|
5
|
-
return v("div",{ref:
|
|
3
|
+
return f(a,{size:"sm","aria-label":l,value:t,options:o,readOnly:C,onChange:n})};let pe;if("text"===L.target.type)pe=/* @__PURE__ */f(l,{ref:z,id:`${E}-address`,size:"sm",type:"text",invalid:re,"aria-label":$.address,"aria-describedby":re?`${E}-why`:void 0,placeholder:F??$.addressPlaceholder,spellCheck:!1,autoComplete:"off",value:le,readOnly:C,onChange:e=>(e=>{S(!1);const a=e.trim();a?D(e)?(B({text:e,against:a}),ie(a)):B({text:e,against:A}):(B({text:e,against:""}),ie(""))})(e.target.value)});else{const e="groups"===L.target.type?L.target.groups.flatMap(e=>e.options.map(a=>({value:a.value,label:a.label,group:e.label}))):L.target.options.map(e=>({value:e.value,label:e.label})),a=[{value:"",label:L.target.placeholder},...de(e,Y)];pe=ce(L.label,Y,a,oe,e.length>10)}const me=/* @__PURE__ */v(g,{children:[o&&ce($.linkType,L.value,G.map(e=>({value:e.value,label:e.label})),e=>{B(null),S(!1);const a=G.find(a=>a.value===e);if(!a||"text"===a.target.type)return void R({kind:e,against:A});const l=h(a.target)[0];R({kind:e,against:l?l.value:""}),l?ne(l.value,l.label):ne("")},!1),pe,_&&ce($.filter,ee?.param??"",[{value:"",label:$.noFilter},...ee&&!ae?[Z(ee.param)]:[],..._.map(e=>({value:e.param,label:e.label}))],e=>{if(!e)return ie(Y,I?.label);const a=_?.find(a=>a.param===e),l=a?.values[0];l&&ie(k.withFilter(Y,{param:e,value:l.value}),l.label)},!1),_&&ee&&ce($.value,ee.value,de((ae?.values??[]).map(e=>({value:e.value,label:e.label})),ee.value),e=>{if(!ee)return;const a=ae?.values.find(a=>a.value===e);ie(k.withFilter(Y,{param:ee.param,value:e}),a?.label)},(ae?.values.length??0)>10),re&&/* @__PURE__ */f("p",{id:`${E}-why`,role:"alert",className:"text-2xs leading-4 text-red-600",children:$.unsafe}),L.hint&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-gray-400",children:L.hint}),_&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-gray-400",children:$.filterHint})]});if(!j)/* @__PURE__ */
|
|
4
|
+
return f("div",{ref:P,className:`flex min-w-0 flex-auto flex-col gap-2 ${O}`.trim(),role:N?"group":void 0,"aria-label":N,children:me});const fe=r.onRemove;/* @__PURE__ */
|
|
5
|
+
return v("div",{ref:P,role:"dialog","aria-label":N??$.title,className:`flex min-w-0 flex-col gap-2 rounded-xl border border-gray-200 bg-white p-3 shadow-lg ${O}`.trim(),onKeyDown:e=>{"Enter"!==e.key||e.defaultPrevented||e.target instanceof Element&&e.target.closest("button")||(e.preventDefault(),ue())},children:[M?/* @__PURE__ */f("span",{className:t({inline:!0}),children:$.title}):/* @__PURE__ */f("label",{htmlFor:`${E}-address`,className:t({inline:!0}),children:$.title}),me,
|
|
6
6
|
/* @__PURE__ */v("div",{className:"flex items-center justify-between gap-2",children:[fe?/* @__PURE__ */f(i,{variant:"ghost-danger",size:"sm","data-window-action":"remove",onClick:fe,children:$.remove}):null,
|
|
7
7
|
/* @__PURE__ */v("span",{className:"ml-auto flex gap-1",children:[
|
|
8
|
-
/* @__PURE__ */f(i,{variant:"secondary",size:"sm","data-window-action":"cancel",onClick:()=>
|
|
8
|
+
/* @__PURE__ */f(i,{variant:"secondary",size:"sm","data-window-action":"cancel",onClick:()=>Q.current(),children:$.cancel}),
|
|
9
9
|
/* @__PURE__ */f(i,{variant:"primary",size:"sm","data-window-action":"apply",onClick:ue,disabled:C||""===se,children:$.apply})]})]})]})}function w({label:e,text:a,onTextChange:t,link:r,onLinkChange:i,kinds:s,rules:m,filtersFor:g,textPlaceholder:h,readOnly:b,className:x=""}){const y=u().link,[w,N]=p(!1),C=c(null),F=d(),O=()=>{N(!1),C.current?.focus()};/* @__PURE__ */
|
|
10
10
|
return v("div",{className:`flex min-w-0 flex-auto flex-col ${x}`.trim(),children:[
|
|
11
11
|
/* @__PURE__ */f(l,{size:"sm",type:"text",className:"rounded-b-none","aria-label":y.text(e),placeholder:h,value:a,readOnly:b,onChange:e=>t(e.target.value)}),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{IconButton_default as e}from"./chunk-JHDWTYZ4.js";import{Icon as l}from"./chunk-
|
|
2
|
-
return n(a,{content:e,children:l},l.key??void 0)}function m({offered:a,pressed:d,onMark:m,color:g,linkOpen:w=!1,last:f,alignment:k,list:v,letterCase:N,disabled:C=!1,"aria-label":y,windows:D,className:M="",layout:x="grid"}){const j=r().textToolbar,
|
|
3
|
-
/* @__PURE__ */n("span",{className:"rosh-tb-flowgap","aria-hidden":"true"}),
|
|
4
|
-
/* @__PURE__ */n("div",{className:"rosh-tb-words",children
|
|
5
|
-
/* @__PURE__ */n("div",{className:"rosh-tb-para",children:
|
|
6
|
-
/* @__PURE__ */n("div",{className:"rosh-tb",role:"toolbar","aria-label":y??j.formatting,children:
|
|
1
|
+
import{IconButton_default as e}from"./chunk-JHDWTYZ4.js";import{Icon as l}from"./chunk-VJPJNCB4.js";import{Tooltip as a}from"./chunk-Z3WKHMVB.js";import{useShellStrings as r}from"./chunk-OVNRVFWS.js";import{jsx as n,jsxs as o,Fragment as s}from"react/jsx-runtime";var i=e=>e.preventDefault(),t=e=>null!=e&&!1!==e,d=["bold","italic","underline","strike","link","sup","sub","code"],c=["left","center","right","justify"];function u(e,l,a){const r={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1,Home:"first",End:"last"}[e.key];if(void 0===r||0===l.length)return;const n=[...e.currentTarget.querySelectorAll('[role="radio"]')],o=n.findIndex(l=>l===e.target||l.contains(e.target));if(o<0)return;e.preventDefault();const s=n.length,i="first"===r?0:"last"===r?s-1:(o+r+s)%s;n[i].disabled||(a(l[i]),n[i].focus())}function h(e,l){const a=["bold","italic","underline","strike"].filter(l=>e.has(l)).length;return{color:a,link:a+(l?1:0)}}function p({offered:e,color:l,last:a,alignment:r,list:n,letterCase:o}){const s=d.filter(l=>e.has(l)).length+(l?1:0)+(t(a)?1:0),i=(r?c.filter(e=>r.allow.includes(e)).length:0)+(n&&e.has("bullet")?1:0)+(n&&e.has("number")?1:0)+(e.has("quote")?1:0)+(o?3:0);return{words:s>0,paragraph:i>0,oneRow:s>0&&i>0&&s+1+i<=9,flow:s>0&&i>0&&s+1+i>9&&s<=7,cells:{words:s,paragraph:i}}}function b(e,l){/* @__PURE__ */
|
|
2
|
+
return n(a,{content:e,children:l},l.key??void 0)}function m({offered:a,pressed:d,onMark:m,color:g,linkOpen:w=!1,last:f,alignment:k,list:v,letterCase:N,disabled:C=!1,"aria-label":y,windows:D,className:M="",layout:x="grid"}){const j=r().textToolbar,B=p({offered:a,color:g,last:f,alignment:k,list:v,letterCase:N});if(!B.words&&!B.paragraph)return null;const R=(e,l="")=>`rosh-tb-btn${e?" is-on":""}${l?` ${l}`:""}`,q=(l,r,o,s)=>a.has(l)?b(r,/* @__PURE__ */n(e,"link"===l?{pressed:w,className:R(w),"aria-label":r,"aria-haspopup":"dialog","aria-expanded":w,"aria-keyshortcuts":s,disabled:C,onMouseDown:i,onClick:()=>m(l),children:o}:{className:R(Boolean(d[l])),"aria-label":r,"aria-pressed":Boolean(d[l]),"aria-keyshortcuts":s,disabled:C,onMouseDown:i,onClick:()=>m(l),children:o},l)):null,A=[["left",j.alignLeft,/* @__PURE__ */n(l,{name:"align-left"})],["center",j.alignCenter,/* @__PURE__ */n(l,{name:"align-center"})],["right",j.alignRight,/* @__PURE__ */n(l,{name:"align-right"})],["justify",j.alignJustify,/* @__PURE__ */n(l,{name:"align-justify"})]],L=k?c.filter(e=>k.allow.includes(e)):[],S=k&&L.includes(k.value)?k.value:L[0],$=[["none",j.caseNone,/* @__PURE__ */n(l,{name:"case-normal"})],["upper",j.caseUpper,/* @__PURE__ */n(l,{name:"case-upper"})],["lower",j.caseLower,/* @__PURE__ */n(l,{name:"case-lower"})]],I=/* @__PURE__ */o(s,{children:[q("bold",j.bold,/* @__PURE__ */n(l,{name:"bold"}),"Meta+B"),q("italic",j.italic,/* @__PURE__ */n(l,{name:"italic"}),"Meta+I"),q("underline",j.underline,/* @__PURE__ */n(l,{name:"underline"}),"Meta+U"),q("strike",j.strike,/* @__PURE__ */n(l,{name:"strike"})),g?b(j.color,/* @__PURE__ */n(e,{pressed:g.open,className:R(g.open,"rosh-tb-color"),"aria-label":j.color,"aria-haspopup":"dialog","aria-expanded":g.open,disabled:C,style:g.run?{"--rosh-tb-run":g.run}:void 0,onMouseDown:i,onClick:g.onToggle,children:/* @__PURE__ */n(l,{name:"text-color"})},"color")):null,q("link",j.link,/* @__PURE__ */n(l,{name:"link"}),"Meta+K"),q("sup",j.sup,/* @__PURE__ */n(l,{name:"superscript"})),q("sub",j.sub,/* @__PURE__ */n(l,{name:"subscript"})),q("code",j.code,/* @__PURE__ */n(l,{name:"code"})),t(f)?f:null]}),J=/* @__PURE__ */o(s,{children:[k&&L.length>0?/* @__PURE__ */n("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":j.alignment,onKeyDown:e=>u(e,L,e=>k.onChange(e)),children:A.map(([l,a,r])=>k.allow.includes(l)?b(a,/* @__PURE__ */n(e,{role:"radio",pressed:k.value===l,className:R(k.value===l),"aria-checked":k.value===l,"aria-label":a,tabIndex:l===S?0:-1,disabled:C||k.disabled,onMouseDown:i,onClick:()=>k.onChange(l),children:r},l)):null)}):null,v&&a.has("bullet")?b(j.bullet,/* @__PURE__ */n(e,{className:R("bullet"===v.pressed),"aria-label":j.bullet,"aria-pressed":"bullet"===v.pressed,disabled:C,onMouseDown:i,onClick:()=>v.onList("bullet"),children:/* @__PURE__ */n(l,{name:"list"})},"bullet")):null,v&&a.has("number")?b(j.number,/* @__PURE__ */n(e,{className:R("number"===v.pressed),"aria-label":j.number,"aria-pressed":"number"===v.pressed,disabled:C,onMouseDown:i,onClick:()=>v.onList("number"),children:/* @__PURE__ */n(l,{name:"numbered-list"})},"number")):null,q("quote",j.quote,/* @__PURE__ */n(l,{name:"quote"})),N?/* @__PURE__ */n("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":j.letterCase,onKeyDown:e=>u(e,$.map(([e])=>e),e=>N.onChange(e)),children:$.map(([l,a,r])=>b(a,/* @__PURE__ */n(e,{role:"radio",pressed:N.value===l,className:R(N.value===l),"aria-checked":N.value===l,"aria-label":a,tabIndex:l===(N.value||"none")?0:-1,disabled:C||N.disabled,onMouseDown:i,onClick:()=>N.onChange(N.value===l?"":l),children:r},l)))}):null]}),K="row"===x,T=K?" is-row":B.flow?" is-flow":B.oneRow?" is-one-row":B.words&&void 0===f?" is-eight":"",V=h(a,Boolean(g)),H={"--rosh-tb-color-col":String(V.color),"--rosh-tb-link-col":String(V.link),...K?{"--rosh-tb-cells":String(B.cells.words+B.cells.paragraph),"--rosh-tb-groupgap":B.words&&B.paragraph?"var(--space-8, 0.5rem)":"0px"}:{}};let U;return U=K?/* @__PURE__ */o("div",{className:"rosh-tb-row is-row",children:[B.words?/* @__PURE__ */n("div",{className:"rosh-tb-words",children:I}):null,B.paragraph?/* @__PURE__ */n("div",{className:"rosh-tb-para",children:J}):null]}):B.flow?/* @__PURE__ */o("div",{className:"rosh-tb-row is-flow",children:[I,
|
|
3
|
+
/* @__PURE__ */n("span",{className:"rosh-tb-flowgap","aria-hidden":"true"}),J]}):B.oneRow?/* @__PURE__ */o("div",{className:"rosh-tb-row is-one-row",children:[
|
|
4
|
+
/* @__PURE__ */n("div",{className:"rosh-tb-words",children:I}),
|
|
5
|
+
/* @__PURE__ */n("div",{className:"rosh-tb-para",children:J})]}):/* @__PURE__ */o(s,{children:[B.words?/* @__PURE__ */n("div",{className:"rosh-tb-row"+(void 0===f?" is-eight":""),children:I}):null,B.paragraph?/* @__PURE__ */n("div",{className:"rosh-tb-row",children:J}):null]}),/* @__PURE__ */o("div",{className:`rosh-tb-wrap${T} ${M}`.trim(),style:H,children:[
|
|
6
|
+
/* @__PURE__ */n("div",{className:"rosh-tb",role:"toolbar","aria-label":y??j.formatting,children:U}),D]})}export{m as TextToolbar,p as textToolbarRows,h as textToolbarWindowColumns};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{ImageFocusPoint as e}from"./chunk-PMJMPYLQ.js";import{FormField as a}from"./chunk-MVQBVPWP.js";import{isVideoUrl as i,mediaPromptLine as t,mediaFileName as r,FilenameBadge as o,BusyOverlay as n,UploadGlyph as l,dropzoneClass as s,zoneFocusClass as c}from"./chunk-CQXV3SJA.js";import{TransferProgress as d}from"./chunk-EZQXLIG3.js";import{Segmented as u}from"./chunk-BF2G42QU.js";import{useFileIntake as m,FileIntakeAlert as h}from"./chunk-VAACOJ2H.js";import{Icon as p}from"./chunk-VJPJNCB4.js";import{useShellStrings as b}from"./chunk-OVNRVFWS.js";import{useState as g,useRef as v,useEffect as f,useId as y}from"react";import{jsxs as k,jsx as j,Fragment as x}from"react/jsx-runtime";var N=["flex h-8 items-center justify-center rounded-(--radius-control) text-(--status-on-solid)","not-disabled:hover:bg-white/10 disabled:cursor-not-allowed disabled:opacity-60","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]"].join(" ");function w({value:w,onChange:L,onPick:C,onFile:R,label:F,hint:P,error:U,required:V,className:O,accept:$="image/*",maxSizeBytes:z,fit:B="cover",height:J=112,placeholder:Q,cta:A,acceptHint:H,showFilename:S=!0,allowReplace:q=!0,allowRemove:I=!0,replaceLabel:M,removeLabel:W,busy:G=!1,busyLabel:X,choosingLabel:_,pickFailedLabel:E,progress:K,disabled:Y=!1,kind:Z,onKindChange:D,focus:T,onFocusChange:ee,focusLabel:ae}){const ie=b().media,te=A??ie.cta,re=Z??(/video/.test($)&&!/image/.test($)?"video":"image"),oe="string"==typeof W&&W?W:ie.remove,[ne,le]=g(!1),[se,ce]=g(!1),de=v(!0);f(()=>()=>{de.current=!1},[]);const ue=G||ne,me=ne&&!G?_??ie.choosing:X??ie.uploading,he=U??(se?E??ie.pickFailed:void 0),pe=e=>{if(!C)return;ce(!1);const a=C(e);a&&"function"==typeof a.then&&(le(!0),a.then(e=>{de.current&&(le(!1),"string"==typeof e&&e&&L(e))},()=>{de.current&&(le(!1),ce(!0))}))},be=y(),ge=v(null),[ve,fe]=g(null);f(()=>()=>{ge.current&&URL.revokeObjectURL(ge.current)},[]);const ye=Y||ue,ke=!!w&&(i(w,$)||w===ve),je=Q??t($,ie),xe=M??(ke||"video"===re?ie.changeVideo:ie.changeImage),Ne=e=>{C?pe(e):R?R(e):(e=>{ge.current&&URL.revokeObjectURL(ge.current);const a=URL.createObjectURL(e);ge.current=a,fe(e.type.startsWith("video/")?a:null),L(a)})(e)},we=m({accept:$,maxSizeBytes:z,acceptHint:H,multiple:!1,disabled:ye,onAccept:([e])=>Ne(e)}),{dragOver:Le}=we,Ce=()=>{ye||(C?pe():we.open())},Re=w?r(w):"",Fe=!ke&&!!ee,Pe=Y||!q&&!I?null:/* @__PURE__ */k("div",{"data-media-bar":"",className:["absolute inset-x-0 bottom-0 flex items-center gap-1 p-1 text-(--status-on-solid)","opacity-0 transition-opacity duration-(--motion-fast)","group-hover/media:opacity-100 group-focus-within/media:opacity-100 [@media(hover:none)]:opacity-100"].join(" "),style:{background:"var(--rosh-media-scrim-button)"},children:[q&&/* @__PURE__ */k("button",{id:Fe?void 0:be,type:"button","aria-labelledby":`${be}-change`,onClick:()=>Ce(),disabled:ue,className:`min-w-0 flex-1 gap-1 px-2 text-sm font-medium ${N}`,children:[
|
|
2
|
+
/* @__PURE__ */j(p,{name:"swap","aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
|
|
3
|
+
/* @__PURE__ */j("span",{id:`${be}-change`,className:"truncate",children:xe})]}),I&&/* @__PURE__ */j("button",{type:"button","aria-label":oe,onClick:()=>{ge.current&&(URL.revokeObjectURL(ge.current),ge.current=null),fe(null),L("")},disabled:ue,className:`ml-auto w-8 shrink-0 ${N}`,children:/* @__PURE__ */j(p,{name:"trash","aria-hidden":"true",className:"h-4 w-4"})})]}),Ue=/* @__PURE__ */k("div",{...we.zoneProps,"data-media-frame":"",className:["group/media relative overflow-hidden rounded-(--radius-control) border transition-colors",Fe?"":"bg-gray-100",Le?"border-blue-500":"border-gray-200"].join(" "),style:Fe?void 0:{height:J},children:[Fe?
|
|
4
|
+
/* @__PURE__ */j(e,{value:T??"",onChange:e=>ee?.(e),label:ae??ie.focus,image:w,hint:null,id:be,disabled:ye,className:"[&_[data-image-focus-picture]]:rounded-none [&_[data-image-focus-picture]]:border-0"}):ke?/* @__PURE__ */j("video",{src:w??void 0,muted:!0,playsInline:!0,preload:"metadata","aria-label":Re||void 0,className:"h-full w-full",style:{objectFit:B}}):/* @__PURE__ */j("img",{src:w??void 0,alt:Re,className:"h-full w-full",style:{objectFit:B,objectPosition:T||void 0}}),S&&w&&/* @__PURE__ */j(o,{children:Re}),Pe,ue&&/* @__PURE__ */j(n,{label:me,progress:K,rounded:"rounded-md"})]}),Ve=/* @__PURE__ */j("button",{type:"button",id:be,onClick:()=>Ce(),disabled:ye,"aria-label":"string"==typeof je?je:ie.upload,"aria-busy":ue||void 0,"aria-invalid":!!he||void 0,"aria-required":V||void 0,"aria-describedby":he?`${be}-error`:P?`${be}-hint`:void 0,...we.zoneProps,className:s(Le,ye,c(ye)),style:{minHeight:J},children:ue?/* @__PURE__ */j(d,{state:"busy",verb:me,pct:K}):/* @__PURE__ */k(x,{children:[
|
|
5
|
+
/* @__PURE__ */j("span",{className:"text-gray-400",children:/* @__PURE__ */j(l,{})}),
|
|
6
|
+
/* @__PURE__ */j("span",{className:"px-3 text-xs text-gray-500",children:je}),
|
|
7
|
+
/* @__PURE__ */j("span",{className:"text-sm font-medium text-blue-600",children:te}),H&&/* @__PURE__ */j("span",{className:"text-xs text-gray-400",children:H})]})});/* @__PURE__ */
|
|
8
|
+
return k(a,{label:F,htmlFor:be,hint:P,error:he,required:V,className:O,children:[D&&/* @__PURE__ */j("div",{"data-media-kind":"",className:"mb-2",children:/* @__PURE__ */j(u,{value:re,onChange:e=>D(e),options:[{value:"image",label:ie.image,icon:/* @__PURE__ */j(p,{name:"image","aria-hidden":"true",className:"h-4 w-4"}),disabled:ye},{value:"video",label:ie.video,icon:/* @__PURE__ */j(p,{name:"play","aria-hidden":"true",className:"h-4 w-4"}),disabled:ye}],block:!0,size:"md",label:"string"==typeof F&&F?F:ie.upload})}),w?Ue:Ve,!C&&/* @__PURE__ */j("input",{...we.inputProps}),
|
|
9
|
+
/* @__PURE__ */j(h,{rejections:we.rejections})]})}export{w as MediaUploadField};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-VJPJNCB4.js";import{SpinnerRing as t}from"./chunk-Q5MD3VY6.js";import{useState as a,useId as r,Children as s,isValidElement as i}from"react";import{jsx as n,jsxs as l}from"react/jsx-runtime";function c({summary:t,busy:c=!1,open:o,onOpenChange:d,label:m="Steps",className:u="",children:p}){const[f,h]=a(null),g=r(),x=o??f??c;return 1===s.toArray(p).filter(i).length?/* @__PURE__ */n("div",{className:`text-xs text-gray-500 ${u}`.trim(),children:/* @__PURE__ */n("ol",{"aria-label":m,children:p})}):/* @__PURE__ */l("div",{className:`text-xs text-gray-500 ${u}`.trim(),children:[
|
|
2
2
|
/* @__PURE__ */l("button",{type:"button",onClick:()=>{h(!x),d?.(!x)},"aria-expanded":x,"aria-controls":x?g:void 0,className:"flex w-full items-center gap-2 rounded text-left hover:text-gray-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-blue-600",children:[
|
|
3
3
|
/* @__PURE__ */n(e,{name:"chevron-right",size:12,className:"shrink-0 motion-safe:transition-transform "+(x?"rotate-90":"")}),
|
|
4
4
|
/* @__PURE__ */n("span",{"aria-live":"polite",className:"min-w-0 flex-1 truncate",children:t})]}),x&&/* @__PURE__ */n("ol",{id:g,"aria-label":m,className:"mt-2 ml-2 space-y-2 border-l border-gray-200 pl-3",children:p})]})}var o={pending:"text-gray-400",active:"text-gray-800",complete:"text-gray-600",failed:"text-red-600",stopped:"text-gray-500",waiting:"text-amber-700",skipped:"text-gray-400"},d={pending:"Pending",active:"In progress",complete:"Done",failed:"Failed",stopped:"Stopped",waiting:"Waiting for you",skipped:"Skipped"};function m({status:a}){switch(a){case"active":/* @__PURE__ */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{SidebarLayout as e}from"./chunk-
|
|
1
|
+
import{SidebarLayout as e}from"./chunk-G34KXE2L.js";import{Avatar as t}from"./chunk-UL4WB3VH.js";import{Input_default as a}from"./chunk-UNEJ2ABD.js";import{Button_default as i}from"./chunk-FSP63GKK.js";import{useState as s}from"react";import{jsx as l,jsxs as n}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 l("div",{className:"h-full",children:/* @__PURE__ */l(e,{side:"left",defaultWidth:260,sidebar:/* @__PURE__ */l("div",{className:"h-full overflow-auto",children:r.map(e=>/* @__PURE__ */n("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__ */l(t,{name:e.name,status:e.status}),
|
|
4
4
|
/* @__PURE__ */n("div",{className:"min-w-0 flex-1",children:[
|