efficient-shell 10.24.0 → 11.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -2
- package/dist/Browser-2JOFXNUA.js +44 -0
- package/dist/Calculator-V3BHUF4G.js +29 -0
- package/dist/{CurrencyConverter-7UMHQS2V.js → CurrencyConverter-6WJWHZUQ.js} +5 -5
- package/dist/{Documents-ODZ4AAOY.js → Documents-DY2OBQNR.js} +25 -25
- package/dist/{Files-BRGTTI2J.js → Files-ADJB2IFU.js} +43 -43
- package/dist/{Notepad-RMRDEGGU.js → Notepad-HOJSMCCF.js} +9 -9
- package/dist/{PomodoroTimer-4566W4F7.js → PomodoroTimer-5GWSBJW5.js} +5 -5
- package/dist/{Preview-7POJP7PB.js → Preview-JZBO2SP5.js} +13 -13
- package/dist/Sidebar-GQX7UM3M.js +44 -0
- package/dist/{Spreadsheet-7T4VT5IO.js → Spreadsheet-SS5Y3DV2.js} +13 -13
- package/dist/{Stock-H73C4R3N.js → Stock-3LSKLYGI.js} +3 -3
- package/dist/{Weather-WF56QCBI.js → Weather-26PCYFUR.js} +18 -18
- package/dist/{WorldClock-5QJNZYYS.js → WorldClock-KRL72Y53.js} +6 -6
- package/dist/ai/index.js +78 -78
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/CartesianPlot.js +1 -1
- package/dist/charts/ChartTooltip.js +1 -1
- package/dist/charts/ChordChart.js +1 -1
- package/dist/charts/ColumnChart.js +1 -1
- package/dist/charts/FunnelChart.js +1 -1
- package/dist/charts/HeatmapChart.js +1 -1
- package/dist/charts/HistogramChart.js +1 -1
- package/dist/charts/PieChart.js +1 -1
- package/dist/charts/RadarChart.js +1 -1
- package/dist/charts/RadialBarChart.js +1 -1
- package/dist/charts/RangeChart.js +1 -1
- package/dist/charts/SankeyChart.js +1 -1
- package/dist/charts/ScatterChart.js +1 -1
- package/dist/charts/SpecChart.js +1 -1
- package/dist/charts/SunburstChart.js +1 -1
- package/dist/charts/TimeSeriesChart.js +1 -1
- package/dist/charts/TreemapChart.js +1 -1
- package/dist/charts/WaterfallChart.js +1 -1
- package/dist/chunk-23G63EZ4.js +29 -0
- package/dist/{chunk-XXL5RLNM.js → chunk-34H3CK7R.js} +9 -9
- package/dist/{chunk-HNVSVTNC.js → chunk-355CRSFS.js} +11 -11
- package/dist/{chunk-DZOJQURG.js → chunk-3NRQNKVP.js} +3 -3
- package/dist/{chunk-BUO7XCYR.js → chunk-3TXSYEQM.js} +13 -13
- package/dist/{chunk-NRALUW6P.js → chunk-3XTSXZAC.js} +7 -7
- package/dist/{chunk-WDQEUNGE.js → chunk-47DO42IW.js} +1 -1
- package/dist/{chunk-FUDUQ44A.js → chunk-4LQDORA6.js} +1 -1
- package/dist/{chunk-QWCEKHAP.js → chunk-4MBYFQOI.js} +4 -4
- package/dist/{chunk-U44DVPGB.js → chunk-4QK4WNPB.js} +1 -1
- package/dist/{chunk-COF33H6J.js → chunk-4TGZODSH.js} +5 -5
- package/dist/{chunk-LCSMBVMU.js → chunk-4XNVIKZZ.js} +3 -3
- package/dist/chunk-56KADF2B.js +11 -0
- package/dist/{chunk-GC3DA6D6.js → chunk-5CXFABVD.js} +1 -1
- package/dist/{chunk-E3EJWNNK.js → chunk-5F2AIDPY.js} +9 -9
- package/dist/{chunk-G66SG6JN.js → chunk-6EIZOX6W.js} +9 -9
- package/dist/{chunk-Z3SLQKE6.js → chunk-6TJCIS5E.js} +1 -1
- package/dist/chunk-6UBOLLBC.js +31 -0
- package/dist/chunk-7DI3VQCF.js +2 -0
- package/dist/{chunk-DOF56HTO.js → chunk-A3Q7X35W.js} +6 -6
- package/dist/chunk-AIJ3G6BD.js +1 -0
- package/dist/{chunk-V2J2AHDW.js → chunk-ALE56KOA.js} +4 -4
- package/dist/{chunk-CQEVJG43.js → chunk-BQPMZXNB.js} +1 -1
- package/dist/{chunk-BBXFIBXB.js → chunk-BTRV3SMB.js} +1 -1
- package/dist/{chunk-OKHKY3ZZ.js → chunk-BW47XJLH.js} +1 -1
- package/dist/{chunk-RZQGPWSN.js → chunk-CD7UWMPX.js} +1 -1
- package/dist/{chunk-WGLHB6WE.js → chunk-CJH2BGXY.js} +1 -1
- package/dist/{chunk-7FW2BQTV.js → chunk-COGSXN4D.js} +2 -2
- package/dist/{chunk-ZRLWE3JM.js → chunk-DANLBFBD.js} +1 -1
- package/dist/{chunk-TFSLPAGB.js → chunk-DGNAUGZ3.js} +4 -4
- package/dist/{chunk-ALTBTO3Z.js → chunk-DLWKDAYX.js} +2 -2
- package/dist/{chunk-MCAPJSB6.js → chunk-DU4WEVNS.js} +1 -1
- package/dist/{chunk-NZ7BFYCM.js → chunk-EB2IQNM5.js} +1 -1
- package/dist/{chunk-Z44JWU75.js → chunk-EKCQ7XBZ.js} +2 -2
- package/dist/{chunk-DIEH76MB.js → chunk-ESZHN7PV.js} +1 -1
- package/dist/chunk-EUAC2T5D.js +2 -0
- package/dist/{chunk-5PP435FL.js → chunk-EYPKBJYG.js} +1 -1
- package/dist/chunk-EZYRHBOP.js +13 -0
- package/dist/{chunk-7JVGF555.js → chunk-FA5FBNWF.js} +1 -1
- package/dist/chunk-FO6UPEZH.js +7 -0
- package/dist/{chunk-UNQ54QOF.js → chunk-FXOYA2VJ.js} +1 -1
- package/dist/{chunk-OTITQ3IH.js → chunk-G3KXB7SP.js} +8 -8
- package/dist/{chunk-3FBDLIQW.js → chunk-GAIB5FEE.js} +70 -70
- package/dist/{chunk-YQOVUH5W.js → chunk-GELPD7EY.js} +8 -8
- package/dist/chunk-GOZO6LU2.js +8 -0
- package/dist/{chunk-CX4XR4HO.js → chunk-GSF2UZTX.js} +1 -1
- package/dist/chunk-HCXIXV4E.js +8 -0
- package/dist/chunk-HEGSRTXG.js +5 -0
- package/dist/{chunk-DGWS4GTI.js → chunk-IGLPL2QU.js} +1 -1
- package/dist/chunk-IYXNRNAF.js +8 -0
- package/dist/{chunk-FZM3ZPW3.js → chunk-JPNAEN53.js} +1 -1
- package/dist/{chunk-S4FPYCUU.js → chunk-JQBVSPF5.js} +3 -3
- package/dist/{chunk-O7RR2ZZ2.js → chunk-KBV2UOTG.js} +6 -6
- package/dist/chunk-L7XIGRIT.js +6 -0
- package/dist/chunk-LCMXVMF4.js +14 -0
- package/dist/{chunk-PSR6SXCC.js → chunk-LGDMGDSV.js} +11 -11
- package/dist/chunk-LH7IKIGE.js +1 -0
- package/dist/{chunk-3BFZVVAT.js → chunk-LJAYUDN2.js} +1 -1
- package/dist/{chunk-Z6GQFTLJ.js → chunk-LK5A2SGA.js} +1 -1
- package/dist/{chunk-XFH64VIG.js → chunk-M3JNILT2.js} +3 -3
- package/dist/{chunk-VX6TKEEK.js → chunk-M4BPHBKI.js} +1 -1
- package/dist/{chunk-6M5O2P64.js → chunk-MDV7UQJD.js} +9 -9
- package/dist/{chunk-USVL5SLG.js → chunk-MIC2F3W3.js} +1 -1
- package/dist/chunk-MNMOBH2O.js +1 -0
- package/dist/{chunk-DWAA4YZV.js → chunk-MTIP5DH2.js} +3 -3
- package/dist/{chunk-XCAUDTCC.js → chunk-MXGDFO6A.js} +5 -5
- package/dist/{chunk-6IOFNPR6.js → chunk-NEZA7V6H.js} +4 -4
- package/dist/{chunk-IHNOWRTP.js → chunk-OEQ52KWJ.js} +2 -2
- package/dist/{chunk-WLYYC3AP.js → chunk-OFG3JZZE.js} +1 -1
- package/dist/{chunk-QGWKM7C3.js → chunk-OONJ43CQ.js} +5 -5
- package/dist/{chunk-CIHR5ZKF.js → chunk-OTVK7DJM.js} +1 -1
- package/dist/{chunk-HUA3TGMM.js → chunk-P2C33RHT.js} +1 -1
- package/dist/{chunk-55AEZX6K.js → chunk-P4VKU3SL.js} +1 -1
- package/dist/{chunk-A6FR2D46.js → chunk-PFKXPSOM.js} +5 -5
- package/dist/{chunk-TDAI4J27.js → chunk-PVPMJ5G2.js} +1 -1
- package/dist/chunk-Q5Z3KHT2.js +1 -0
- package/dist/{chunk-RSOBUPLK.js → chunk-QMUIXKBQ.js} +1 -1
- package/dist/{chunk-NJN5IKWO.js → chunk-QQ2LDC6C.js} +1 -1
- package/dist/{chunk-QO5E33DH.js → chunk-RABYGQQU.js} +2 -2
- package/dist/chunk-RK7MN5L5.js +3 -0
- package/dist/chunk-RPL4H6LE.js +9 -0
- package/dist/{chunk-N5KO2IHG.js → chunk-RQDVAUXD.js} +4 -4
- package/dist/{chunk-IPO4LHSB.js → chunk-RRE2NNFS.js} +6 -6
- package/dist/{chunk-WL4U4MTQ.js → chunk-RWPMLUFO.js} +3 -3
- package/dist/{chunk-36PJGT4W.js → chunk-SHO35OPO.js} +3 -3
- package/dist/{chunk-DRUQH4ZE.js → chunk-SS5SQMIB.js} +2 -2
- package/dist/{chunk-BMXTPJ7T.js → chunk-SX5BSWTN.js} +5 -5
- package/dist/{chunk-AFG34RBV.js → chunk-SXQZ5GTA.js} +6 -6
- package/dist/{chunk-RDKIYORS.js → chunk-SYZLS2JA.js} +1 -1
- package/dist/{chunk-4P3324KU.js → chunk-T7PVHIXI.js} +1 -1
- package/dist/{chunk-DVYIBJ3S.js → chunk-TQE6O2JA.js} +3 -3
- package/dist/{chunk-P7H2DXJB.js → chunk-UGGHQYDN.js} +10 -10
- package/dist/{chunk-EH2BNSG3.js → chunk-VAPSWR5Q.js} +9 -9
- package/dist/{chunk-LE5LWALR.js → chunk-VCMHBUKI.js} +1 -1
- package/dist/{chunk-NZ34BQKH.js → chunk-VQBEZNHC.js} +1 -1
- package/dist/chunk-VUIGU2LQ.js +23 -0
- package/dist/chunk-WBJ6KNUF.js +1 -0
- package/dist/{chunk-36VIGB6J.js → chunk-WDQI3FV6.js} +6 -6
- package/dist/{chunk-VX4COEWP.js → chunk-WMHZA4EO.js} +3 -3
- package/dist/chunk-WUAKIM2B.js +7 -0
- package/dist/{chunk-TE6R53YD.js → chunk-XWFLIGDQ.js} +1 -1
- package/dist/{chunk-XBHXGBJR.js → chunk-YCWALB3A.js} +1 -1
- package/dist/{chunk-4EBJO7ER.js → chunk-YDMXW2Q4.js} +11 -11
- package/dist/{chunk-H5NIW2KS.js → chunk-ZD36QKQS.js} +1 -1
- package/dist/{chunk-QRU55BUS.js → chunk-ZD56IH5K.js} +2 -2
- package/dist/{chunk-WOAMPTZI.js → chunk-ZS3TIQQ4.js} +14 -14
- package/dist/{chunk-4RGMRXYH.js → chunk-ZXVJL7MS.js} +1 -1
- package/dist/data/DataTable.js +1 -1
- package/dist/data/EntityList.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/ResizableTable.js +1 -1
- package/dist/format/index.d.ts +1 -1
- package/dist/format/index.js +1 -1
- package/dist/forms/AlignmentGrid.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Button.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/IconButton.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/Input.d.ts +50 -2
- package/dist/forms/Input.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.js +1 -1
- package/dist/forms/NumericKeypad.js +1 -1
- package/dist/forms/PictureTiles.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/Segmented.js +1 -1
- package/dist/forms/Select.js +1 -1
- package/dist/forms/SidesInput.js +1 -1
- package/dist/forms/Slider.js +1 -1
- package/dist/forms/Snippet.js +1 -1
- package/dist/forms/SplitButton.js +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/linkHref.js +1 -1
- package/dist/hooks/useTheme.d.ts +1 -1
- package/dist/icons/efficient-glyphs.js +1 -1
- package/dist/icons/efficient-looks.js +1 -1
- package/dist/icons/efficient-meanings.d.ts +2 -2
- package/dist/icons/efficient-meanings.js +1 -1
- package/dist/icons/efficient.js +1 -1
- package/dist/icons/looks/map.js +1 -1
- package/dist/icons/payment.js +1 -1
- package/dist/icons/sets.js +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.js +666 -667
- package/dist/map/index.js +3 -3
- package/dist/markup/index.d.ts +55 -11
- package/dist/markup/index.js +1 -1
- package/dist/motion/values.d.ts +75 -0
- package/dist/motion/values.js +1 -0
- package/dist/motion.css +26 -0
- package/dist/page-tabs/index.js +5 -5
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ContextMenu.js +1 -1
- package/dist/shell/DropdownMenu.js +1 -1
- package/dist/shell/EditableGrid.js +1 -1
- package/dist/shell/GlobalSearch.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/IconRail.js +1 -1
- package/dist/shell/ImageLightbox.js +1 -1
- package/dist/shell/ItemCount.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/PopupMenu.js +1 -1
- package/dist/shell/ResizeHandle.js +1 -1
- package/dist/shell/SearchableSelect.d.ts +11 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/SidebarNav.js +1 -1
- package/dist/shell/SortableList.js +1 -1
- package/dist/shell/StatusBadge.js +1 -1
- package/dist/shell/Tabs.js +1 -1
- package/dist/shell/Tooltip.js +1 -1
- package/dist/shell/TopNav.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/AuthScreen.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DashboardTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/ErrorBoundary.d.ts +1 -1
- package/dist/templates/ErrorBoundary.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/tokens/type.d.ts +3 -31
- package/dist/tokens/type.js +1 -1
- package/dist/ui/index.d.ts +2 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -2
- package/dist/Browser-KUFFOGYK.js +0 -43
- package/dist/Calculator-LENRW34X.js +0 -29
- package/dist/Sidebar-TU4QCKYJ.js +0 -44
- package/dist/chunk-3C5NKOVF.js +0 -1
- package/dist/chunk-4BCFBF3C.js +0 -9
- package/dist/chunk-4P57TIFK.js +0 -2
- package/dist/chunk-5DIGYJHD.js +0 -1
- package/dist/chunk-7LU3H72S.js +0 -7
- package/dist/chunk-7RP7QTRF.js +0 -12
- package/dist/chunk-CH3JQUDW.js +0 -8
- package/dist/chunk-DHKRXHJN.js +0 -1
- package/dist/chunk-EOVXFXVV.js +0 -2
- package/dist/chunk-EXLHFM3V.js +0 -6
- package/dist/chunk-GOXQJCXG.js +0 -28
- package/dist/chunk-H475WZPF.js +0 -23
- package/dist/chunk-JPOYR5AO.js +0 -7
- package/dist/chunk-MAMWQCJ6.js +0 -2
- package/dist/chunk-MHPFBVDD.js +0 -8
- package/dist/chunk-NWC6YCIJ.js +0 -11
- package/dist/chunk-PJPK2ADX.js +0 -1
- package/dist/chunk-PVDZG2U2.js +0 -14
- package/dist/chunk-S5DYR75A.js +0 -29
- package/dist/chunk-TNJ2VCH4.js +0 -8
- package/dist/chunk-USWA6YNZ.js +0 -3
- /package/dist/{chunk-RKLZDVAO.js → chunk-2F5SLLBJ.js} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{arcPath as e}from"./chunk-VFC6QUEN.js";import{MOTION as t,stagger as a}from"./chunk-465RRWBY.js";import{useHighlight as l}from"./chunk-CNYAHYE6.js";import{
|
|
1
|
+
import{arcPath as e}from"./chunk-VFC6QUEN.js";import{MOTION as t,stagger as a}from"./chunk-465RRWBY.js";import{useHighlight as l}from"./chunk-CNYAHYE6.js";import{angleScale as r}from"./chunk-2JWPNR2U.js";import{ChartTooltip as n}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as o,CHART_INK as i}from"./chunk-TZFACUMR.js";import{useShellStrings as s,useShellLocale as c}from"./chunk-GDQJBQ5B.js";import{formatPlain as m}from"./chunk-C3QOHMR6.js";import{useId as h,useState as u}from"react";import{jsx as p,jsxs as d}from"react/jsx-runtime";var f=300*Math.PI/180;function g({rows:g,variant:k="track",size:v=300,max:x,formatValue:y,animate:M=!0,className:N,emptyLabel:b,trackGap:j=6}){const C=s().charts,w=c(),Q=y??(e=>m(e,w)),R=b??C.nothingToPlot,B=h(),[E,P]=u(null),{highlighted:T}=l();if(0===g.length)/* @__PURE__ */return p("p",{className:`text-sm text-gray-500 ${N??""}`,children:R});const $=v/2,F=v/2,I=v/2-10,U=x??Math.max(...g.map(e=>e.value),1),V="track"===k?Math.max(6,(I-.16*v)/g.length):0,W=Math.max(1,Math.floor((I-.16*v)/V||1)),Y="track"===k?g.slice(0,W):g,z=Math.min(j,Math.max(1,V-2)),A=r(Y.length,.03),D=null!==E?Y[E]:void 0;/* @__PURE__ */
|
|
2
2
|
return d("div",{className:`relative ${N??""}`,children:[
|
|
3
|
-
/* @__PURE__ */d("svg",{width:"100%",height:v,viewBox:`0 0 ${v} ${v}`,role:"img","aria-labelledby":
|
|
4
|
-
/* @__PURE__ */p("title",{id:
|
|
5
|
-
return d("g",{opacity:c?.4:1,onMouseEnter:()=>
|
|
6
|
-
/* @__PURE__ */p("path",{d:e($,
|
|
7
|
-
/* @__PURE__ */p("path",{d:e($,
|
|
8
|
-
return p("g",{opacity:c?.4:1,onMouseEnter:()=>
|
|
3
|
+
/* @__PURE__ */d("svg",{width:"100%",height:v,viewBox:`0 0 ${v} ${v}`,role:"img","aria-labelledby":B,onMouseLeave:()=>P(null),children:[
|
|
4
|
+
/* @__PURE__ */p("title",{id:B,children:"track"===k?C.radialTrack(Y.length):C.radialCycle(Y.length)}),Y.map((l,r)=>{const n=o(r,l.color,l.tone),s=Math.max(0,Math.min(1,l.value/U)),c=((e,t)=>null!==E?E!==e:null!==T&&T!==t)(r,l.key);if("track"===k){const o=I-r*V,m=o-V+z,h=-Math.PI/2;/* @__PURE__ */
|
|
5
|
+
return d("g",{opacity:c?.4:1,onMouseEnter:()=>P(r),className:M?t.sweep:void 0,style:M?a(r,70):void 0,children:[
|
|
6
|
+
/* @__PURE__ */p("path",{d:e($,F,m,o,h,h+f),fill:i.grid}),
|
|
7
|
+
/* @__PURE__ */p("path",{d:e($,F,m,o,h,h+f*s),fill:n})]},l.key)}const m=.14*v;/* @__PURE__ */
|
|
8
|
+
return p("g",{opacity:c?.4:1,onMouseEnter:()=>P(r),children:/* @__PURE__ */p("path",{d:e($,F,m,m+(I-m)*s,A(r),A(r)+A.step),fill:n})},l.key)})]}),D&&null!==E&&/* @__PURE__ */p("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */p(n,{title:D.label,rows:[{key:"value",label:C.value,color:o(E,D.color,D.tone),value:Q(D.value)}]})}),
|
|
9
9
|
/* @__PURE__ */p("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(150px,1fr))"},children:g.map((e,t)=>/* @__PURE__ */d("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
|
|
10
10
|
/* @__PURE__ */p("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:o(t,e.color,e.tone)}}),
|
|
11
11
|
/* @__PURE__ */p("span",{className:"flex-1 truncate",children:e.label}),
|
|
12
|
-
/* @__PURE__ */p("span",{className:"tabular-nums text-gray-800",children:
|
|
12
|
+
/* @__PURE__ */p("span",{className:"tabular-nums text-gray-800",children:Q(e.value)})]},e.key))})]})}export{g as RadialBarChart};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{optionMatches as e,OptionSublabel as t}from"./chunk-LJN77RG6.js";import{inputClasses as n}from"./chunk-AYZY3YNC.js";import{GROUP_COLORS as o}from"./chunk-JPNAEN53.js";import{Tooltip as r}from"./chunk-QQ2LDC6C.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as i}from"./chunk-62LW225J.js";import{useDropdownPosition as s,POPUP_MAX_WIDTH as a,MENU_MAX_HEIGHT as c}from"./chunk-GLUJS42B.js";import{useShellStrings as u}from"./chunk-GDQJBQ5B.js";import{glassStyle as d}from"./chunk-5FYDNH4Y.js";import{useState as m,useRef as h,useMemo as p,useEffect as f}from"react";import{createPortal as v}from"react-dom";import{jsxs as g,jsx as x,Fragment as b}from"react/jsx-runtime";var w={accent:{chip:"inline-flex max-w-full items-center gap-1 rounded bg-accent-tint px-2 py-0.5 text-xs font-medium text-blue-700",remove:"text-blue-400 hover:text-red-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"},danger:{chip:`inline-flex max-w-full items-center gap-1 rounded ${o.danger} px-2 py-0.5 text-xs font-medium`,remove:"text-current opacity-70 hover:opacity-100 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"}};function y({value:o,onChange:y,options:k=[],placeholder:N,allowFreeText:j=!1,invalid:C,disabled:L,id:D,className:E="",tone:B,tooltip:J,split:W}){const[Y,$]=m(!1),[G,M]=m(""),Q=u(),F=h(null),H=h(null),S=h(null),A=s(F,Y),I=e=>k.find(t=>t.value===e)?.label??e,P=p(()=>{const t=new Set(o),n=[],r=G.trim().toLowerCase();for(const o of k)t.has(o.value)||(t.add(o.value),r&&!e(o,r)||n.push(o));return n},[k,o,G]),T=e=>{const t=[...o];for(const n of e){const e=n.trim();if(!e)continue;const o=e.toLowerCase(),r=k.find(t=>t.value===e||t.label.toLowerCase()===o)?.value,l=r??(j?e:null);l&&!t.includes(l)&&t.push(l)}t.length!==o.length&&y(t)},z=e=>{e&&!o.includes(e)?(y([...o,e]),M("")):M("")},K=e=>y(o.filter(t=>t!==e)),R=()=>{const e=G.trim();if(W&&e)return T(e.split(W)),void M("");j&&e?z(e):M("")},U=h(()=>{});U.current=()=>{R(),$(!1)},f(()=>{if(!Y)return;const e=e=>{const t=e.target;F.current?.contains(t)||S.current?.contains(t)||(R(),$(!1))};document.addEventListener("mousedown",e);const t=l(()=>U.current());return()=>{document.removeEventListener("mousedown",e),t()}});const Z=k.length>0;/* @__PURE__ */
|
|
2
|
+
return g("div",{ref:F,className:"relative",children:[
|
|
3
|
+
/* @__PURE__ */g("div",{onMouseDown:e=>{L||e.target.closest("button")||(e.preventDefault(),H.current?.focus())},className:n({invalid:C,multiline:!0,className:`flex flex-wrap items-center gap-1 cursor-text focus-within:border-blue-400 has-focus-visible:ring-2 has-focus-visible:ring-[color:var(--rosh-focus-ring)] ${L?"bg-gray-50 cursor-not-allowed":""} ${E}`}),children:[o.map(e=>{const t=B?.(e),n=w[t??"accent"],o=/* @__PURE__ */g("span",{"data-tone":t,className:n.chip,children:[
|
|
4
|
+
/* @__PURE__ */x("span",{className:"truncate",children:I(e)}),!L&&/* @__PURE__ */x("button",{type:"button","aria-label":Q.select.removeItem?.(I(e))??`${Q.select.remove} ${I(e)}`,onClick:()=>K(e),className:n.remove,children:"×"})]},e),l=J?.(e);return null==l?o:/* @__PURE__ */x(r,{content:l,className:"relative inline-flex max-w-full",children:o},e)}),
|
|
5
|
+
/* @__PURE__ */x("input",{id:D,ref:H,type:"text",autoComplete:"off",role:"combobox","aria-expanded":Y&&Z,"aria-invalid":C||void 0,disabled:L,value:G,placeholder:0===o.length?N:void 0,onChange:e=>{(e=>{if(W){const t=e.split(W);if(t.length>1)return T(t.slice(0,-1)),void M(t[t.length-1])}M(e)})(e.target.value),$(!0)},onFocus:()=>{!L&&Z&&$(!0)},onKeyDown:t=>{if("Enter"===t.key||","===t.key&&j){t.preventDefault();const n=G.trim(),o=n?P.filter(t=>e(t,n.toLowerCase())):[];1===o.length?z(o[0].value):R()}else"Backspace"===t.key&&""===G&&o.length>0?K(o[o.length-1]):"Escape"===t.key?($(!1),M(""),H.current?.blur()):"Tab"===t.key&&(R(),$(!1))},className:"min-w-[8ch] flex-1 border-none bg-transparent p-0 text-sm text-ink-strong placeholder:text-[color:var(--ink-placeholder)] rosh-focus-ring focus-visible:ring-0 disabled:cursor-not-allowed"})]}),Y&&Z&&v(
|
|
6
|
+
/* @__PURE__ */x("div",{ref:S,className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:i.popup,left:A?.left,right:A?.right,top:A?.top,bottom:A?.bottom,minWidth:A?.minWidth,maxWidth:A?.maxWidth??a,width:"max-content",visibility:A?void 0:"hidden",...d()},children:/* @__PURE__ */x("div",{className:"overflow-y-auto",style:{maxHeight:A?.maxHeight??c},children:0===P.length?/* @__PURE__ */x("p",{className:"px-3 py-3 text-sm text-gray-400 text-center",children:k.length>0&&o.length>=k.length?Q.select.allSelected:Q.select.noMatches}):P.map(e=>/* @__PURE__ */x("button",{type:"button",onMouseDown:t=>{t.preventDefault(),z(e.value)},className:e.sublabel?"w-full text-left px-3 min-h-(--row-height-menu) py-2 text-sm hover:bg-row-hover text-ink whitespace-nowrap flex items-center justify-between gap-3":"w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm hover:bg-row-hover text-ink whitespace-nowrap",children:e.sublabel?/* @__PURE__ */g(b,{children:[
|
|
7
|
+
/* @__PURE__ */x("span",{className:"min-w-0 truncate",children:e.label}),
|
|
8
|
+
/* @__PURE__ */x(t,{grows:!0,children:e.sublabel})]}):e.label},e.value))})}),document.body)]})}export{y as TagInput};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Card as e}from"./chunk-P3RXXWXN.js";import{Select_default as l}from"./chunk-
|
|
1
|
+
import{Card as e}from"./chunk-P3RXXWXN.js";import{Select_default as l}from"./chunk-M3JNILT2.js";import{FormField as a}from"./chunk-6KBDNYRW.js";import{Checkbox_default as r}from"./chunk-CGZBDI6C.js";import{Banner as i}from"./chunk-ZGOHRLXG.js";import{Input_default as c}from"./chunk-HEGSRTXG.js";import{Button_default as s}from"./chunk-7DI3VQCF.js";import{useState as d}from"react";import{jsx as n,jsxs as t}from"react/jsx-runtime";var h=[{name:"Mechanical keyboard",qty:1,price:129},{name:"USB-C cable (2m)",qty:2,price:12},{name:"Laptop stand",qty:1,price:48}];function m(){const[m,o]=d(!0),[p,u]=d("us"),y=h.reduce((e,l)=>e+l.qty*l.price,0),g=y+9;/* @__PURE__ */
|
|
2
2
|
return n("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */t("div",{className:"mx-auto max-w-5xl space-y-5",children:[
|
|
3
3
|
/* @__PURE__ */n("h1",{className:"text-xl font-semibold text-gray-900",children:"Checkout"}),
|
|
4
4
|
/* @__PURE__ */t("div",{className:"grid grid-cols-1 gap-5 lg:grid-cols-3",children:[
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{usePlotWidth as e}from"./chunk-MAFUXCPZ.js";import{axisGutter as t,radiusScale as i,niceMax as l,logScale as r,linearScale as o}from"./chunk-2JWPNR2U.js";import{ChartTooltip as n}from"./chunk-WDQI3FV6.js";import{CHART_INK as a,resolveSeriesColorWithin as s}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as c}from"./chunk-TWVUQUUD.js";import{useShellStrings as m,useShellLocale as h}from"./chunk-GDQJBQ5B.js";import{formatPlain as f}from"./chunk-C3QOHMR6.js";import{useRef as u,useId as p,useState as d,useEffect as x}from"react";import{jsx as y,jsxs as g}from"react/jsx-runtime";var b=3;function k({series:b,height:k=260,width:v,xLabel:M,yLabel:A,formatX:z,formatY:$,xDomain:j,yDomain:w,xScale:N="linear",yScale:R="linear",radiusRange:D=[4,22],className:S,emptyLabel:U}){const L=m().charts,Q=h(),W=z??(e=>f(e,Q)),B=$??(e=>f(e,Q)),P=U??L.noObservations,V=u(null),C=e(V),E=v??C,F=p(),[I,O]=d(null);x(()=>{if(null!==I)return c(e=>"Escape"===e.key&&(O(null),!0))},[I]);const J=(e,t)=>!t||e>=Math.min(t[0],t[1])&&e<=Math.max(t[0],t[1]),T=b.map((e,t)=>({...e,slot:t})).filter(e=>e.points.length>0),X=j||w?T.map(e=>({...e,points:e.points.filter(e=>J(e.x,j)&&J(e.y,w))})).filter(e=>e.points.length>0):T,Z=T.reduce((e,t)=>e+t.points.length,0)-X.reduce((e,t)=>e+t.points.length,0);if(0===X.length)/* @__PURE__ */
|
|
2
|
+
return y("div",{className:S,ref:V,children:/* @__PURE__ */y("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:k},children:P})});const G=X.flatMap(e=>e.points),H=G.some(e=>null!=e.size),K=14,Y=20,q=34,_=52,ee=(e,t,i,n)=>{const a=e.filter(e=>e>0),s="log"===i?a.length>0?Math.min(...a):0:Math.min(0,...e),c=t??[s,l(Math.max(...e))];return"log"===i?r(c,n):o(c,n)},te=ee(G.map(e=>e.y),w,R,{from:k-q,to:K}),ie=t(te.ticks(5).map(B),_),le=Math.max(ie+1,E-Y),re=ee(G.map(e=>e.x),j,N,{from:ie,to:le}),oe=i([0,Math.max(...G.map(e=>e.size??1))],{from:D[0],to:D[1]}),ne=I?X[I.s]:void 0,ae=I&&ne?ne.points[I.i]:void 0,se=X.flatMap((e,t)=>e.points.map((e,i)=>({s:t,i:i})));/* @__PURE__ */
|
|
3
|
+
return g("div",{className:`relative ${S??""}`,ref:V,children:[
|
|
4
|
+
/* @__PURE__ */g("svg",{width:"100%",height:k,viewBox:`0 0 ${E} ${k}`,role:"img","aria-label":L.scatter(X.map(e=>e.label),A??L.yAxis,M??L.xAxis)+(Z>0?`. ${L.outsideRange(Z)}`:""),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>O(null),onBlur:()=>O(null),onKeyDown:e=>{if("ArrowRight"!==e.key&&"ArrowLeft"!==e.key)return;e.preventDefault();const t="ArrowRight"===e.key?1:-1,i=I?se.findIndex(e=>e.s===I.s&&e.i===I.i):0;O(se[Math.min(se.length-1,Math.max(0,i+t))])},children:[
|
|
5
|
+
/* @__PURE__ */y("defs",{children:/* @__PURE__ */y("clipPath",{id:F,children:/* @__PURE__ */y("rect",{x:ie-D[1],y:K-D[1],width:le-ie+2*D[1],height:k-q-K+2*D[1]})})}),te.ticks(5).map(e=>/* @__PURE__ */g("g",{children:[
|
|
6
|
+
/* @__PURE__ */y("line",{x1:ie,y1:te(e),x2:le,y2:te(e),stroke:a.grid,strokeWidth:1,shapeRendering:"crispEdges"}),
|
|
7
|
+
/* @__PURE__ */y("text",{x:ie-8,y:te(e)+4,textAnchor:"end",fontSize:11,fill:a.label,style:{fontVariantNumeric:"tabular-nums"},children:B(e)})]},`y${e}`)),re.ticks(5).map(e=>/* @__PURE__ */y("text",{x:re(e),y:k-12,textAnchor:"middle",fontSize:11,fill:a.label,style:{fontVariantNumeric:"tabular-nums"},children:W(e)},`x${e}`)),M&&/* @__PURE__ */y("text",{x:(ie+le)/2,y:k-.5,textAnchor:"middle",fontSize:11,fill:a.label,children:M}),A&&/* @__PURE__ */y("text",{x:12,y:k/2,transform:`rotate(-90 12 ${k/2})`,textAnchor:"middle",fontSize:11,fill:a.label,children:A}),
|
|
8
|
+
/* @__PURE__ */y("g",{clipPath:`url(#${F})`,children:X.map((e,t)=>{const i=s(e.slot,3,e.color,e.tone);return e.points.map((l,r)=>/* @__PURE__ */y("circle",{cx:re(l.x),cy:te(l.y),r:H?oe(l.size??0):D[0]+1,fill:i,fillOpacity:I&&I.s!==t?.25:.62,stroke:a.surface,strokeWidth:2,onMouseEnter:()=>O({s:t,i:r})},`${e.key}-${r}`))})})]}),I&&ne&&ae&&/* @__PURE__ */y("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */y(n,{title:ae.label??ne.label,rows:[{key:"x",label:M??L.xAxis,color:s(ne.slot,3,ne.color,ne.tone),value:W(ae.x)},{key:"y",label:A??L.yAxis,color:s(ne.slot,3,ne.color,ne.tone),value:B(ae.y)},...null!=ae.size?[{key:"size",label:L.size,color:a.muted,value:f(ae.size,Q)}]:[]],footnote:ae.label?ne.label:void 0})})]})}export{b as SCATTER_SERIES_CAP,k as ScatterChart};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{DropdownMenu as e}from"./chunk-WUAKIM2B.js";import{inputClasses as r,PLACEHOLDER_INK as n}from"./chunk-AYZY3YNC.js";import{IconButton_default as t}from"./chunk-VCMHBUKI.js";import{iconButtonClasses as i}from"./chunk-UQYNPYF4.js";import{Tooltip as a}from"./chunk-QQ2LDC6C.js";import{forwardRef as s}from"react";import{jsx as o,jsxs as l}from"react/jsx-runtime";var c={sm:"sm",md:"sm",lg:"md",touch:"touch-sm"},m={sm:"pr-8",md:"pr-8",lg:"pr-10",touch:"pr-12"};function p({children:e}){/* @__PURE__ */
|
|
2
|
+
return o("span",{className:"absolute right-1 top-1/2 flex -translate-y-1/2 items-center gap-1",children:e})}function d({action:e,size:r="md"}){/* @__PURE__ */
|
|
3
|
+
return o(h,{action:e,size:c[r]})}var u=["","pr-8","pr-16"];function h({action:r,size:n}){const{label:s,icon:l,onClick:c,menu:m}=r;/* @__PURE__ */
|
|
4
|
+
return o(a,{content:s,describe:!1,children:m?/* @__PURE__ */o(e,{"aria-label":s,trigger:l,items:m,triggerClassName:i({size:n})}):/* @__PURE__ */o(t,{"aria-label":s,size:n,onClick:c,children:l})})}var f=s(function({invalid:e,leftIcon:t,rightAdornment:i,endAction:a,size:s,className:c="",readOnly:u,...h},f){const g=s??"md",v=`${t?"pl-10":""} ${a?m[g]:i?"pr-10":""}`.trim(),N=
|
|
5
|
+
/* @__PURE__ */o("input",{ref:f,"aria-invalid":e||void 0,readOnly:u,className:r({invalid:e,size:s,readOnly:u,className:[v,c].filter(Boolean).join(" ")}),...h});return t||i||a?/* @__PURE__ */l("div",{className:"relative",children:[t&&/* @__PURE__ */o("span",{className:`pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 ${n}`,children:t}),N,a?/* @__PURE__ */o(p,{children:/* @__PURE__ */o(d,{action:a,size:g})}):i&&/* @__PURE__ */o("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400",children:i})]}):N});export{u as END_ACTIONS_PAD,c as INPUT_END_ACTION_SIZE,d as InputEndActionButton,p as InputEndActionSlot,f as Input_default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Card as e}from"./chunk-P3RXXWXN.js";import{FormField as t}from"./chunk-6KBDNYRW.js";import{Checkbox_default as r}from"./chunk-CGZBDI6C.js";import{Input_default as l}from"./chunk-
|
|
1
|
+
import{Card as e}from"./chunk-P3RXXWXN.js";import{FormField as t}from"./chunk-6KBDNYRW.js";import{Checkbox_default as r}from"./chunk-CGZBDI6C.js";import{Input_default as l}from"./chunk-HEGSRTXG.js";import{Button_default as a}from"./chunk-7DI3VQCF.js";import{useState as i}from"react";import{jsx as c,jsxs as n,Fragment as s}from"react/jsx-runtime";var o={login:{title:"Welcome back",subtitle:"Sign in to your account",cta:"Sign in"},register:{title:"Create your account",subtitle:"Start your 14-day free trial",cta:"Create account"},forgot:{title:"Reset password",subtitle:"We'll email you a reset link",cta:"Send reset link"}};function m({mode:m="login"}){const[u,d]=i(!0),h=o[m];/* @__PURE__ */
|
|
2
2
|
return c("div",{className:"flex h-full items-center justify-center overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */n("div",{className:"w-full max-w-sm",children:[
|
|
3
3
|
/* @__PURE__ */n("div",{className:"mb-6 text-center",children:[
|
|
4
4
|
/* @__PURE__ */c("div",{className:"mx-auto mb-3 flex h-10 w-10 items-center justify-center rounded-lg bg-blue-600 text-sm font-bold text-white",children:"A"}),
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{AccessibleTable as t}from"./chunk-EYPKBJYG.js";import{arcPath as e}from"./chunk-VFC6QUEN.js";import{useHighlight as o}from"./chunk-CNYAHYE6.js";import{ChartTooltip as n}from"./chunk-WDQI3FV6.js";import{CHART_INK as r,resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as l,useShellLocale as i}from"./chunk-GDQJBQ5B.js";import{formatPlain as s}from"./chunk-C3QOHMR6.js";import{useState as c}from"react";import{jsx as d,jsxs as m}from"react/jsx-runtime";function h(t,e,o,n){const r=(t,o)=>{const n=e[t]?.[o];return"number"==typeof n&&Number.isFinite(n)?n:0},a=t.map((e,o)=>t.reduce((t,e,n)=>t+r(o,n)+r(n,o),0)),l=Math.max(2,o),i=t.length>l,s=i?t.map((t,e)=>e).sort((t,e)=>a[e]-a[t]).slice(0,l-1).sort((t,e)=>t-e):t.map((t,e)=>e),c=new Map(s.map((t,e)=>[t,e])),d=i?s.length:-1,m=i?[...s.map(e=>t[e]),n]:[...t],h=m.map(()=>m.map(()=>0));let u=0;t.forEach((e,o)=>t.forEach((t,e)=>{const n=c.get(o)??d,a=c.get(e)??d;n!==d||a!==d?h[n][a]+=r(o,e):u+=r(o,e)}));const f=m.map((t,e)=>m.reduce((t,o,n)=>t+h[e][n]+h[n][e],0));return d>=0&&(f[d]+=u),{labels:m,matrix:h,totals:f,otherIndex:d,foldedCount:i?t.length-s.length:0}}function u({labels:u,matrix:f,size:p=340,maxNodes:x=8,padAngle:g=.04,arcWidth:b=12,formatValue:k,className:v,emptyLabel:M}){const $=l().charts,w=i(),N=k??(t=>s(t,w)),j=M??$.noFlows,[y,E]=c(null),{highlighted:F}=o(),C=h(u,f,x,$.other),{labels:Q,matrix:I,otherIndex:z,foldedCount:A}=C,B=(t,e)=>I[t]?.[e]??0,Y=t=>t===z?r.muted:a(t),L=C.totals,O=Q.map((t,e)=>e).sort((t,e)=>L[e]-L[t]),P=O.reduce((t,e)=>t+L[e],0);if(P<=0)/* @__PURE__ */return d("p",{className:`text-sm text-gray-500 ${v??""}`,children:j});const V=p/2,W=p/2,D=p/2-44,G=D-b,H=g*O.length,J=/* @__PURE__ */new Map;let R=-Math.PI/2;O.forEach((t,e)=>{const o=L[t]/P*(2*Math.PI-H);J.set(t,{start:R,end:R+o,slot:e}),R+=o+g});const T=/* @__PURE__ */new Map,U=[];for(const t of O)for(const e of O){const o=B(t,e);if(o<=0)continue;const n=J.get(t),r=o/Math.max(1,L[t])*(n.end-n.start),a=T.get(t)??0;T.set(t,a+r),U.push({from:t,to:e,value:o,a:n.start+a+r/2,b:J.get(e).start+(J.get(e).end-J.get(e).start)/2})}const K=(t,e)=>[V+e*Math.cos(t),W+e*Math.sin(t)],S="arc"===y?.kind?y.index:void 0,Z="ribbon"===y?.kind?U[y.index]:void 0;/* @__PURE__ */
|
|
2
|
+
return m("div",{className:`relative ${v??""}`,children:[
|
|
3
|
+
/* @__PURE__ */m("svg",{width:"100%",height:p,viewBox:`0 0 ${p} ${p}`,role:"img","aria-label":$.chord(O.length),onMouseLeave:()=>E(null),children:[U.map((t,e)=>{const[o,n]=K(t.a,G),[r,a]=K(t.b,G),l=Y(t.from),i=((t,e)=>y?"ribbon"===y.kind?y.index===e:y.index===t.from||y.index===t.to:null!==F?Q[t.from]===F||Q[t.to]===F:null)(t,e);/* @__PURE__ */
|
|
4
|
+
return d("path",{d:`M${o},${n} Q${V},${W} ${r},${a}`,fill:"none",stroke:l,strokeWidth:Math.max(1,t.value/P*p*.9),strokeOpacity:null===i||i?.34:.07,strokeLinecap:"round",onMouseEnter:()=>E({kind:"ribbon",index:e})},`${Q[t.from]}→${Q[t.to]}`)}),O.map(t=>{const o=J.get(t),n=(o.start+o.end)/2,[a,l]=K(n,D+16),i=(t=>y?"arc"===y.kind?y.index===t:U[y.index].from===t||U[y.index].to===t:null!==F?Q[t]===F:null)(t);/* @__PURE__ */
|
|
5
|
+
return m("g",{onMouseEnter:()=>E({kind:"arc",index:t}),children:[
|
|
6
|
+
/* @__PURE__ */d("path",{d:e(V,W,G,D,o.start,o.end),fill:Y(t),fillOpacity:null===i||i?1:.45}),
|
|
7
|
+
/* @__PURE__ */d("text",{x:a,y:l+4,fontSize:11,fill:r.label,textAnchor:Math.cos(n)>.15?"start":Math.cos(n)<-.15?"end":"middle",children:Q[t]})]},t)})]}),A>0&&/* @__PURE__ */d("p",{className:"mt-1 text-xs text-ink-faint",children:$.chordFolded(A)}),void 0!==S&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:Q[S],rows:[{key:"total",label:$.totalFlow,color:Y(S),value:N(L[S])}]})}),Z&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:`${Q[Z.from]} → ${Q[Z.to]}`,rows:[{key:"value",label:$.flow,color:Y(Z.from),value:N(Z.value)}]})}),
|
|
8
|
+
/* @__PURE__ */d(t,{caption:$.chord(O.length),head:[$.tableFrom,$.tableTo,$.value],rows:U.map(t=>[Q[t.from],Q[t.to],N(t.value)])})]})}export{u as ChordChart,h as foldChord};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{OneLineLabel as t}from"./chunk-
|
|
1
|
+
import{OneLineLabel as t}from"./chunk-CJH2BGXY.js";import{createContext as s,useContext as a,useCallback as r}from"react";import{jsx as o}from"react/jsx-runtime";var e="inline-flex max-w-full items-center whitespace-nowrap rounded-full",n={success:"bg-[var(--status-success-soft)] text-[color:var(--status-success-soft-ink)]",active:"bg-[var(--status-active-soft)] text-[color:var(--status-active-soft-ink)]",queued:"bg-[var(--status-queued-soft)] text-[color:var(--status-queued-soft-ink)]",info:"bg-[var(--status-info-soft)] text-[color:var(--status-info-soft-ink)]",pending:"bg-[var(--status-pending-soft)] text-[color:var(--status-pending-soft-ink)]",warning:"bg-[var(--status-warning-soft)] text-[color:var(--status-warning-soft-ink)]",danger:"bg-[var(--status-danger-soft)] text-[color:var(--status-danger-soft-ink)]",draft:"bg-[var(--status-draft-soft)] text-[color:var(--status-draft-soft-ink)]",neutral:"bg-[var(--status-neutral-soft)] text-[color:var(--status-neutral-soft-ink)]"},u={success:"bg-[var(--status-success-solid)] text-[color:var(--status-on-solid)]",active:"bg-[var(--status-active-solid)] text-[color:var(--status-on-solid)]",queued:"bg-[var(--status-queued-solid)] text-[color:var(--status-on-solid)]",info:"bg-[var(--status-info-solid)] text-[color:var(--status-on-solid)]",pending:"bg-[var(--status-pending-solid)] text-[color:var(--status-on-solid)]",warning:"bg-[var(--status-warning-solid)] text-[color:var(--status-on-solid)]",danger:"bg-[var(--status-danger-solid)] text-[color:var(--status-on-solid)]",draft:"bg-[var(--status-draft-solid)] text-[color:var(--status-on-solid)]",neutral:"bg-[var(--status-neutral-solid)] text-[color:var(--status-on-solid)]"};function i(t,s="subtle"){return"solid"===s?u[t]:n[t]}var l=s({}),c=s(void 0);function d(t){return t.replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase())}function v({groups:t,labelFor:s,children:a}){/* @__PURE__ */
|
|
2
2
|
return o(l.Provider,{value:t,children:/* @__PURE__ */o(c.Provider,{value:s,children:a})})}function f(){const t=a(c);return r(s=>t?.(s)??d(s),[t])}function g({status:s,label:r,emphasis:n="subtle"}){const u=i(a(l)[s]??"neutral",n),v=a(c),f=r??v?.(s)??d(s);/* @__PURE__ */
|
|
3
3
|
return o("span",{className:`${e} px-3 py-0.5 text-xs font-medium ${u}`,children:/* @__PURE__ */o(t,{children:f})})}export{e as BADGE_PILL,n as GROUP_COLORS,u as GROUP_COLORS_SOLID,g as StatusBadge,v as StatusBadgeProvider,i as groupColors,f as useStatusLabel};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{choiceTrackClass as e,choiceTipClass as l,ChoiceContent as a,choiceItemClass as i}from"./chunk-JDQGHQ2C.js";import{Tooltip as r}from"./chunk-
|
|
2
|
-
return n("div",b?{role:"radiogroup",...
|
|
1
|
+
import{choiceTrackClass as e,choiceTipClass as l,ChoiceContent as a,choiceItemClass as i}from"./chunk-JDQGHQ2C.js";import{Tooltip as r}from"./chunk-QQ2LDC6C.js";import{useId as s}from"react";import{jsx as n,jsxs as o}from"react/jsx-runtime";function t({value:t,onChange:c,options:d,name:b,size:u="md",block:m=!1,label:h,className:p="","aria-labelledby":v,"aria-describedby":f}){const g={"aria-label":v?void 0:h,"aria-labelledby":v,"aria-describedby":f},N=s(),y=e(m,p),k=l(m);/* @__PURE__ */
|
|
2
|
+
return n("div",b?{role:"radiogroup",...g,className:y,children:d.map(e=>{const l=`${N}-${e.value}`,s=e.value===t,d=/* @__PURE__ */o("label",{htmlFor:l,className:i({size:u,selected:s,disabled:e.disabled,block:m}),children:[
|
|
3
3
|
/* @__PURE__ */n("input",{id:l,type:"radio",name:b,value:e.value,checked:s,disabled:e.disabled,"aria-describedby":e.title?`${l}-note`:void 0,onChange:()=>c(e.value),className:"absolute inset-0 m-0 h-full w-full appearance-none rounded-[inherit] bg-transparent cursor-[inherit] rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]"}),
|
|
4
|
-
/* @__PURE__ */n(a,{icon:e.icon,label:e.label}),e.title&&/* @__PURE__ */n("span",{id:`${l}-note`,className:"sr-only",children:e.title})]},e.value);return e.title?/* @__PURE__ */n(r,{content:e.title,className:k,children:d},e.value):d})}:{role:"group",...
|
|
4
|
+
/* @__PURE__ */n(a,{icon:e.icon,label:e.label}),e.title&&/* @__PURE__ */n("span",{id:`${l}-note`,className:"sr-only",children:e.title})]},e.value);return e.title?/* @__PURE__ */n(r,{content:e.title,className:k,children:d},e.value):d})}:{role:"group",...g,className:y,children:d.map(e=>{const l=e.value===t,s=/* @__PURE__ */n("button",{type:"button","aria-pressed":l,disabled:e.disabled,onClick:()=>c(e.value),className:i({size:u,selected:l,disabled:e.disabled,block:m}),children:/* @__PURE__ */n(a,{icon:e.icon,label:e.label})},e.value);return e.title?/* @__PURE__ */n(r,{content:e.title,className:k,children:s},e.value):s})})}export{t as Segmented};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{MediaUploadField as e}from"./chunk-
|
|
2
|
-
return n("section",{"aria-label":
|
|
1
|
+
import{MediaUploadField as e}from"./chunk-OONJ43CQ.js";import{BrandMark as r}from"./chunk-MI67DI3H.js";import{Button_default as a}from"./chunk-7DI3VQCF.js";import{useShellStrings as t}from"./chunk-GDQJBQ5B.js";import{useRef as i,useState as l,useEffect as s}from"react";import{jsxs as n,jsx as c}from"react/jsx-runtime";function d({committedUrl:d,committedHasAlpha:o=null,committedIsLight:m=null,fallbackUrl:g,fallbackHasAlpha:h=null,fallbackIsLight:u=null,subjectName:b,assetName:p,onSave:x,onRemove:f,accept:v="image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",acceptHint:y="PNG · ICO · SVG · JPG · WEBP",maxBytes:N=5242880,previews:w=[],disabled:k=!1}){const j=i(null),[L,R]=l(null),[U,C]=l(""),[I,O]=l(""),[B,F]=l(!1),[H,A]=l(!1),G=function(e){return e.trim().toLocaleLowerCase().split(/\s+/).at(-1)||"image"}(p),Q=t().brandAsset,D=U||d||g||"",E=L?null:d?o:h,J=L?null:d?m:u;s(()=>()=>{j.current&&URL.revokeObjectURL(j.current)},[]);const P=()=>{j.current&&(URL.revokeObjectURL(j.current),j.current=null)};/* @__PURE__ */
|
|
2
|
+
return n("section",{"aria-label":Q.region(p,b),className:"grid gap-4 lg:grid-cols-2",children:[
|
|
3
3
|
/* @__PURE__ */n("div",{className:"rounded-lg border border-gray-200 bg-white p-4",children:[
|
|
4
|
-
/* @__PURE__ */c(e,{value:
|
|
4
|
+
/* @__PURE__ */c(e,{value:D,onChange:()=>{},onFile:e=>{if(k)return;P();const r=URL.createObjectURL(e);j.current=r,R(e),C(r),O("")},label:p,hint:I||Q.usedFor(b),error:I||void 0,accept:v,acceptHint:y,maxSizeBytes:N,fit:"contain",height:180,allowRemove:!1,busy:B||H,disabled:k}),
|
|
5
5
|
/* @__PURE__ */n("div",{className:"mt-3 flex flex-wrap gap-2",children:[
|
|
6
|
-
/* @__PURE__ */c(a,{onClick:async()=>{if(L&&!k&&!
|
|
7
|
-
/* @__PURE__ */c("h3",{className:"text-sm font-semibold text-gray-900",children:
|
|
8
|
-
/* @__PURE__ */c("div",{className:"mt-3 grid gap-3",children:w.map(e=>{const a=/* @__PURE__ */c(r,{src:
|
|
6
|
+
/* @__PURE__ */c(a,{onClick:async()=>{if(L&&!k&&!B){F(!0),O("");try{await x(L),P(),R(null),C("")}catch(e){O(e instanceof Error?e.message:Q.saveFailed(G,p))}finally{F(!1)}}},disabled:!L||k,loading:B,children:Q.save(G,p)}),(L||d)&&/* @__PURE__ */c(a,{variant:"ghost-danger",onClick:async()=>{if(!k&&!H){if(L)return P(),R(null),C(""),void O("");if(d){A(!0),O("");try{await f()}catch(e){O(e instanceof Error?e.message:Q.removeFailed(G,p))}finally{A(!1)}}}},disabled:k,loading:H,children:L?Q.discard:Q.remove(G,p)})]})]}),w.length>0&&/* @__PURE__ */n("div",{className:"rounded-lg border border-gray-200 bg-white p-4","aria-label":Q.previews(p),children:[
|
|
7
|
+
/* @__PURE__ */c("h3",{className:"text-sm font-semibold text-gray-900",children:Q.preview}),
|
|
8
|
+
/* @__PURE__ */c("div",{className:"mt-3 grid gap-3",children:w.map(e=>{const a=/* @__PURE__ */c(r,{src:D,alt:Q.alt(b,p),slot:e.slot,surface:e.surface,adaptive:!0,hasAlpha:E,isLight:J,size:"browser-tab"===e.kind?16:void 0});/* @__PURE__ */
|
|
9
9
|
return n("div",{"data-brand-preview":!0,className:"dark"===e.surface?"text-white":"text-gray-900",children:[
|
|
10
10
|
/* @__PURE__ */c("div",{className:"mb-2 text-xs font-medium text-gray-500",children:e.label}),"browser-tab"===e.kind?/* @__PURE__ */n("div",{className:"flex items-end gap-1 border-b border-gray-200",children:[
|
|
11
11
|
/* @__PURE__ */n("div",{className:"flex max-w-[220px] items-center gap-2 rounded-t-lg border border-b-0 border-gray-200 bg-white px-3 py-2",children:[a,
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{TEXT_ALIGNS as e,textAlignWords as l,textAlignIcon as r}from"./chunk-4EZIWLJJ.js";import{IconButton_default as a}from"./chunk-VCMHBUKI.js";import{Icon as o}from"./chunk-2UO47XB4.js";import{Tooltip as n}from"./chunk-QQ2LDC6C.js";import{useShellStrings as s}from"./chunk-GDQJBQ5B.js";import{jsx as i,jsxs as t,Fragment as d}from"react/jsx-runtime";var c=e=>e.preventDefault(),u=e=>null!=e&&!1!==e,h=["bold","italic","underline","strike","link","sup","sub","code"];function p(e,l,r){const a={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1,Home:"first",End:"last"}[e.key];if(void 0===a||0===l.length)return;const o=[...e.currentTarget.querySelectorAll('[role="radio"]')],n=o.findIndex(l=>l===e.target||l.contains(e.target));if(n<0)return;e.preventDefault();const s=o.length,i="first"===a?0:"last"===a?s-1:(n+a+s)%s;o[i].disabled||(r(l[i]),o[i].focus())}function b(e,l){const r=["bold","italic","underline","strike"].filter(l=>e.has(l)).length;return{color:r,link:r+(l?1:0)}}function m(e,l,r,a){const o=h.filter(l=>"link"!==l&&e.has(l)).length+(l?1:0);return r&&0!==o?a>0?"paragraph":"words":null}function w({offered:l,color:r,last:a,alignment:o,list:n,letterCase:s,clear:i}){let t=h.filter(e=>l.has(e)).length+(r?1:0)+(u(a)?1:0),d=(o?e.filter(e=>o.allow.includes(e)).length:0)+(n&&l.has("bullet")?1:0)+(n&&l.has("number")?1:0)+(l.has("quote")?1:0)+(s?3:0);const c=m(l,r,i,d);return"paragraph"===c&&(d+=1),"words"===c&&(t+=1),{words:t>0,paragraph:d>0,oneRow:t>0&&d>0&&t+1+d<=9,flow:t>0&&d>0&&t+1+d>9&&t<=7,cells:{words:t,paragraph:d}}}function g(e,l){/* @__PURE__ */
|
|
2
|
+
return i(n,{content:e,children:l},l.key??void 0)}function f({offered:n,pressed:h,onMark:f,color:k,linkOpen:v=!1,last:N,alignment:C,list:D,letterCase:M,clear:x,disabled:y=!1,"aria-label":B,windows:j,className:I="",layout:L="grid"}){const q=s().textToolbar,A=w({offered:n,color:k,last:N,alignment:C,list:D,letterCase:M,clear:x});if(!A.words&&!A.paragraph)return null;const U=m(n,k,x,A.cells.paragraph),$=(e,l="")=>`rosh-tb-btn${e?" is-on":""}${l?` ${l}`:""}`,K=(e,l,r,o)=>n.has(e)?g(l,/* @__PURE__ */i(a,"link"===e?{pressed:v,className:$(v),"aria-label":l,"aria-haspopup":"dialog","aria-expanded":v,"aria-keyshortcuts":o,disabled:y,onMouseDown:c,onClick:()=>f(e),children:r}:{className:$(Boolean(h[e])),"aria-label":l,"aria-pressed":Boolean(h[e]),"aria-keyshortcuts":o,disabled:y,onMouseDown:c,onClick:()=>f(e),children:r},e)):null,Q=l(q),R=e.map(e=>[e,Q[e],r(e)]),S=C?e.filter(e=>C.allow.includes(e)):[],J=C&&S.includes(C.value)?C.value:S[0],T=[["none",q.caseNone,/* @__PURE__ */i(o,{name:"case-normal"})],["upper",q.caseUpper,/* @__PURE__ */i(o,{name:"case-upper"})],["lower",q.caseLower,/* @__PURE__ */i(o,{name:"case-lower"})]],E=x&&U?g(q.clear,/* @__PURE__ */i(a,{className:$(!1),"aria-label":q.clear,disabled:y,onMouseDown:c,onClick:x.onClear,children:/* @__PURE__ */i(o,{name:"revert"})},"clear")):null,H=/* @__PURE__ */t(d,{children:[K("bold",q.bold,/* @__PURE__ */i(o,{name:"bold"}),"Meta+B"),K("italic",q.italic,/* @__PURE__ */i(o,{name:"italic"}),"Meta+I"),K("underline",q.underline,/* @__PURE__ */i(o,{name:"underline"}),"Meta+U"),K("strike",q.strike,/* @__PURE__ */i(o,{name:"strike"})),k?g(q.color,/* @__PURE__ */i(a,{pressed:k.open,className:$(k.open,"rosh-tb-color"),"aria-label":q.color,"aria-haspopup":"dialog","aria-expanded":k.open,disabled:y,style:k.run?{"--rosh-tb-run":k.run}:void 0,onMouseDown:c,onClick:k.onToggle,children:/* @__PURE__ */i(o,{name:"text-color"})},"color")):null,K("link",q.link,/* @__PURE__ */i(o,{name:"link"}),"Meta+K"),K("sup",q.sup,/* @__PURE__ */i(o,{name:"superscript"})),K("sub",q.sub,/* @__PURE__ */i(o,{name:"subscript"})),K("code",q.code,/* @__PURE__ */i(o,{name:"code"})),u(N)?N:null,"words"===U?E:null]}),O=/* @__PURE__ */t(d,{children:[C&&S.length>0?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":q.alignment,onKeyDown:e=>p(e,S,e=>C.onChange(e)),children:R.map(([e,l,r])=>C.allow.includes(e)?g(l,/* @__PURE__ */i(a,{role:"radio",pressed:C.value===e,className:$(C.value===e),"aria-checked":C.value===e,"aria-label":l,tabIndex:e===J?0:-1,disabled:y||C.disabled,onMouseDown:c,onClick:()=>C.onChange(e),children:r},e)):null)}):null,D&&n.has("bullet")?g(q.bullet,/* @__PURE__ */i(a,{className:$("bullet"===D.pressed),"aria-label":q.bullet,"aria-pressed":"bullet"===D.pressed,disabled:y,onMouseDown:c,onClick:()=>D.onList("bullet"),children:/* @__PURE__ */i(o,{name:"list"})},"bullet")):null,D&&n.has("number")?g(q.number,/* @__PURE__ */i(a,{className:$("number"===D.pressed),"aria-label":q.number,"aria-pressed":"number"===D.pressed,disabled:y,onMouseDown:c,onClick:()=>D.onList("number"),children:/* @__PURE__ */i(o,{name:"numbered-list"})},"number")):null,K("quote",q.quote,/* @__PURE__ */i(o,{name:"quote"})),M?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":q.letterCase,onKeyDown:e=>p(e,T.map(([e])=>e),e=>M.onChange(e)),children:T.map(([e,l,r])=>g(l,/* @__PURE__ */i(a,{role:"radio",pressed:M.value===e,className:$(M.value===e),"aria-checked":M.value===e,"aria-label":l,tabIndex:e===(M.value||"none")?0:-1,disabled:y||M.disabled,onMouseDown:c,onClick:()=>M.onChange(M.value===e?"":e),children:r},e)))}):null,"paragraph"===U?E:null]}),G="row"===L,V=G?" is-row":A.flow?" is-flow":A.oneRow?" is-one-row":A.words&&void 0===N&&"words"!==U?" is-eight":"",W=b(n,Boolean(k)),X={"--rosh-tb-color-col":String(W.color),"--rosh-tb-link-col":String(W.link),...G?{"--rosh-tb-cells":String(A.cells.words+A.cells.paragraph),"--rosh-tb-groupgap":A.words&&A.paragraph?"var(--space-8, 0.5rem)":"0px"}:{}};let Z;return Z=G?/* @__PURE__ */t("div",{className:"rosh-tb-row is-row",children:[A.words?/* @__PURE__ */i("div",{className:"rosh-tb-words",children:H}):null,A.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-para",children:O}):null]}):A.flow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-flow",children:[H,
|
|
3
|
+
/* @__PURE__ */i("span",{className:"rosh-tb-flowgap","aria-hidden":"true"}),O]}):A.oneRow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-one-row",children:[
|
|
4
|
+
/* @__PURE__ */i("div",{className:"rosh-tb-words",children:H}),
|
|
5
|
+
/* @__PURE__ */i("div",{className:"rosh-tb-para",children:O})]}):/* @__PURE__ */t(d,{children:[A.words?/* @__PURE__ */i("div",{className:"rosh-tb-row"+(void 0===N&&"words"!==U?" is-eight":""),children:H}):null,A.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-row",children:O}):null]}),/* @__PURE__ */t("div",{className:`rosh-tb-wrap${V} ${I}`.trim(),style:X,children:[
|
|
6
|
+
/* @__PURE__ */i("div",{className:"rosh-tb",role:"toolbar","aria-label":B??q.formatting,children:Z}),j]})}export{f as TextToolbar,w as textToolbarRows,b as textToolbarWindowColumns};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import{SearchableSelect as e}from"./chunk-EZYRHBOP.js";import{labelClasses as a}from"./chunk-EQKUFYX6.js";import{Select_default as l}from"./chunk-M3JNILT2.js";import{isSafeLinkHref as t}from"./chunk-Q5Z3KHT2.js";import{Input_default as n}from"./chunk-HEGSRTXG.js";import{INPUT_SIZES as r}from"./chunk-AYZY3YNC.js";import{Button_default as i}from"./chunk-7DI3VQCF.js";import{Icon as o}from"./chunk-2UO47XB4.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as u}from"./chunk-GDQJBQ5B.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},k=e=>t(e.trim());function y(t){const{value:r,kinds:o,rules:y=x,filtersFor:w,label:N,readOnly:C,placeholder:O,className:j=""}=t,F=void 0!==t.onApply,$=u().link,E=y.isSafe??k,z=d(),Q=c(null),T=c(null),[D,U]=p({url:r}),Y=F?D.url:r,[A,B]=p(!1),[H,P]=p(null),[R,G]=p(null),K=c(()=>{});K.current=F?t.onCancel:()=>{},m(()=>{if(F)return s(e=>{const a=Q.current;return!!("Escape"===e.key&&a&&e.target instanceof Node&&a.contains(e.target))&&(K.current(),!0)},()=>Q.current)},[F]),m(()=>{if(!F)return;const e=T.current;e?(e.focus(),e.select()):Q.current?.querySelector("button, input")?.focus()},[]);const L=o??[{value:b,label:$.address,target:{type:"text"}}],M=H&&H.against===Y?H.kind:y.kindOf(Y),S=L.filter(e=>!e.hideWhenEmpty||h(e.target).length>0||e.value===M),W=S.find(e=>"text"===e.target.type),X=S.find(e=>e.value===M)??W??S[0];if(!X)return null;const Z="text"!==X.target.type,I=Z?y.targetOf(Y):Y,J=h(X.target),V=J.find(e=>e.value===I),q=e=>({value:e,label:$.unavailable(e)}),_="select"===X.target.type&&I&&w?w(I):null,ee=_?y.readFilter(Y):null,ae=ee?_?.find(e=>e.param===ee.param):void 0,le=R&&R.against===Y?R.text:Y,te=!Z&&""!==le.trim()&&!E(le),ne=te&&(!F||A),re=(e,a)=>{F?U({url:e,name:a}):void 0===a?t.onChange(e):t.onChange(e,a)},ie=(e,a)=>{P(a=>a?{...a,against:e}:a),re(e,a)},oe=e=>{if(!e)return ie("");const a=J.find(a=>a.value===e);ie(e,a?.label)},se=Z?Y:le.trim(),ue=()=>{if(!F||!se)return;if(!Z&&te)return void B(!0);const e=Z&&D.url===se?D.name:void 0,a=t.onApply;void 0===e?a(se):a(se,e)},de=(e,a)=>a&&!e.some(e=>e.value===a)?[q(a),...e]:[...e],ce=(a,t,n,r,i)=>{const o=[];for(const e of n){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 l=n.some(e=>""===e.value);/* @__PURE__ */
|
|
2
|
+
return f(e,{"aria-label":a,value:t,options:o,disabled:C,clearable:l,placeholder:n.find(e=>""===e.value)?.label,onChange:r})}/* @__PURE__ */
|
|
3
|
+
return f(l,{size:"sm","aria-label":a,value:t,options:o,readOnly:C,onChange:r})};let pe;if("text"===X.target.type)pe=/* @__PURE__ */f(n,{ref:T,id:`${z}-address`,size:"sm",type:"text",invalid:ne,"aria-label":$.address,"aria-describedby":ne?`${z}-why`:void 0,placeholder:O??$.addressPlaceholder,spellCheck:!1,autoComplete:"off",value:le,readOnly:C,onChange:e=>(e=>{B(!1);const a=e.trim();a?E(e)?(G({text:e,against:a}),ie(a)):G({text:e,against:Y}):(G({text:e,against:""}),ie(""))})(e.target.value)});else{const e="groups"===X.target.type?X.target.groups.flatMap(e=>e.options.map(a=>({value:a.value,label:a.label,group:e.label}))):X.target.options.map(e=>({value:e.value,label:e.label})),a=[{value:"",label:X.target.placeholder},...de(e,I)];pe=ce(X.label,I,a,oe,e.length>10)}const me=/* @__PURE__ */v(g,{children:[o&&ce($.linkType,X.value,S.map(e=>({value:e.value,label:e.label})),e=>{G(null),B(!1);const a=S.find(a=>a.value===e);if(!a||"text"===a.target.type)return void P({kind:e,against:Y});const l=h(a.target)[0];P({kind:e,against:l?l.value:""}),l?re(l.value,l.label):re("")},!1),pe,_&&ce($.filter,ee?.param??"",[{value:"",label:$.noFilter},...ee&&!ae?[q(ee.param)]:[],..._.map(e=>({value:e.param,label:e.label}))],e=>{if(!e)return ie(I,V?.label);const a=_?.find(a=>a.param===e),l=a?.values[0];l&&ie(y.withFilter(I,{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(y.withFilter(I,{param:ee.param,value:e}),a?.label)},(ae?.values.length??0)>10),ne&&/* @__PURE__ */f("p",{id:`${z}-why`,role:"alert",className:"text-2xs leading-4 text-red-600",children:$.unsafe}),X.hint&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:X.hint}),_&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:$.filterHint})]});if(!F)/* @__PURE__ */
|
|
4
|
+
return f("div",{ref:Q,className:`flex min-w-0 flex-auto flex-col gap-2 ${j}`.trim(),role:N?"group":void 0,"aria-label":N,children:me});const fe=t.onRemove;/* @__PURE__ */
|
|
5
|
+
return v("div",{ref:Q,role:"dialog","aria-label":N??$.title,className:`flex min-w-0 flex-col gap-2 rounded-xl border border-line bg-surface p-3 shadow-lg ${j}`.trim(),onKeyDown:e=>{"Enter"!==e.key||e.defaultPrevented||e.target instanceof Element&&e.target.closest("button")||(e.preventDefault(),ue())},children:[Z?/* @__PURE__ */f("span",{className:a({inline:!0}),children:$.title}):/* @__PURE__ */f("label",{htmlFor:`${z}-address`,className:a({inline:!0}),children:$.title}),me,
|
|
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
|
+
/* @__PURE__ */v("span",{className:"ml-auto flex gap-1",children:[
|
|
8
|
+
/* @__PURE__ */f(i,{variant:"secondary",size:"sm","data-window-action":"cancel",onClick:()=>K.current(),children:$.cancel}),
|
|
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:l,link:t,onLinkChange:i,kinds:s,rules:m,filtersFor:g,textPlaceholder:h,readOnly:b,className:x=""}){const k=u().link,[w,N]=p(!1),C=c(null),O=d(),j=()=>{N(!1),C.current?.focus()};/* @__PURE__ */
|
|
10
|
+
return v("div",{className:`flex min-w-0 flex-auto flex-col ${x}`.trim(),children:[
|
|
11
|
+
/* @__PURE__ */f(n,{size:"md",type:"text",className:"rounded-b-none","aria-label":k.text(e),placeholder:h,value:a,readOnly:b,onChange:e=>l(e.target.value)}),
|
|
12
|
+
/* @__PURE__ */v("button",{ref:C,type:"button","aria-label":k.linkOf(e,t),"aria-expanded":w,"aria-controls":w?O:void 0,disabled:b,onClick:()=>N(e=>!e),className:`flex w-full min-w-0 items-center gap-2 rounded-b-(--radius-control) border border-t-0 border-line-strong bg-surface-sunken ${r.md} text-left hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)] disabled:cursor-not-allowed disabled:opacity-60`,children:[
|
|
13
|
+
/* @__PURE__ */f(o,{name:"link",strokeWidth:1.5,className:"h-4 w-4 shrink-0 "+(t?"text-blue-600":"text-ink-faintest")}),
|
|
14
|
+
/* @__PURE__ */f("span",{className:"min-w-0 truncate "+(t?"text-blue-600":"text-ink-faintest"),children:t||k.addLink})]}),w&&/* @__PURE__ */f("div",{id:O,className:"mt-2",children:/* @__PURE__ */f(y,{value:t,label:k.linkOf(e,t),kinds:s,rules:m,filtersFor:g,onApply:(e,a)=>{void 0===a?i(e):i(e,a),j()},onRemove:t?()=>{i(""),j()}:void 0,onCancel:j})})]})}export{y as LinkPicker,w as TextLinkField};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{useHighlight as e}from"./chunk-CNYAHYE6.js";import{
|
|
2
|
-
return f("div",{className:`relative ${k??""}`,ref:
|
|
3
|
-
/* @__PURE__ */f("svg",{width:"100%",height:
|
|
4
|
-
/* @__PURE__ */d("title",{id:z,children:N.funnel(x.length,S(x[0].value),S(x[x.length-1].value))}),x.map((e,t)=>{const l=t*
|
|
5
|
-
return f("g",{opacity:K(t,e.key)?.45:1,onMouseEnter:()=>
|
|
1
|
+
import{useHighlight as e}from"./chunk-CNYAHYE6.js";import{usePlotWidth as t}from"./chunk-MAFUXCPZ.js";import{ChartTooltip as l}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as a,CHART_INK as n,STATUS_VARS as r}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as i}from"./chunk-GDQJBQ5B.js";import{formatPercent as u,formatPlain as h}from"./chunk-C3QOHMR6.js";import{useId as c,useState as m,useRef as s}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";function x({stages:x,shape:v="funnel",height:p,width:$,gap:g=4,minBandWidth:M=0,formatValue:y,color:b,className:k,emptyLabel:A}){const N=o().charts,L=i(),S=y??(e=>h(e,L)),j=A??N.noStages,z=c(),[V,F]=m(null),{highlighted:W}=e(),w=s(null),B=t(w,560),C=$??B;if(0===x.length)/* @__PURE__ */return d("p",{className:`text-sm text-gray-500 ${k??""}`,children:j});const Q=b??a(0),Z=p??54*x.length,E=Math.max(...x.map(e=>e.value),1),H="bars"===v,D=H?Math.round(Math.min(132,Math.max(80,.24*C))):Math.round(Math.min(168,Math.max(104,.38*C))),R=e=>{const t=x[e-1]?.value;return null!=t&&t>0?100*(1-x[e].value/t):null},U=e=>{const t=R(e);return{count:S(x[e].value),drop:null!=t?`−${u(t,1,L)}`:""}},Y=H?Math.ceil(Math.max(...x.map((e,t)=>{const{count:l,drop:a}=U(t);return.62*(l.length+(a?a.length+1:0))*12}))+16):0,G=C-D-Y,I=Math.max(H?2:0,Math.min(M,G)),J=e=>Math.max(I,G*Math.max(0,e/E)),O=e=>J(e)/2,P=D+G/2,T=e=>46+e/Math.max(1,x.length-1)*54,X=e=>`color-mix(in oklab, ${Q} ${T(e).toFixed(0)}%, ${n.surface})`,q=e=>T(e)>=55?n.surface:n.label,K=(e,t)=>null!==V?V!==e:null!==W&&W!==t,_=null!==V?x[V]:void 0;/* @__PURE__ */
|
|
2
|
+
return f("div",{className:`relative ${k??""}`,ref:w,children:[
|
|
3
|
+
/* @__PURE__ */f("svg",{width:"100%",height:Z,viewBox:`0 0 ${C} ${Z}`,role:"img","aria-labelledby":z,onMouseLeave:()=>F(null),children:[
|
|
4
|
+
/* @__PURE__ */d("title",{id:z,children:N.funnel(x.length,S(x[0].value),S(x[x.length-1].value))}),x.map((e,t)=>{const l=t*Z/x.length+g/2,a=(t+1)*Z/x.length-g/2,r=(l+a)/2,o=u(e.value/(x[0].value||1)*100,0,L),i=.62*o.length*12+12;if(H){const u=D,h=u+J(e.value),{count:c,drop:m}=U(t);/* @__PURE__ */
|
|
5
|
+
return f("g",{opacity:K(t,e.key)?.45:1,onMouseEnter:()=>F(t),children:[
|
|
6
6
|
/* @__PURE__ */d("path",{d:`M${u},${l} L${h},${l} L${h},${a} L${u},${a} Z`,fill:X(t)}),
|
|
7
|
-
/* @__PURE__ */d("text",{x:
|
|
7
|
+
/* @__PURE__ */d("text",{x:D-12,y:r+4,textAnchor:"end",fontSize:12,fill:n.label,children:e.label}),h-u>=i&&/* @__PURE__ */d("text",{x:u+8,y:r+4,textAnchor:"start",fontSize:12,fontWeight:600,fill:q(t),style:{fontVariantNumeric:"tabular-nums"},children:o}),
|
|
8
8
|
/* @__PURE__ */f("text",{"data-funnel-value":"true",x:h+8,y:r+4,textAnchor:"start",fontSize:12,fill:n.label,style:{fontVariantNumeric:"tabular-nums"},children:[
|
|
9
|
-
/* @__PURE__ */d("tspan",{fontWeight:600,children:c}),m&&/* @__PURE__ */d("tspan",{fill:n.muted,children:` ${m}`})]})]},e.key)}const h=O(e.value),c="cone"===v?O(x[t+1]?.value??e.value):h,m=
|
|
10
|
-
return f("g",{opacity:K(t,e.key)?.45:1,onMouseEnter:()=>
|
|
9
|
+
/* @__PURE__ */d("tspan",{fontWeight:600,children:c}),m&&/* @__PURE__ */d("tspan",{fill:n.muted,children:` ${m}`})]})]},e.key)}const h=O(e.value),c="cone"===v?O(x[t+1]?.value??e.value):h,m=R(t),s=2*Math.min(h,c)>=i;/* @__PURE__ */
|
|
10
|
+
return f("g",{opacity:K(t,e.key)?.45:1,onMouseEnter:()=>F(t),children:[
|
|
11
11
|
/* @__PURE__ */d("path",{d:`M${P-h},${l} L${P+h},${l} L${P+c},${a} L${P-c},${a} Z`,fill:X(t)}),
|
|
12
|
-
/* @__PURE__ */d("text",{x:
|
|
13
|
-
/* @__PURE__ */f("text",{x:
|
|
14
|
-
/* @__PURE__ */d("text",{x:s?P:P+Math.max(h,c)+6,y:r+4,textAnchor:s?"middle":"start",fontSize:12,fontWeight:600,fill:s?q(t):n.label,style:{fontVariantNumeric:"tabular-nums"},children:o})]},e.key)})]}),_&&null!==V&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(
|
|
12
|
+
/* @__PURE__ */d("text",{x:D-14,y:r-2,textAnchor:"end",fontSize:12,fill:n.label,children:e.label}),
|
|
13
|
+
/* @__PURE__ */f("text",{x:D-14,y:r+14,textAnchor:"end",fontSize:11,fill:n.muted,style:{fontVariantNumeric:"tabular-nums"},children:[S(e.value),null!=m?` · −${u(m,1,L)}`:""]}),
|
|
14
|
+
/* @__PURE__ */d("text",{x:s?P:P+Math.max(h,c)+6,y:r+4,textAnchor:s?"middle":"start",fontSize:12,fontWeight:600,fill:s?q(t):n.label,style:{fontVariantNumeric:"tabular-nums"},children:o})]},e.key)})]}),_&&null!==V&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(l,{title:_.label,rows:[{key:"value",label:N.count,color:X(V),value:S(_.value)},{key:"share",label:N.ofFirstStage,color:n.muted,value:u(_.value/(x[0].value||1)*100,0,L)},...V>0&&x[V-1].value>0?[{key:"drop",label:N.droppedHere,color:r.critical,value:`−${u(100*(1-_.value/x[V-1].value),1,L)}`}]:[]]})})]})}export{x as FunnelChart};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a=[9,11,12,14,16,18,20,24,30],e={body:400,control:500,heading:600,figure:700},r={fast:120,base:160},n={hairline:1,strong:2,accent:4};export{n as BORDER_WIDTHS,e as FONT_WEIGHTS,r as MOTION_DURATIONS,a as TYPE_SCALE};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useShellLanguage as e}from"./chunk-7TZV6G2F.js";import{RadioGroup as a}from"./chunk-32VV2J22.js";import{Select_default as n}from"./chunk-
|
|
1
|
+
import{useShellLanguage as e}from"./chunk-7TZV6G2F.js";import{RadioGroup as a}from"./chunk-32VV2J22.js";import{Select_default as n}from"./chunk-M3JNILT2.js";import{Icon as t}from"./chunk-2UO47XB4.js";import{useShellStrings as l}from"./chunk-GDQJBQ5B.js";import{jsxs as s,jsx as i}from"react/jsx-runtime";function r(e){const a=Math.max(0,...e.map(e=>[...e].reduce((e,a)=>e+((a.codePointAt(0)??0)>=11904?1:.62),0)));return Math.round(10*(a+3.5))/10}function m({size:a="sm",className:m=""}){const{language:o,languages:c,setLanguage:g}=e(),u=l().language;return c.length<2?null:/* @__PURE__ */s("span",{className:`inline-flex items-center gap-2 text-ink-faint ${m}`.trim(),children:[
|
|
2
2
|
/* @__PURE__ */i(t,{name:"globe","aria-hidden":!0,className:"h-4 w-4 shrink-0"}),
|
|
3
3
|
/* @__PURE__ */i("span",{className:"block",style:{width:`${r(c.map(e=>e.name))}em`},children:/* @__PURE__ */i(n,{size:a,touchSize:a,"aria-label":u.title,value:o,onChange:e=>{g(e)},options:c.map(({tag:e,name:a})=>({value:e,label:a,lang:e}))})})]})}function o({description:n,className:t=""}){const{language:r,languages:m,setLanguage:o}=e(),c=l().language;return m.length<2?null:/* @__PURE__ */s("div",{className:`space-y-4 ${t}`.trim(),children:[
|
|
4
4
|
/* @__PURE__ */s("div",{children:[
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{client_default as a}from"./chunk-
|
|
1
|
+
import{client_default as a}from"./chunk-GAIB5FEE.js";var t=()=>a.get("/auth/numbering-configs/").then(a=>a.data?.results??a.data??[]),e="uploaded:wallpaper";function r(a,t){return"string"!=typeof a||!a||"none"===a||a.startsWith("#")?"":a===e?t||"":a}var l=()=>a.get("/auth/me/wallpaper/").then(a=>a.data),n=(t,e)=>{const r=new FormData;r.append("wallpaper",t);const l=e?{onUploadProgress:a=>e(a.total?Math.round(a.loaded/a.total*100):null)}:void 0;return a.post("/auth/me/wallpaper/",r,l).then(a=>a.data)},p=()=>a.delete("/auth/me/wallpaper/").then(a=>a.data);function o(a){const t=a?.response?.status,e=a?.response?.data,r=Array.isArray(e?.wallpaper)?e.wallpaper[0]:void 0;return r||(413===t?"That picture is too large to use as a wallpaper.":415===t?"That file is not a picture this can use as a wallpaper.":"The wallpaper could not be saved. Please try again.")}export{e as WALLPAPER_PREF_TOKEN,p as deleteWallpaper,t as getNumberingConfigs,l as getWallpaper,n as uploadWallpaper,r as wallpaperSrc,o as wallpaperUploadError};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{firstEnabledIndex as e,matchTypeahead as t,lastEnabledIndex as r,nextEnabledIndex as i}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as n,groupedRows as a,isOptionGroup as l,OptionCheck as o}from"./chunk-LJN77RG6.js";import{useSettingAuto as d}from"./chunk-2NMW66P5.js";import{inputClasses as s,PLACEHOLDER_INK as c}from"./chunk-AYZY3YNC.js";import{useIsMobile as u}from"./chunk-UGTRSRIW.js";import{optionNoteClass as p}from"./chunk-URHGHXDN.js";import{Icon as m}from"./chunk-2UO47XB4.js";import{onOverlayOpen as v}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as h}from"./chunk-62LW225J.js";import{useDropdownPosition as f,MENU_MAX_HEIGHT as b}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as g}from"./chunk-D65T4H6J.js";import{
|
|
1
|
+
import{firstEnabledIndex as e,matchTypeahead as t,lastEnabledIndex as r,nextEnabledIndex as i}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as n,groupedRows as a,isOptionGroup as l,OptionCheck as o}from"./chunk-LJN77RG6.js";import{useSettingAuto as d}from"./chunk-2NMW66P5.js";import{inputClasses as s,PLACEHOLDER_INK as c}from"./chunk-AYZY3YNC.js";import{useIsMobile as u}from"./chunk-UGTRSRIW.js";import{optionNoteClass as p}from"./chunk-URHGHXDN.js";import{Icon as m}from"./chunk-2UO47XB4.js";import{onOverlayOpen as v}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as h}from"./chunk-62LW225J.js";import{useDropdownPosition as f,MENU_MAX_HEIGHT as b}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as g}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{useShellStrings as x}from"./chunk-GDQJBQ5B.js";import{solidSurfaceStyle as k}from"./chunk-5FYDNH4Y.js";import{forwardRef as N,useId as w,useState as $,useRef as D,useMemo as j,useCallback as H,useEffect as S}from"react";import{createPortal as T}from"react-dom";import{jsxs as C,jsx as E,Fragment as O}from"react/jsx-runtime";var I=e=>e.labelStyle?{lineHeight:1.25,...e.labelStyle}:void 0,z=N(function({value:e,onChange:t,options:r,placeholder:i,invalid:n,className:a="",size:l,touchSize:o,renderOption:c,renderValue:u,valueText:p,readOnly:m,footer:v,changed:h,auto:f,multiple:b,"aria-describedby":g,...y},k){const N=t,$=x(),D=d(),j=f??D,H=w(),S=/* @__PURE__ */C("select",{ref:k,value:e,multiple:b||void 0,onChange:e=>N(b?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),"aria-invalid":n||void 0,"aria-describedby":[g,j?H:void 0].filter(Boolean).join(" ")||void 0,className:s({invalid:n,size:l,auto:j,className:`pr-8 ${a}`.trim()}),...y,children:[void 0!==i&&!b&&/* @__PURE__ */E("option",{value:"",disabled:!0,children:i}),
|
|
2
2
|
/* @__PURE__ */E(B,{items:r})]});return j?/* @__PURE__ */C(O,{children:[S,
|
|
3
3
|
/* @__PURE__ */E("span",{id:H,hidden:!0,children:$.settingView.auto})]}):S});function B({items:e}){const t=e=>/* @__PURE__ */E("option",{value:e.value,disabled:e.disabled,lang:e.lang,children:e.label},e.value);/* @__PURE__ */
|
|
4
|
-
return E(O,{children:e.map((e,r)=>(e=>l(e))(e)?/* @__PURE__ */E("optgroup",{label:e.label,children:e.options.map(t)},`group-${r}`):t(e))})}var U=N(function({value:l,onChange:u,options:N,placeholder:z,invalid:U,className:A="",id:R,disabled:K,size:V,touchSize:G,title:L,multiple:P,renderOption:W,renderValue:Y,valueText:F,readOnly:J=!1,footer:M,changed:Q=!1,auto:X,"aria-describedby":q,"aria-label":Z,"aria-labelledby":_,...ee},te){const[re,ie]=$(!1),[ne,ae]=$(-1),le=D(null),oe=D(null),de=D(null),se=D(null),ce=D([]),ue=()=>se.current??de.current,pe=!!M?.length,me="sm"===V,ve=me?"min-h-7 px-3 py-1 text-xs leading-4":"min-h-(--row-height-menu) px-3 py-2 text-sm leading-5",he=p(me),[fe,be]=$(null),ge=
|
|
4
|
+
return E(O,{children:e.map((e,r)=>(e=>l(e))(e)?/* @__PURE__ */E("optgroup",{label:e.label,children:e.options.map(t)},`group-${r}`):t(e))})}var U=N(function({value:l,onChange:u,options:N,placeholder:z,invalid:U,className:A="",id:R,disabled:K,size:V,touchSize:G,title:L,multiple:P,renderOption:W,renderValue:Y,valueText:F,readOnly:J=!1,footer:M,changed:Q=!1,auto:X,"aria-describedby":q,"aria-label":Z,"aria-labelledby":_,...ee},te){const[re,ie]=$(!1),[ne,ae]=$(-1),le=D(null),oe=D(null),de=D(null),se=D(null),ce=D([]),ue=()=>se.current??de.current,pe=!!M?.length,me="sm"===V,ve=me?"min-h-7 px-3 py-1 text-xs leading-4":"min-h-(--row-height-menu) px-3 py-2 text-sm leading-5",he=p(me),[fe,be]=$(null),ge=x(),ye=D(re);ye.current=re;const xe=D({buffer:"",timer:null}),ke=w(),Ne=`${ke}-listbox`,we=R??`${ke}-trigger`,$e=e=>`${ke}-opt-${e}`,De=`${ke}-changed`,je=d(),He=X??je,Se=`${ke}-auto`,Te=[q,Q?De:void 0,He?Se:void 0].filter(Boolean).join(" ")||void 0,Ce=j(()=>n(N),[N]),Ee=P?l:[],Oe=u,Ie=f(oe,re,{matchTriggerWidth:!0,...M?.length?{preferredMaxHeight:Number.POSITIVE_INFINITY}:{}}),ze=`${re}|${Ie?.top}|${Ie?.bottom}|${Ie?.maxHeight}|${N.length}`;g(()=>{be(null)},[ze]),g(()=>{const e=de.current;if(!re||!e||null!==fe)return;if(e.scrollHeight<=e.clientHeight+1)return;const t=getComputedStyle(e),r=parseFloat(t.paddingTop)||0;parseFloat(t.paddingBottom);const i=e.getBoundingClientRect().top;let n=0;for(const t of e.querySelectorAll('[role="option"]')){const r=t.getBoundingClientRect().bottom-i+e.scrollTop;if(!(r<=e.clientHeight+.5))break;n=r}n>r&&be(Math.floor(n))},[re,fe,ze]);const Be=P?Ce.findIndex(e=>Ee.includes(e.value)):Ce.findIndex(e=>e.value===l),Ue=P?Ce.filter(e=>Ee.includes(e.value)).map(e=>e.label).join(", ")||void 0:Be>=0?Ce[Be].label:void 0,Ae=!P&&Be>=0?Ce[Be].lang:void 0,Re=P?Ce.filter(e=>Ee.includes(e.value)):Be>=0?[Ce[Be]]:[],Ke=Y&&Re.length?Y(Re):void 0,Ve=void 0!==Ke&&F?F(Re):void 0,Ge=H((e=!0)=>{ie(!1),ae(-1),e&&oe.current?.focus()},[]),Le=H(()=>{K||J||(ae(Be>=0?Be:e(Ce)),ie(!0))},[K,J,Ce,Be]),Pe=H(e=>{const t=Ce[e];if(t&&!t.disabled){if(P){const r=l;return Oe(r.includes(t.value)?r.filter(e=>e!==t.value):[...r,t.value]),void ae(e)}Oe(t.value),Ge()}},[Ce,P,l,Oe,Ge]);S(()=>{if(!re)return;return y(e=>!("Escape"!==e.key||!ye.current)&&(Ge(),!0),ue)},[re,Ge]),S(()=>{if(!re)return;const e=e=>{const t=e.target;le.current?.contains(t)||ue()?.contains(t)||Ge(!1)};document.addEventListener("pointerdown",e);const t=v(()=>Ge(!1));return()=>{document.removeEventListener("pointerdown",e),t()}},[re,Ge]),S(()=>{!re||ne<0||de.current?.querySelector(`#${CSS.escape($e(ne))}`)?.scrollIntoView({block:"nearest"})},[re,ne]);const We=H(e=>{const r=xe.current;r.timer&&clearTimeout(r.timer),r.buffer+=e,r.timer=setTimeout(()=>{r.buffer="",r.timer=null},500);const i=re?ne:Be,n=t(Ce,r.buffer,i);n<0||(re?ae(n):P?(ae(n),ie(!0)):Pe(n))},[re,ne,Be,Ce,Pe,P]),Ye=re?a(N,(e,t)=>{const r=(i=e.value,P?Ee.includes(i):l===i);var i;const n=t===ne;/* @__PURE__ */
|
|
5
5
|
return C("div",{id:$e(t),role:"option",lang:e.description||e.labelStyle||W?void 0:e.lang,"aria-selected":r,"aria-disabled":e.disabled||void 0,onPointerEnter:()=>{e.disabled||ae(t)},onClick:()=>Pe(t),className:`mx-1 cursor-pointer truncate rounded-lg ${ve}${P?" flex items-center gap-2":""}\n ${e.disabled?"cursor-not-allowed text-gray-400":n?"bg-blue-50 text-blue-700":r?"font-medium text-blue-600":"text-gray-700"}`,children:[P&&/* @__PURE__ */E(o,{selected:r}),W?/* @__PURE__ */E("span",{className:"block min-w-0 flex-1 truncate",children:W(e,{selected:r,active:n})}):P?/* @__PURE__ */C("span",{className:"block min-w-0 flex-1",children:[
|
|
6
6
|
/* @__PURE__ */E("span",{lang:e.lang,className:"block truncate",style:I(e),children:e.label}),e.description&&/* @__PURE__ */E("span",{className:he,children:e.description})]}):e.description||e.labelStyle?
|
|
7
7
|
/* @__PURE__ */C(O,{children:[
|
|
8
8
|
/* @__PURE__ */E("span",{lang:e.lang,className:"block truncate",style:I(e),children:e.label}),e.description&&/* @__PURE__ */E("span",{className:he,children:e.description})]}):e.label]},e.value)},ke,"mx-1"):null,Fe=void 0!==Ke?
|
|
9
9
|
/* @__PURE__ */C("span",{className:"relative block min-w-0 truncate",children:[
|
|
10
10
|
/* @__PURE__ */E("span",{"aria-hidden":"true","data-select-value":"",className:"flex min-w-0 items-center gap-2 truncate",children:Ke}),
|
|
11
|
-
/* @__PURE__ */E("span",{lang:void 0===Ve?Ae:void 0,className:"sr-only",children:Ve??Ue})]}):/* @__PURE__ */E("span",{lang:Ae,className:`block truncate ${void 0===Ue?c:""}`,children:Ue??z??" "}),Je={zIndex:h.popup,left:Ie?.left,top:Ie?.top,bottom:Ie?.bottom,width:Ie?.width,maxHeight:Ie?.maxHeight??b,visibility:Ie?void 0:"hidden",...
|
|
11
|
+
/* @__PURE__ */E("span",{lang:void 0===Ve?Ae:void 0,className:"sr-only",children:Ve??Ue})]}):/* @__PURE__ */E("span",{lang:Ae,className:`block truncate ${void 0===Ue?c:""}`,children:Ue??z??" "}),Je={zIndex:h.popup,left:Ie?.left,top:Ie?.top,bottom:Ie?.bottom,width:Ie?.width,maxHeight:Ie?.maxHeight??b,visibility:Ie?void 0:"hidden",...k()},Me=/* @__PURE__ */E("div",{ref:de,id:Ne,role:"listbox","aria-labelledby":_??(Z?void 0:we),"aria-label":_?void 0:Z,"aria-multiselectable":P||void 0,className:pe?"min-h-0 shrink overflow-y-auto py-1":"fixed overflow-y-auto rounded-(--radius-popup) py-1",style:pe?null!==fe?{maxHeight:fe}:void 0:null!==fe?{...Je,maxHeight:fe}:Je,children:Ye}),Qe=pe?/* @__PURE__ */C("div",{ref:se,className:"fixed flex flex-col overflow-hidden rounded-(--radius-popup)",style:Je,children:[Me,
|
|
12
12
|
/* @__PURE__ */E("div",{className:"shrink-0 border-t border-(--rosh-glass-solid-border) px-1 py-1",children:M.map((e,t)=>/* @__PURE__ */C("button",{ref:e=>{ce.current[t]=e},type:"button","data-select-action":"","aria-disabled":e.disabled||void 0,onClick:()=>(e=>{e.disabled||(Ge(),e.onSelect())})(e),onKeyDown:e=>((e,t)=>{const r=(M?.length??0)-1,i=t=>{e.preventDefault(),ce.current[t]?.focus()},n=()=>{e.preventDefault(),oe.current?.focus()};switch(e.key){case"ArrowDown":return void i(Math.min(t+1,r));case"ArrowUp":return void(0===t?n():i(t-1));case"Home":return void i(0);case"End":return void i(r);case"Tab":return e.shiftKey?void(0===t?n():i(t-1)):t<r?void i(t+1):(e.preventDefault(),void Ge());case"Escape":return e.preventDefault(),e.stopPropagation(),void Ge()}})(e,t),className:`flex w-full items-center gap-2 rounded-lg ${ve} text-left rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${e.disabled?"cursor-not-allowed text-ink-faintest":"cursor-pointer text-ink hover:bg-accent-tint hover:text-blue-700"}`,children:[e.icon&&/* @__PURE__ */E(m,{name:e.icon,"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
|
|
13
13
|
/* @__PURE__ */E("span",{className:"min-w-0 flex-1 truncate",children:e.label})]},e.label))})]}):Me;/* @__PURE__ */
|
|
14
14
|
return C("div",{ref:le,className:"relative",children:[
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{SidebarLayout as e}from"./chunk-
|
|
1
|
+
import{SidebarLayout as e}from"./chunk-SXQZ5GTA.js";import{Avatar as t}from"./chunk-AFYLVV74.js";import{ItemCount as r}from"./chunk-P4VKU3SL.js";import{Button_default as a}from"./chunk-7DI3VQCF.js";import{useState as i}from"react";import{jsx as l,jsxs as n}from"react/jsx-runtime";var s=[{id:"inbox",label:"Inbox",count:12},{id:"starred",label:"Starred",count:3},{id:"sent",label:"Sent"},{id:"drafts",label:"Drafts",count:1},{id:"archive",label:"Archive"},{id:"trash",label:"Trash"}],d=[{id:1,from:"Marco Reyes",subject:"Q3 roadmap review",preview:"Sharing the deck ahead of Thursday — let me know what you think before the review.",time:"9:14",unread:!0},{id:2,from:"Priya Patel",subject:"Design handoff",preview:"The Figma file is ready for engineering. I exported every icon at 1x and 2x.",time:"8:02",unread:!0},{id:3,from:"GitHub",subject:"[acme/web] PR #482 merged",preview:"Your pull request was merged into main by the release bot after all checks passed.",time:"Yest"},{id:4,from:"Sara Lind",subject:"Lunch Friday?",preview:"A few of us are heading to the new place on 5th at noon if you want to join.",time:"Yest"}];function c(){const[c,o]=i(1),m=d.find(e=>e.id===c)??d[0];/* @__PURE__ */
|
|
2
2
|
return l("div",{className:"h-full",children:/* @__PURE__ */l(e,{side:"left",defaultWidth:200,sidebar:/* @__PURE__ */n("div",{className:"flex h-full flex-col p-2",children:[
|
|
3
3
|
/* @__PURE__ */l(a,{block:!0,className:"mb-2",children:"Compose"}),s.map((e,t)=>/* @__PURE__ */n("button",{className:"flex items-center justify-between rounded-md px-3 py-2 text-left text-sm "+(0===t?"bg-blue-50 font-medium text-blue-700":"text-gray-700 hover:bg-gray-100"),children:[
|
|
4
4
|
/* @__PURE__ */l("span",{children:e.label}),null!=e.count&&/* @__PURE__ */l(r,{count:e.count,active:0===t})]},e.id))]}),children:/* @__PURE__ */n("div",{className:"flex h-full",children:[
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import{escapeHtml as e}from"./chunk-G6DKCCWH.js";import{TH_ONE_LINE as t}from"./chunk-
|
|
2
|
-
return h("div",{...n,dangerouslySetInnerHTML:r})}function g({columns:e,data:g,onChange:f,onColumnsChange:p,fixedRows:b=!1,minRows:y=15,maxHeight:v="260px",cellStyles:x,onFocusChange:M,onSelectionChange:D}){const k=o(null),C=r().grid,[E
|
|
1
|
+
import{escapeHtml as e}from"./chunk-G6DKCCWH.js";import{TH_ONE_LINE as t}from"./chunk-CJH2BGXY.js";import{useBrowserLayoutEffect as n}from"./chunk-D65T4H6J.js";import{useShellStrings as r}from"./chunk-GDQJBQ5B.js";import{useRef as o,useState as l,useEffect as c,useCallback as a,useMemo as s}from"react";import{createPortal as i}from"react-dom";import{jsxs as u,jsx as h,Fragment as d}from"react/jsx-runtime";function w(e,t){const n=e[e.length-1];return n&&!n.some(e=>e.trim())?e:[...e,Array(t).fill("")]}function m({text:t,...n}){const r=s(()=>({__html:e(t)}),[t]);/* @__PURE__ */
|
|
2
|
+
return h("div",{...n,dangerouslySetInnerHTML:r})}function g({columns:e,data:g,onChange:f,onColumnsChange:p,fixedRows:b=!1,minRows:y=15,maxHeight:v="260px",cellStyles:x,onFocusChange:M,onSelectionChange:D}){const k=o(null),C=r().grid,[E,$]=l(null);c(()=>{M?.(E)},[E,M]);const[L,S]=l({}),z=o(null),[N,A]=l({}),O=o(null),[T,K]=l(null),[R,P]=l(null),[F,H]=l(null),[I,X]=l(null),[Y,j]=l(null),B=o(null);n(()=>{const e=B.current;if(!e||e.row!==Y?.row||e.col!==Y?.col)return;B.current=null;const t=k.current?.querySelector(`[data-row="${e.row}"][data-col="${e.col}"]`);if(!t)return;t.focus();const n=document.createRange();n.selectNodeContents(t),n.collapse(!1);const r=window.getSelection();r?.removeAllRanges(),r?.addRange(n)},[Y]);const[W,q]=l(null),[G,J]=l(null);c(()=>{D?.(W&&G?{anchor:W,end:G}:null)},[W,G,D]);const Q=o(!1),[_,U]=l(null),V=o(!1),Z=o({a:null,e:null});Z.current={a:W,e:G};const ee=W&&G&&(W.row!==G.row||W.col!==G.col),te=[...g];if(!b)for(;te.length<y;)te.push(Array(e.length).fill(""));const ne=a((t,n,r)=>{const o=te.map(e=>[...e]);for(;o.length<=t;)o.push(Array(e.length).fill(""));for(;o[t].length<e.length;)o[t].push("");o[t][n]=r,f(o)},[te,e.length,f]),re=a((e,t,n)=>{if(0!==e.button)return;const r=document.activeElement;if(r?.dataset?.row&&r?.dataset?.col){const e=parseInt(r.dataset.row),t=parseInt(r.dataset.col),n=r.textContent||"";if(n!==(te[e]?.[t]||"")){const r=te.map(e=>[...e]);r[e]&&(r[e][t]=n,f(r))}}Q.current=!0,e.shiftKey&&W||q({row:t,col:n}),J({row:t,col:n})},[te,f,W]),oe=a((e,t)=>{Q.current&&J({row:e,col:t})},[]);c(()=>{const e=()=>{Q.current=!1};return window.addEventListener("mouseup",e),()=>window.removeEventListener("mouseup",e)},[]),c(()=>{const e=e=>{if(!e.ctrlKey&&!e.metaKey||"c"!==e.key)return;if(!W||!G)return;const t=window.getSelection();if(t&&t.toString().length>0&&!ee)return;const n=Math.min(W.row,G.row),r=Math.max(W.row,G.row),o=Math.min(W.col,G.col),l=Math.max(W.col,G.col),c=[];for(let e=n;e<=r;e++){const t=[];for(let n=o;n<=l;n++)t.push(te[e]?.[n]||"");c.push(t.join("\t"))}const a=c.join("\n");a&&(e.preventDefault(),navigator.clipboard.writeText(a))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[W,G,te,ee]),c(()=>{const t=t=>{if(!E)return;const n=document.activeElement;if(n?.isContentEditable)return;if(!k.current?.contains(n))return;const r=t.clipboardData?.getData("text/plain");if(!r)return;t.preventDefault();const o=r.split("\n").filter(e=>e).map(e=>e.split("\t")),l=te.map(e=>[...e]);for(let t=0;t<o.length;t++){const n=E.row+t;for(;l.length<=n;)l.push(Array(e.length).fill(""));for(;l[n].length<e.length;)l[n].push("");for(let r=0;r<o[t].length;r++){const c=E.col+r;if(c>=e.length)break;e[c].readOnly||(l[n][c]=o[t][r].trim())}}f(b?l:w(l,e.length)),q({row:E.row,col:E.col}),J({row:Math.min(E.row+o.length-1,l.length-1),col:Math.min(E.col+(o[0]?.length||1)-1,e.length-1)})};return window.addEventListener("paste",t),()=>window.removeEventListener("paste",t)},[E,te,e,f,b]);const le=a((t,n,r)=>{const o=t.clipboardData.getData("text/plain");if(!o)return;const l=o.split("\n").map(e=>e.split("\t"));if(l.length<=1&&l[0]?.length<=1)return;t.preventDefault();const c=te.map(e=>[...e]);for(let t=0;t<l.length;t++){const o=n+t;for(;c.length<=o;)c.push(Array(e.length).fill(""));for(;c[o].length<e.length;)c[o].push("");for(let n=0;n<l[t].length;n++){const a=r+n;if(a>=e.length)break;e[a].readOnly||(c[o][a]=l[t][n].trim())}}f(b?c:w(c,e.length))},[te,e,f,b]),ce=a((t,n,r)=>{let o=n,l=r;if("Tab"===t.key)t.preventDefault(),l=t.shiftKey?r-1:r+1,l>=e.length&&(l=0,o=n+1),l<0&&(l=e.length-1,o=n-1);else if("Enter"===t.key)t.preventDefault(),o=t.shiftKey?n-1:n+1;else if("ArrowDown"===t.key)t.preventDefault(),o=n+1;else if("ArrowUp"===t.key)t.preventDefault(),o=n-1;else if("ArrowLeft"===t.key)t.preventDefault(),l=r-1;else{if("ArrowRight"!==t.key){if("Delete"===t.key||"Backspace"===t.key){const o=t.target;if(o.isContentEditable)return void(o.textContent&&window.getSelection()?.toString()===o.textContent&&(t.preventDefault(),ne(n,r,"")));if(t.preventDefault(),W&&G){const t=Math.min(W.row,G.row),n=Math.max(W.row,G.row),r=Math.min(W.col,G.col),o=Math.max(W.col,G.col),l=te.map(e=>[...e]);for(let c=t;c<=n;c++)for(let t=r;t<=o;t++)l[c]&&!e[t]?.readOnly&&(l[c][t]="");f(l)}else ne(n,r,"");return}return}t.preventDefault(),l=r+1}for(;l>=0&&l<e.length&&e[l].readOnly;)l+="Tab"===t.key&&t.shiftKey?-1:1;if(o>=0&&o<te.length&&l>=0&&l<e.length){const e=k.current?.querySelector(`[data-row="${o}"][data-col="${l}"]`);e&&(e.focus({preventScroll:!0}),e.scrollIntoView({block:"nearest",inline:"nearest"}),$({row:o,col:l}),j(null),q({row:o,col:l}),J({row:o,col:l}))}},[e,te,te.length,ne,W,G,f]),ae=a(t=>{if(!b&&t>=te.length-2){const t=te.map(e=>[...e]);for(let n=0;n<5;n++)t.push(Array(e.length).fill(""));f(t)}},[b,te,e.length,f]),[se,ie]=l(null);c(()=>{if(!se)return;const e=()=>ie(null);return window.addEventListener("pointerdown",e),()=>window.removeEventListener("pointerdown",e)},[se]);const ue=a(t=>{const n=te.map(e=>[...e]);n.splice(t,0,Array(e.length).fill("")),f(n)},[te,e.length,f]),he=a(e=>{if(te.length<=1)return;const t=te.filter((t,n)=>n!==e);f(t)},[te,f]),de=a(e=>{const t=te.map(t=>{const n=[...t];return n.splice(e,0,""),n});f(t)},[te,f]),we=a(t=>{if(e.length<=1)return;const n=te.map(e=>{const n=[...e];return n.splice(t,1),n});f(n)},[te,e.length,f]),me=a((e,t)=>{e.preventDefault(),b||ie({x:e.clientX,y:e.clientY,items:[{label:C.insertRowAbove,onClick:()=>{ue(t),ie(null)}},{label:C.insertRowBelow,onClick:()=>{ue(t+1),ie(null)}},{label:C.deleteRow(t+1),onClick:()=>{he(t),ie(null)}}]})},[b,ue,he,C]),ge=a((t,n)=>{t.preventDefault(),b||ie({x:t.clientX,y:t.clientY,items:[{label:C.insertColumnLeft,onClick:()=>{de(n),ie(null)}},{label:C.insertColumnRight,onClick:()=>{de(n+1),ie(null)}},{label:C.deleteColumn(String(e[n]?.title||n+1)),onClick:()=>{we(n),ie(null)}}]})},[b,e,de,we,C]),fe=t=>L[t]??e[t]?.width??150;c(()=>{const t=e=>{if(!z.current)return;const t=e.clientX-z.current.startX,n=Math.max(40,z.current.startW+t);S(e=>({...e,[z.current.col]:n}))},n=()=>{if(z.current&&p){const t=e.map((e,t)=>({...e,width:L[t]??e.width}));t[z.current.col]={...t[z.current.col],width:L[z.current.col]??e[z.current.col].width},p(t)}z.current=null,document.body.style.cursor=""};return window.addEventListener("mousemove",t),window.addEventListener("mouseup",n),()=>{window.removeEventListener("mousemove",t),window.removeEventListener("mouseup",n)}},[e,L,p]);const pe=e=>N[e]??28;c(()=>{const e=e=>{if(!O.current)return;const t=e.clientY-O.current.startY,n=Math.max(20,O.current.startH+t);A(e=>({...e,[O.current.row]:n}))},t=()=>{O.current=null,document.body.style.cursor=""};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}},[]);const be=a(t=>{const n=document.createElement("canvas").getContext("2d");if(!n)return;n.font="12px ui-monospace, SFMono-Regular, Menlo, monospace";let r=0;for(const e of te){const o=String(e[t]??"").replace(/<[^>]*>/g,""),l=n.measureText(o).width;l>r&&(r=l)}const o=n.measureText(e[t]?.title??"").width;o>r&&(r=o);const l=Math.max(40,Math.ceil(r+24));if(S(e=>({...e,[t]:l})),p){const n=e.map((e,n)=>({...e,width:n===t?l:L[n]??e.width}));p(n)}},[te,e,L,p]),ye=a(e=>{A(t=>{const n={...t};return delete n[e],n})},[]),ve=a(t=>{const{a:n,e:r}=Z.current;if(!n||!r)return;const o=Math.min(n.row,r.row),l=Math.max(n.row,r.row),c=Math.min(n.col,r.col),a=Math.max(n.col,r.col);let s=o,i=l,u=c,h=a;t.row>l?i=t.row:t.row<o&&(s=t.row),t.col>a?h=t.col:t.col<c&&(u=t.col);const d=l-o+1,w=a-c+1,m=te.map(e=>[...e]);for(;m.length<=i;)m.push(Array(e.length).fill(""));for(const e of m)for(;e.length<=h;)e.push("");function g(e){const t=e.map(e=>parseFloat(e));if(t.length<2||t.some(e=>Number.isNaN(e)))return null;const n=t[1]-t[0];for(let e=2;e<t.length;e++)if(Math.abs(t[e]-t[e-1]-n)>1e-9)return null;return{step:n}}for(let e=s;e<=i;e++)for(let t=u;t<=h;t++){if(e>=o&&e<=l&&t>=c&&t<=a)continue;let n;if(1===w&&u===c&&h===a){const r=g(Array.from({length:d},(e,n)=>m[o+n]?.[t]??""));if(r){const c=parseFloat(m[l]?.[t]??"0"),a=parseFloat(m[o]?.[t]??"0"),s=e>l?e-l:-(o-e);n=String((e>l?c:a)+r.step*s)}else{const r=((e-o)%d+d)%d;n=m[o+r]?.[t]??""}}else if(1===d&&s===o&&i===l){const r=g(Array.from({length:w},(t,n)=>m[e]?.[c+n]??""));if(r){const o=parseFloat(m[e]?.[a]??"0"),l=parseFloat(m[e]?.[c]??"0"),s=t>a?t-a:-(c-t);n=String((t>a?o:l)+r.step*s)}else{const r=((t-c)%w+w)%w;n=m[e]?.[c+r]??""}}else{const r=((e-o)%d+d)%d,l=((t-c)%w+w)%w;n=m[o+r]?.[c+l]??""}m[e][t]=n}f(m),q({row:s,col:u}),J({row:i,col:h})},[te,e.length,f]);c(()=>{const e=e=>{if(!V.current)return;const t=document.elementFromPoint(e.clientX,e.clientY),n=t?.closest?.("[data-row][data-col]");if(!n)return;const r=parseInt(n.dataset.row),o=parseInt(n.dataset.col);U({row:r,col:o})},t=()=>{V.current&&_&&ve(_),V.current=!1,U(null),document.body.style.cursor=""};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}},[_,ve]);const xe=e=>{e.preventDefault(),e.stopPropagation(),V.current=!0,document.body.style.cursor="crosshair"},Me=o(null),[De,ke]=l(0),[Ce,Ee]=l(800);c(()=>{const e=Me.current;if(!e)return;const t=()=>Ee(e.clientHeight||800);t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]);const $e=te.length>100,Le=$e?Math.max(0,Math.floor(De/28)-20):0,Se=$e?Math.min(te.length,Math.ceil((De+Ce)/28)+20):te.length,ze=s(()=>te.slice(Le,Se),[te,Le,Se]),Ne=28*Le,Ae=28*(te.length-Se),Oe="px-2 h-8 text-left text-xs font-medium text-ink-faint uppercase bg-gray-100 border-b border-r border-line select-none";/* @__PURE__ */
|
|
3
3
|
return u("div",{ref:Me,className:"border border-gray-300 rounded overflow-scroll grid-scroll",style:{maxHeight:v,height:v},onScroll:e=>ke(e.target.scrollTop),children:[
|
|
4
4
|
/* @__PURE__ */u("table",{ref:k,className:"border-collapse select-none",style:{tableLayout:"fixed",minWidth:36+e.reduce((t,n)=>t+fe(e.indexOf(n)),0)},children:[
|
|
5
5
|
/* @__PURE__ */u("colgroup",{children:[
|
|
6
6
|
/* @__PURE__ */h("col",{style:{width:36}}),e.map((e,t)=>/* @__PURE__ */h("col",{style:{width:fe(t)}},e.key))]}),
|
|
7
7
|
/* @__PURE__ */h("thead",{className:"sticky top-0 z-10",children:/* @__PURE__ */u("tr",{children:[
|
|
8
|
-
/* @__PURE__ */h("th",{className:`${t} ${Oe} text-center w-9 cursor-pointer hover:bg-gray-200`,onClick:()=>{q({row:0,col:0}),J({row:te.length-1,col:e.length-1})},title:C.selectAll,children:"#"}),e.map((n,r)=>{const o=
|
|
9
|
-
return u("th",{className:`${t} ${Oe} cursor-pointer hover:bg-gray-200 relative${o?" !bg-blue-200":""}${I===r?" !bg-blue-100":""}`,style:{width:fe(r)},draggable:!0,onDragStart:()=>(e=>H(e))(r),onDragOver:e=>((e,t)=>{e.preventDefault(),
|
|
8
|
+
/* @__PURE__ */h("th",{className:`${t} ${Oe} text-center w-9 cursor-pointer hover:bg-gray-200`,onClick:()=>{q({row:0,col:0}),J({row:te.length-1,col:e.length-1})},title:C.selectAll,children:"#"}),e.map((n,r)=>{const o=W&&G&&Math.min(W.col,G.col)<=r&&r<=Math.max(W.col,G.col)&&0===Math.min(W.row,G.row)&&Math.max(W.row,G.row)===te.length-1;/* @__PURE__ */
|
|
9
|
+
return u("th",{className:`${t} ${Oe} cursor-pointer hover:bg-gray-200 relative${o?" !bg-blue-200":""}${I===r?" !bg-blue-100":""}`,style:{width:fe(r)},draggable:!0,onDragStart:()=>(e=>H(e))(r),onDragOver:e=>((e,t)=>{e.preventDefault(),X(t)})(e,r),onDrop:()=>(t=>{if(null===F||F===t)return H(null),void X(null);const n=te.map(e=>{const n=[...e],[r]=n.splice(F,1);return n.splice(t,0,r),n});if(f(n),p){const n=[...e],[r]=n.splice(F,1);n.splice(t,0,r),p(n)}H(null),X(null)})(r),onDragEnd:()=>{H(null),X(null)},onClick:e=>{e.shiftKey&&W||q({row:0,col:r}),J({row:te.length-1,col:r})},onContextMenu:e=>ge(e,r),children:[n.title,
|
|
10
10
|
/* @__PURE__ */h("div",{className:"absolute -right-1 top-0 bottom-0 w-2 cursor-col-resize z-20",onMouseDown:e=>((e,t)=>{e.preventDefault(),e.stopPropagation(),z.current={col:t,startX:e.clientX,startW:fe(t)},document.body.style.cursor="col-resize"})(e,r),onDoubleClick:e=>{e.stopPropagation(),be(r)},title:C.resize})]},n.key)})]})}),
|
|
11
|
-
/* @__PURE__ */u("tbody",{children:[Ne>0&&/* @__PURE__ */h("tr",{style:{height:Ne}}),ze.map((t,n)=>{const r
|
|
11
|
+
/* @__PURE__ */u("tbody",{children:[Ne>0&&/* @__PURE__ */h("tr",{style:{height:Ne}}),ze.map((t,n)=>{const r=Le+n,o=W&&G&&Math.min(W.row,G.row)<=r&&r<=Math.max(W.row,G.row)&&0===Math.min(W.col,G.col)&&Math.max(W.col,G.col)===e.length-1;/* @__PURE__ */
|
|
12
12
|
return u("tr",{style:{height:pe(r)},children:[
|
|
13
|
-
/* @__PURE__ */u("td",{className:`relative px-1 py-1 text-center text-2xs text-ink-faintest border-b border-r border-line bg-surface-sunken select-none cursor-pointer hover:bg-gray-200${o?" !bg-blue-200 !text-gray-700":""}${R===r?" !bg-blue-100":""}`,draggable:!0,onDragStart:()=>(e=>K(e))(r),onDragOver:e=>((e,t)=>{e.preventDefault(),P(t)})(e,r),onDrop:()=>(e=>{if(null===T||T===e)return K(null),void P(null);const t=te.map(e=>[...e]),[n]=t.splice(T,1);t.splice(e,0,n),f(t),K(null),P(null)})(r),onDragEnd:()=>{K(null),P(null)},onClick:t=>{t.shiftKey&&
|
|
14
|
-
/* @__PURE__ */h("div",{className:"absolute -bottom-1 left-0 right-0 h-2 cursor-row-resize z-20",onMouseDown:e=>((e,t)=>{e.preventDefault(),e.stopPropagation(),O.current={row:t,startY:e.clientY,startH:pe(t)},document.body.style.cursor="row-resize"})(e,r),onDoubleClick:e=>{e.stopPropagation(),ye(r)},title:C.resize})]}),e.map((e,n)=>{const o=
|
|
15
|
-
return u("td",{className:`relative px-0 py-0 border-b border-r border-gray-200 text-sm${e.readOnly?" bg-gray-50 text-gray-500 cursor-default":" cursor-cell"}${o?" !bg-blue-100":""}${c&&!o?" ring-2 ring-inset ring-blue-400":""}${w?" !bg-blue-50 ring-1 ring-inset ring-blue-300":""}`,onMouseDown:e=>{if(e.target===e.currentTarget){re(e,r,n);const t=e.currentTarget.querySelector("[data-row][data-col]");t?.focus()}},onMouseEnter:()=>oe(r,n),onClick:e=>{if(e.target===e.currentTarget){const t=e.currentTarget.querySelector("[data-row][data-col]");t?.focus()}},onDoubleClick:t=>{t.target!==t.currentTarget||e.readOnly||
|
|
16
|
-
/* @__PURE__ */h(m,{contentEditable:l,suppressContentEditableWarning:!0,tabIndex:0,"data-row":r,"data-col":n,className:`w-full h-full px-2 py-1 rosh-focus-ring whitespace-nowrap overflow-hidden ${"right"===e.align?"text-right":"center"===e.align?"text-center":""} ${e.readOnly?"cursor-default":"cursor-cell"} font-mono ${g}${f}`,onMouseDown:e=>re(e,r,n),onMouseEnter:()=>oe(r,n),onDoubleClick:()=>{e.readOnly||
|
|
13
|
+
/* @__PURE__ */u("td",{className:`relative px-1 py-1 text-center text-2xs text-ink-faintest border-b border-r border-line bg-surface-sunken select-none cursor-pointer hover:bg-gray-200${o?" !bg-blue-200 !text-gray-700":""}${R===r?" !bg-blue-100":""}`,draggable:!0,onDragStart:()=>(e=>K(e))(r),onDragOver:e=>((e,t)=>{e.preventDefault(),P(t)})(e,r),onDrop:()=>(e=>{if(null===T||T===e)return K(null),void P(null);const t=te.map(e=>[...e]),[n]=t.splice(T,1);t.splice(e,0,n),f(t),K(null),P(null)})(r),onDragEnd:()=>{K(null),P(null)},onClick:t=>{t.shiftKey&&W||q({row:r,col:0}),J({row:r,col:e.length-1})},onContextMenu:e=>me(e,r),children:[r+1,
|
|
14
|
+
/* @__PURE__ */h("div",{className:"absolute -bottom-1 left-0 right-0 h-2 cursor-row-resize z-20",onMouseDown:e=>((e,t)=>{e.preventDefault(),e.stopPropagation(),O.current={row:t,startY:e.clientY,startH:pe(t)},document.body.style.cursor="row-resize"})(e,r),onDoubleClick:e=>{e.stopPropagation(),ye(r)},title:C.resize})]}),e.map((e,n)=>{const o=W&&G&&function(e,t,n,r){const o=Math.min(e.row,t.row),l=Math.max(e.row,t.row),c=Math.min(e.col,t.col),a=Math.max(e.col,t.col);return n>=o&&n<=l&&r>=c&&r<=a}(W,G,r,n),l=Y?.row===r&&Y?.col===n&&!e.readOnly,c=E?.row===r&&E?.col===n,a=x?.[`${r}:${n}`],s=W&&G?Math.max(W.row,G.row):-1,i=W&&G?Math.max(W.col,G.col):-1,d=W&&G&&r===s&&n===i,w=V.current&&_&&W&&G&&(()=>{const e=Math.min(W.row,G.row),t=Math.max(W.row,G.row),o=Math.min(W.col,G.col),l=Math.max(W.col,G.col);let c=e,a=t,s=o,i=l;return _.row>t?a=_.row:_.row<e&&(c=_.row),_.col>l?i=_.col:_.col<o&&(s=_.col),r>=c&&r<=a&&n>=s&&n<=i&&!(r>=e&&r<=t&&n>=o&&n<=l)})(),g="sm"===a?.fontSize?"text-2xs":"lg"===a?.fontSize?"text-sm":"xl"===a?.fontSize?"text-base":"text-xs",f=`${a?.bold?" font-bold":""}${a?.italic?" italic":""}${a?.underline?" underline":""}`;/* @__PURE__ */
|
|
15
|
+
return u("td",{className:`relative px-0 py-0 border-b border-r border-gray-200 text-sm${e.readOnly?" bg-gray-50 text-gray-500 cursor-default":" cursor-cell"}${o?" !bg-blue-100":""}${c&&!o?" ring-2 ring-inset ring-blue-400":""}${w?" !bg-blue-50 ring-1 ring-inset ring-blue-300":""}`,onMouseDown:e=>{if(e.target===e.currentTarget){re(e,r,n);const t=e.currentTarget.querySelector("[data-row][data-col]");t?.focus()}},onMouseEnter:()=>oe(r,n),onClick:e=>{if(e.target===e.currentTarget){const t=e.currentTarget.querySelector("[data-row][data-col]");t?.focus()}},onDoubleClick:t=>{t.target!==t.currentTarget||e.readOnly||j({row:r,col:n})},children:[
|
|
16
|
+
/* @__PURE__ */h(m,{contentEditable:l,suppressContentEditableWarning:!0,tabIndex:0,"data-row":r,"data-col":n,className:`w-full h-full px-2 py-1 rosh-focus-ring whitespace-nowrap overflow-hidden ${"right"===e.align?"text-right":"center"===e.align?"text-center":""} ${e.readOnly?"cursor-default":"cursor-cell"} font-mono ${g}${f}`,onMouseDown:e=>re(e,r,n),onMouseEnter:()=>oe(r,n),onDoubleClick:()=>{e.readOnly||j({row:r,col:n})},onFocus:()=>{$({row:r,col:n}),Q.current||(q({row:r,col:n}),J({row:r,col:n}))},onBlur:e=>{const o=e.currentTarget.textContent||"";o!==(t[n]||"")&&ne(r,n,o),j(null)},onInput:()=>ae(r),onPaste:e=>le(e,r,n),onKeyDown:t=>{if(!(l||e.readOnly||1!==t.key.length||t.ctrlKey||t.metaKey||t.altKey))return t.preventDefault(),ne(r,n,t.key),B.current={row:r,col:n},void j({row:r,col:n});ce(t,r,n)},text:t[n]||""}),d&&/* @__PURE__ */h("div",{onMouseDown:xe,title:C.fill,className:"absolute -bottom-[3px] -right-[3px] w-[7px] h-[7px] bg-blue-500 border border-white cursor-crosshair z-30 hover:bg-blue-600"})]},n)})]},r)}),Ae>0&&/* @__PURE__ */h("tr",{style:{height:Ae}})]})]}),se&&i(
|
|
17
17
|
/* @__PURE__ */u(d,{children:[
|
|
18
18
|
/* @__PURE__ */h("div",{className:"fixed inset-0 z-(--z-popup)",onPointerDown:()=>ie(null)}),
|
|
19
19
|
/* @__PURE__ */h("div",{className:"fixed z-(--z-popup) bg-surface rounded-lg shadow-lg border border-line py-1 min-w-[160px]",style:{left:se.x,top:se.y},children:se.items.map((e,t)=>/* @__PURE__ */h("button",{onPointerDown:t=>{t.stopPropagation(),e.onClick()},className:"w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm text-ink hover:bg-gray-100",children:e.label},t))})]}),document.body)]})}export{g as EditableGrid,w as withSpareRow};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Card as e}from"./chunk-P3RXXWXN.js";import{Select_default as a}from"./chunk-
|
|
1
|
+
import{Card as e}from"./chunk-P3RXXWXN.js";import{Select_default as a}from"./chunk-M3JNILT2.js";import{Pagination as r}from"./chunk-LXL2UCUR.js";import{Input_default as t}from"./chunk-HEGSRTXG.js";import{StatusBadgeProvider as i,StatusBadge as s}from"./chunk-JPNAEN53.js";import{Button_default as l}from"./chunk-7DI3VQCF.js";import{Icon as c}from"./chunk-2UO47XB4.js";import{TH_ONE_LINE as m}from"./chunk-CJH2BGXY.js";import{useState as n}from"react";import{jsx as d,jsxs as o}from"react/jsx-runtime";var h={active:"success",invited:"queued",suspended:"danger",pending:"pending"},p=[{name:"Alice Nguyen",email:"alice@acme.co",role:"Admin",status:"active"},{name:"Marco Reyes",email:"marco@acme.co",role:"Editor",status:"invited"},{name:"Priya Patel",email:"priya@acme.co",role:"Editor",status:"active"},{name:"Tom Becker",email:"tom@acme.co",role:"Viewer",status:"suspended"},{name:"Sara Lind",email:"sara@acme.co",role:"Viewer",status:"pending"},{name:"Yuki Tanaka",email:"yuki@acme.co",role:"Editor",status:"active"}];function u(){const[c,u]=n(1),[g,f]=n(""),[y,v]=n("");/* @__PURE__ */
|
|
2
2
|
return d(i,{groups:h,children:/* @__PURE__ */d("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */o("div",{className:"mx-auto max-w-5xl space-y-4",children:[
|
|
3
3
|
/* @__PURE__ */o("div",{className:"flex items-center justify-between gap-4",children:[
|
|
4
4
|
/* @__PURE__ */d("h1",{className:"text-xl font-semibold text-gray-900",children:"Members"}),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r="11.2.0",a=r;export{a as APP_VERSION,r as VERSION};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{useSidebarSheet as e}from"./chunk-QWK6DRSN.js";import{resolveSeverity as t,severityWord as n}from"./chunk-TZFNWAED.js";import{ItemCount as r}from"./chunk-
|
|
1
|
+
import{useSidebarSheet as e}from"./chunk-QWK6DRSN.js";import{resolveSeverity as t,severityWord as n}from"./chunk-TZFNWAED.js";import{ItemCount as r}from"./chunk-P4VKU3SL.js";import{Icon as l}from"./chunk-2UO47XB4.js";import{useBrowserState as a}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-GDQJBQ5B.js";import{useId as o,useRef as c,useEffect as s,Children as u,isValidElement as d}from"react";import{jsx as m,jsxs as h,Fragment as p}from"react/jsx-runtime";function f({children:e,count:t,countLabel:n}){return null==t?/* @__PURE__ */m("p",{className:"px-3 pb-1 pt-1 text-xs font-semibold uppercase tracking-wide text-gray-500",children:e}):/* @__PURE__ */h("p",{className:"flex items-center justify-between gap-2 px-3 pb-1 pt-1 text-xs font-semibold uppercase tracking-wide text-gray-500",children:[
|
|
2
2
|
/* @__PURE__ */m("span",{className:"min-w-0 truncate",children:e}),
|
|
3
|
-
/* @__PURE__ */m(r,{count:t,label:n,showZero:!0})]})}function b(e){return"flex min-w-0 flex-1 items-center justify-between gap-2 rounded-r-lg border-l-2 h-8 px-3 text-sm "+(e?"border-blue-500 bg-accent-tint font-medium text-blue-700":"border-line text-ink hover:bg-gray-100")}function x({label:l,count:a,countLabel:u,active:d,onClick:f,icon:x,trailing:g,severity:w,depth:k=0}){const y=t(w,"SidebarNavItem"),v=i().severity,N=y?n(y,v):void 0,j=e(),S=o(),C=c(null),I=c(l);I.current=l,s(()=>{if(j&&d)return j.report(S,()=>I.current,C.current)},[j,d,S]);const
|
|
3
|
+
/* @__PURE__ */m(r,{count:t,label:n,showZero:!0})]})}function b(e){return"flex min-w-0 flex-1 items-center justify-between gap-2 rounded-r-lg border-l-2 h-8 px-3 text-sm "+(e?"border-blue-500 bg-accent-tint font-medium text-blue-700":"border-line text-ink hover:bg-gray-100")}function x({label:l,count:a,countLabel:u,active:d,onClick:f,icon:x,trailing:g,severity:w,depth:k=0}){const y=t(w,"SidebarNavItem"),v=i().severity,N=y?n(y,v):void 0,j=e(),S=o(),C=c(null),I=c(l);I.current=l,s(()=>{if(j&&d)return j.report(S,()=>I.current,C.current)},[j,d,S]);const L=/* @__PURE__ */h(p,{children:[null!=x&&/* @__PURE__ */m("span",{"aria-hidden":"true",className:"shrink-0 h-4 w-4",children:x}),y&&
|
|
4
4
|
/* @__PURE__ */m("span",{"aria-hidden":"true",title:N,className:`shrink-0 h-1.5 w-1.5 rounded-full ${y.fill}`}),
|
|
5
5
|
/* @__PURE__ */m("span",{className:"min-w-0 truncate mr-auto",title:"string"==typeof l?l:void 0,children:l}),y&&/* @__PURE__ */m("span",{className:"sr-only",children:N}),null!=a&&/* @__PURE__ */m(r,{count:a,label:u,active:d}),null!=g&&/* @__PURE__ */m("span",{className:"shrink-0",children:g})]});/* @__PURE__ */
|
|
6
|
-
return m("button",1===k?{ref:C,type:"button",onClick:f,className:"flex w-full pl-5 text-left",children:/* @__PURE__ */m("span",{className:b(d),children:
|
|
6
|
+
return m("button",1===k?{ref:C,type:"button",onClick:f,className:"flex w-full pl-5 text-left",children:/* @__PURE__ */m("span",{className:b(d),children:L})}:{ref:C,type:"button",onClick:f,className:"flex w-full items-center justify-between gap-2 rounded-lg h-8 px-3 text-sm text-left "+(d?"bg-accent-tint font-medium text-blue-700":"text-ink hover:bg-gray-100"),children:L})}function g({label:e,count:t,countLabel:n,children:i,defaultExpanded:c=!0,storageKey:s}){const p=o(),[f,b]=a(()=>{if(s){let e=null;try{e=window.localStorage.getItem(s)}catch{}if("1"===e||"0"===e)return"1"===e}return c},c),x=!f&&u.toArray(i).some(e=>d(e)&&!0===e.props.active);/* @__PURE__ */
|
|
7
7
|
return h("div",{children:[
|
|
8
8
|
/* @__PURE__ */h("button",{type:"button",onClick:()=>{const e=!f;if(b(e),s)try{window.localStorage.setItem(s,e?"1":"0")}catch{}},"aria-expanded":f,"aria-controls":p,className:"flex w-full items-center gap-2 rounded-lg h-8 px-3 text-sm font-medium text-left "+(x?"bg-accent-tint text-blue-700":"text-ink-strong hover:bg-gray-100"),children:[
|
|
9
9
|
/* @__PURE__ */m("span",{className:"min-w-0 truncate",title:e,children:e}),
|