efficient-shell 10.16.0 → 10.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Browser-RI5X7GMK.js → Browser-4B76MFTG.js} +13 -13
- package/dist/Calculator-AXFKAC7G.js +29 -0
- package/dist/{CurrencyConverter-2GUEE7ZR.js → CurrencyConverter-36BFSFRS.js} +8 -8
- package/dist/{Documents-GI346UL5.js → Documents-VKAMBKSP.js} +15 -15
- package/dist/Files-NRYZG4KY.js +88 -0
- package/dist/{Notepad-HRZKLHO3.js → Notepad-AQXGH6VP.js} +10 -10
- package/dist/{PdfViewer-LU5JKHSG.js → PdfViewer-Y3SAVADX.js} +1 -1
- package/dist/{PomodoroTimer-QYCTTTPZ.js → PomodoroTimer-RHDLKJBY.js} +63 -63
- package/dist/{Preview-LSGN5GN7.js → Preview-DEBTZQP5.js} +47 -47
- package/dist/Sidebar-CB6KRPW2.js +44 -0
- package/dist/{Spreadsheet-7JBZY6KJ.js → Spreadsheet-FSHLWXYP.js} +13 -13
- package/dist/{Stock-ZVQT25IE.js → Stock-CV53A432.js} +3 -3
- package/dist/{Weather-RAUDLLVU.js → Weather-R4MCLH7F.js} +19 -19
- package/dist/{WorldClock-2XBWZ6SZ.js → WorldClock-CSFPCZHU.js} +6 -6
- package/dist/ai/index.d.ts +1 -1
- package/dist/ai/index.js +81 -80
- package/dist/ai.css +1 -1
- 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/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/CartesianPlot.js +1 -1
- package/dist/charts/ChartBrush.js +1 -1
- package/dist/charts/ChartFrame.js +1 -1
- package/dist/charts/ChartSkeleton.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/Meter.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/RankedBars.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/StatTile.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-26RTJKHD.js +2 -0
- package/dist/{chunk-F2R3UFNQ.js → chunk-2E2SUEEE.js} +1 -1
- package/dist/chunk-2EVTN26H.js +2 -0
- package/dist/{chunk-M22B3Y5Y.js → chunk-3IUPYCW3.js} +1 -1
- package/dist/{chunk-N3TOHWFF.js → chunk-3J2PO3KW.js} +1 -1
- package/dist/{chunk-X6BFVDB4.js → chunk-3PR7FLTZ.js} +2 -2
- package/dist/{chunk-PCFBDXLN.js → chunk-3TKMH5VR.js} +1 -1
- package/dist/{chunk-4WEFGKJL.js → chunk-3VLG6LR3.js} +4 -4
- package/dist/{chunk-CBEKJTXU.js → chunk-4D66DUU5.js} +5 -5
- package/dist/{chunk-XDBG4HPV.js → chunk-4EZIWLJJ.js} +1 -1
- package/dist/{chunk-FWVC4A2O.js → chunk-4MJA2SPJ.js} +13 -13
- package/dist/chunk-4Q25UHWB.js +22 -0
- package/dist/{chunk-EZEYKCI6.js → chunk-4ULRP4Y4.js} +1 -1
- package/dist/chunk-4V73LGZG.js +11 -0
- package/dist/{chunk-S6FBMSFU.js → chunk-5IPFQV34.js} +2 -2
- package/dist/{chunk-3ELLBQPS.js → chunk-5LCDCO46.js} +1 -1
- package/dist/{chunk-GISDIVFK.js → chunk-5N5AAYQV.js} +1 -1
- package/dist/{chunk-7HTRLRVO.js → chunk-5VAIVRK6.js} +62 -62
- package/dist/{chunk-RLJHRDDW.js → chunk-5W2OEDUD.js} +8 -8
- package/dist/chunk-6ACS4S4P.js +15 -0
- package/dist/{chunk-ULXCDM7Y.js → chunk-6V4INP7J.js} +10 -10
- package/dist/{chunk-LCJRTJXT.js → chunk-7AZAMDGG.js} +9 -9
- package/dist/{chunk-AKM6JBMD.js → chunk-7ELJQL7J.js} +1 -1
- package/dist/chunk-7RPYVQEV.js +2 -0
- package/dist/{chunk-UPQW4GCT.js → chunk-7TZV6G2F.js} +1 -1
- package/dist/{chunk-VTFZ6W2D.js → chunk-7X4QNWA7.js} +2 -2
- package/dist/{chunk-D7F442OZ.js → chunk-AEJYSUVQ.js} +1 -1
- package/dist/{chunk-QYSEYYV7.js → chunk-AFINCNY3.js} +1 -1
- package/dist/{chunk-DKGZPVLL.js → chunk-AFYLVV74.js} +1 -1
- package/dist/{chunk-H4HB5OET.js → chunk-AWKJZSTO.js} +1 -1
- package/dist/chunk-B3CN55UI.js +2 -0
- package/dist/{chunk-CQV3VSI2.js → chunk-B4HSNEBK.js} +1 -1
- package/dist/{chunk-57HN6MPC.js → chunk-BE777IO7.js} +2 -2
- package/dist/{chunk-K4ANB6AF.js → chunk-BVIOCAEU.js} +1 -1
- package/dist/{chunk-4UKGVLFP.js → chunk-BZUA5F33.js} +1 -1
- package/dist/{chunk-QP4UPCXQ.js → chunk-C764JODK.js} +1 -1
- package/dist/chunk-CCIGAU5Y.js +6 -0
- package/dist/{chunk-CKKUFDZ3.js → chunk-CF7BMDU3.js} +18 -18
- package/dist/{chunk-LEDUD23S.js → chunk-CLTRQ7AQ.js} +1 -1
- package/dist/{chunk-7TNAOZZ2.js → chunk-CNUHLJYD.js} +1 -1
- package/dist/chunk-CUKDQPEN.js +19 -0
- package/dist/{chunk-ISJPW2FZ.js → chunk-D6OYQM4V.js} +11 -11
- package/dist/{chunk-W6URVLQF.js → chunk-DOC52JBV.js} +17 -17
- package/dist/{chunk-IOJNSX4N.js → chunk-DQQKG46I.js} +7 -7
- package/dist/{chunk-INNIWRVU.js → chunk-E6GDAV5R.js} +2 -2
- package/dist/{chunk-TM33D3CE.js → chunk-EC527NE3.js} +1 -1
- package/dist/{chunk-RCPFUDPS.js → chunk-EDMDKQNO.js} +3 -3
- package/dist/{chunk-3EJ64VKE.js → chunk-EN5NXWT6.js} +1 -1
- package/dist/{chunk-MTEFYFUO.js → chunk-ENDCV7B3.js} +9 -9
- package/dist/{chunk-MCDM2G4W.js → chunk-EOWUUOVE.js} +1 -1
- package/dist/{chunk-4G2C6J4I.js → chunk-EQCFPRKJ.js} +1 -1
- package/dist/{chunk-TXDA7TTP.js → chunk-EQZZ4V5X.js} +1 -1
- package/dist/{chunk-WINNA7LS.js → chunk-EZUQ5NXE.js} +1 -1
- package/dist/chunk-F7Z47OIF.js +12 -0
- package/dist/{chunk-2SY76NFO.js → chunk-FEATDGFD.js} +4 -4
- package/dist/chunk-FX6DBXXD.js +1 -0
- package/dist/{chunk-7JGR7WPD.js → chunk-G4JTO5PB.js} +1 -1
- package/dist/{chunk-SG4LO2AN.js → chunk-G4PGEQOX.js} +10 -10
- package/dist/{chunk-W3OWPBQL.js → chunk-GD7ILVPF.js} +2 -2
- package/dist/chunk-GDQJBQ5B.js +1 -0
- package/dist/chunk-GLBLKHYA.js +5 -0
- package/dist/{chunk-WB4P4QE2.js → chunk-H7BKSATJ.js} +1 -1
- package/dist/{chunk-L4IW77TD.js → chunk-HJ2BDUO6.js} +4 -4
- package/dist/chunk-HJCUDXLV.js +1 -0
- package/dist/{chunk-SDQIXE5M.js → chunk-HLQVB7FG.js} +8 -8
- package/dist/chunk-HLVOHOBC.js +6 -0
- package/dist/{chunk-QHOBK35Y.js → chunk-HS2E7DVI.js} +1 -1
- package/dist/chunk-HXNMRJQ4.js +2 -0
- package/dist/chunk-HXZ5XPBS.js +3 -0
- package/dist/{chunk-3LDXURVU.js → chunk-HYDVHGVT.js} +2 -2
- package/dist/chunk-IDV32UV7.js +29 -0
- package/dist/chunk-IHFZ7OXO.js +14 -0
- package/dist/{chunk-MNSKGMVZ.js → chunk-ILP7QVW5.js} +8 -8
- package/dist/{chunk-KJ4CBZEQ.js → chunk-IMDGMUE3.js} +1 -1
- package/dist/{chunk-JGTGQGHY.js → chunk-IX7QXMNJ.js} +1 -1
- package/dist/chunk-JFH5HW2G.js +12 -0
- package/dist/{chunk-HNBGLF4B.js → chunk-JFV5CQN4.js} +1 -1
- package/dist/{chunk-7MSC3Z5H.js → chunk-JH4ZCPHW.js} +8 -8
- package/dist/{chunk-OOLPDASG.js → chunk-JSG2AKCG.js} +1 -1
- package/dist/{chunk-6RX4PVBU.js → chunk-JTMEFXRL.js} +1 -1
- package/dist/{chunk-YOSUCCHG.js → chunk-K7L3ZCPB.js} +3 -3
- package/dist/chunk-KLBJ646Z.js +8 -0
- package/dist/{chunk-7NBSBGLX.js → chunk-L2RS2UQM.js} +8 -8
- package/dist/{chunk-PYAJCN2Q.js → chunk-LAMRQE2P.js} +1 -1
- package/dist/{chunk-ULAGXDOL.js → chunk-LXL2UCUR.js} +1 -1
- package/dist/{chunk-O6JJIR4H.js → chunk-M5LR7ZZX.js} +1 -1
- package/dist/{chunk-UWIZX3RK.js → chunk-MAFSELZK.js} +1 -1
- package/dist/{chunk-N67QX3WW.js → chunk-MMQ6ETRD.js} +2 -2
- package/dist/{chunk-XTCXX5LJ.js → chunk-MS5APD3V.js} +1 -1
- package/dist/chunk-MUXGWDEH.js +2 -0
- package/dist/{chunk-GPJO34QP.js → chunk-N4ZEB4UD.js} +9 -9
- package/dist/{chunk-E3753CWP.js → chunk-NRI26RYC.js} +2 -2
- package/dist/{chunk-7HLC352T.js → chunk-NVFYLTJ6.js} +17 -17
- package/dist/chunk-NXVFY22L.js +9 -0
- package/dist/{chunk-QDQ347RL.js → chunk-NYEMGKAE.js} +1 -1
- package/dist/{chunk-5UYZ75F3.js → chunk-NZGNOMWX.js} +12 -12
- package/dist/{chunk-3NW5LD7D.js → chunk-NZQCDFDG.js} +3 -3
- package/dist/{chunk-BJXDOM2N.js → chunk-OBJGUJIE.js} +1 -1
- package/dist/{chunk-AUWTGM65.js → chunk-OH5L6HYW.js} +3 -3
- package/dist/{chunk-ZURB2DCM.js → chunk-OPN4I565.js} +1 -1
- package/dist/{chunk-7SMV6G4Z.js → chunk-ORIXCEKO.js} +1 -1
- package/dist/{chunk-FEQDZTZ7.js → chunk-OUIE2N2Z.js} +6 -6
- package/dist/{chunk-TOVKWNI2.js → chunk-P3RXXWXN.js} +6 -6
- package/dist/{chunk-ON67HF5K.js → chunk-PCTOL2FX.js} +8 -8
- package/dist/{chunk-6XBWM453.js → chunk-Q3IR5SKD.js} +1 -1
- package/dist/{chunk-7ZP64SC7.js → chunk-Q5QS5MFX.js} +1 -1
- package/dist/{chunk-4QJOEHM6.js → chunk-QEB2UTHO.js} +7 -7
- package/dist/{chunk-I2XGPTCN.js → chunk-QJLBBDX2.js} +1 -1
- package/dist/{chunk-AJO72CPB.js → chunk-QLVJ5W4G.js} +2 -2
- package/dist/chunk-QO5E33DH.js +8 -0
- package/dist/{chunk-LPXMHYTM.js → chunk-QVZKRROQ.js} +1 -1
- package/dist/{chunk-EXJXOKUU.js → chunk-QYL26AB4.js} +1 -1
- package/dist/chunk-RAAH4TQU.js +1 -0
- package/dist/{chunk-JJW43QPS.js → chunk-RBEI4CKX.js} +5 -5
- package/dist/{chunk-TVH7IZQ4.js → chunk-REWKL7MX.js} +2 -2
- package/dist/{chunk-MVZRZTQP.js → chunk-S5SRXI4V.js} +1 -1
- package/dist/{chunk-QYRMFGES.js → chunk-SAP4YI2Y.js} +1 -1
- package/dist/{chunk-KTA77U3P.js → chunk-SDATPJM2.js} +4 -4
- package/dist/{chunk-KEPJWZJZ.js → chunk-SL77N7VT.js} +3 -3
- package/dist/{chunk-UDRMZ22J.js → chunk-SOBGCIPF.js} +1 -1
- package/dist/{chunk-H32EQG5Z.js → chunk-SOJEQHZ2.js} +9 -9
- package/dist/{chunk-34URULVW.js → chunk-SQCUN2DX.js} +1 -1
- package/dist/chunk-SRWZE3WA.js +6 -0
- package/dist/{chunk-5RE6R3XC.js → chunk-SXNQHIBY.js} +1 -1
- package/dist/{chunk-GGK27H67.js → chunk-TGGUYAWA.js} +1 -1
- package/dist/chunk-TGXO3CDO.js +2 -0
- package/dist/{chunk-74OUAR6L.js → chunk-TIGTIT3L.js} +6 -6
- package/dist/{chunk-UYRITNQW.js → chunk-TLWGOQI3.js} +3 -3
- package/dist/{chunk-MQU3PZUS.js → chunk-TMMNCXQT.js} +1 -1
- package/dist/chunk-TNDRHHKN.js +14 -0
- package/dist/{chunk-SHKBDFSE.js → chunk-TXDBOSSB.js} +1 -1
- package/dist/{chunk-DRDYZ633.js → chunk-U32J7D4Q.js} +2 -2
- package/dist/{chunk-LDE5IV2M.js → chunk-UABVKJK7.js} +4 -4
- package/dist/{chunk-UTWJKSET.js → chunk-UEISJFZH.js} +5 -5
- package/dist/{chunk-B7UCXROE.js → chunk-UG6RI525.js} +1 -1
- package/dist/chunk-UXPBVRSE.js +7 -0
- package/dist/{chunk-W5CJD54C.js → chunk-VAK5FQXH.js} +1 -1
- package/dist/{chunk-O7DW2BKY.js → chunk-VHF3CJVO.js} +28 -28
- package/dist/{chunk-7X5FABQS.js → chunk-VHPT7ZS5.js} +5 -5
- package/dist/{chunk-MHB52H2Y.js → chunk-WON5GBJY.js} +12 -12
- package/dist/{chunk-D4I3U7UE.js → chunk-WS7XIJS6.js} +1 -1
- package/dist/{chunk-AOK3BHRT.js → chunk-WWLKVGV7.js} +4 -4
- package/dist/{chunk-G4GVLK44.js → chunk-WZ5QSSUM.js} +6 -6
- package/dist/{chunk-LO5T2K4B.js → chunk-X2KMUHBB.js} +3 -3
- package/dist/{chunk-CPZ42W2B.js → chunk-XCAO2F3H.js} +1 -1
- package/dist/chunk-XGJQVIEG.js +2 -0
- package/dist/{chunk-PVZGSCCB.js → chunk-XKJ7GEVA.js} +5 -5
- package/dist/chunk-XPTOKPUM.js +11 -0
- package/dist/{chunk-XZGGJHJC.js → chunk-XQMPLXGG.js} +15 -15
- package/dist/{chunk-VKKK4WLS.js → chunk-XQZL6JDD.js} +6 -6
- package/dist/{chunk-JEH5EVIG.js → chunk-XSJHN2GD.js} +1 -1
- package/dist/{chunk-2VGQS6CW.js → chunk-XTV3CAV7.js} +1 -1
- package/dist/{chunk-3AH524CN.js → chunk-XYECIBVX.js} +1 -1
- package/dist/{chunk-6C6TRDNI.js → chunk-YG2TWBDH.js} +1 -1
- package/dist/chunk-YG6Y5X7S.js +7 -0
- package/dist/chunk-YJ5IHIAI.js +2 -0
- package/dist/{chunk-NBVHJZVS.js → chunk-YQFGRYEF.js} +12 -12
- package/dist/chunk-YUECA3XB.js +8 -0
- package/dist/chunk-YYZ73H64.js +7 -0
- package/dist/{chunk-7UTPXU6K.js → chunk-ZF2MNQXY.js} +1 -1
- package/dist/{chunk-ZW3IDCP2.js → chunk-ZGOHRLXG.js} +1 -1
- package/dist/{chunk-6AS5PHHK.js → chunk-ZI3DGOW6.js} +17 -17
- package/dist/{chunk-TKJBZIHT.js → chunk-ZMRGHVKS.js} +1 -1
- package/dist/data/DataTable.js +1 -1
- package/dist/data/Kanban.js +1 -1
- package/dist/data/ListFooter.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/Pagination.js +1 -1
- package/dist/file-intake/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/Calendar.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DatePicker.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DateTimePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/FormErrorSummary.js +1 -1
- package/dist/forms/IconButton.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/ImageFocusPoint.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.d.ts +1 -1
- package/dist/forms/Select.js +1 -1
- package/dist/forms/SidesInput.js +1 -1
- package/dist/forms/Slider.js +1 -1
- package/dist/forms/Snippet.js +1 -1
- package/dist/forms/SplitButton.js +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.d.ts +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/TimePicker.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/mediaLibraryMenu.js +1 -1
- package/dist/forms/mediaMoveItems.js +1 -1
- package/dist/forms/textAlign.d.ts +1 -1
- package/dist/forms/textAlign.js +1 -1
- package/dist/forms/useFileIntake.js +1 -1
- package/dist/hooks/useTheme.d.ts +1 -1
- package/dist/icons/efficient-glyphs.d.ts +2 -0
- package/dist/icons/efficient-glyphs.js +1 -1
- package/dist/icons/efficient-looks.d.ts +4 -0
- package/dist/icons/efficient-looks.js +1 -1
- package/dist/icons/efficient-meanings.d.ts +2 -0
- package/dist/icons/efficient-meanings.js +1 -1
- package/dist/icons/efficient.d.ts +2 -0
- package/dist/icons/efficient.js +1 -1
- package/dist/icons/glyphs/SeparatorSlashIcon.d.ts +8 -0
- package/dist/icons/glyphs/SeparatorSlashIcon.js +1 -0
- package/dist/icons/glyphs/SeparatorTriangleIcon.d.ts +8 -0
- package/dist/icons/glyphs/SeparatorTriangleIcon.js +1 -0
- package/dist/icons/index.d.ts +2 -2
- package/dist/icons/index.js +1 -1
- package/dist/icons/looks/SeparatorSlashMiniIcon.d.ts +8 -0
- package/dist/icons/looks/SeparatorSlashMiniIcon.js +1 -0
- package/dist/icons/looks/SeparatorSlashSolidIcon.d.ts +8 -0
- package/dist/icons/looks/SeparatorSlashSolidIcon.js +1 -0
- package/dist/icons/looks/SeparatorTriangleMiniIcon.d.ts +8 -0
- package/dist/icons/looks/SeparatorTriangleMiniIcon.js +1 -0
- package/dist/icons/looks/SeparatorTriangleSolidIcon.d.ts +8 -0
- package/dist/icons/looks/SeparatorTriangleSolidIcon.js +1 -0
- package/dist/icons/looks/map.js +1 -1
- package/dist/icons/sets.js +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +256 -256
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +8 -8
- package/dist/{names-Bmx_9y41.d.ts → names-CkQuQ47O.d.ts} +1 -1
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/shell/Accordion.js +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/Avatar.js +1 -1
- package/dist/shell/Banner.js +1 -1
- package/dist/shell/Breadcrumbs.js +1 -1
- package/dist/shell/BudgetBar.js +1 -1
- package/dist/shell/Card.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContainerFillChart.js +1 -1
- package/dist/shell/ContextMenu.js +1 -1
- package/dist/shell/CountBadge.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/DropdownMenu.js +1 -1
- package/dist/shell/EditableGrid.js +1 -1
- package/dist/shell/EmptyState.js +1 -1
- package/dist/shell/FloatingBar.js +1 -1
- package/dist/shell/GlobalSearch.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/IconRail.js +1 -1
- package/dist/shell/ImageLightbox.js +1 -1
- package/dist/shell/ItemCount.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.d.ts +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/MetricBar.js +1 -1
- package/dist/shell/MetricBarLegend.js +1 -1
- package/dist/shell/MilestoneTimeline.js +1 -1
- package/dist/shell/PageHeader.js +1 -1
- package/dist/shell/Popover.js +1 -1
- package/dist/shell/PopupMenu.js +1 -1
- package/dist/shell/ProductionTimeline.js +1 -1
- package/dist/shell/ResizeHandle.js +1 -1
- package/dist/shell/Result.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SettingRow.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/Statistic.js +1 -1
- package/dist/shell/StatusBadge.js +1 -1
- package/dist/shell/Tabs.js +1 -1
- package/dist/shell/TimeAgo.js +1 -1
- package/dist/shell/TimelineTrack.js +1 -1
- package/dist/shell/Tooltip.js +1 -1
- package/dist/shell/TopNav.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/discardGuard.js +1 -1
- package/dist/shell/language.js +1 -1
- package/dist/shell/strings.d.ts +6 -0
- package/dist/shell/strings.js +1 -1
- package/dist/shell/toast.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/ErrorPage.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-Y566OMJZ.js +0 -29
- package/dist/Files-UA23KXN7.js +0 -88
- package/dist/Sidebar-2P26444H.js +0 -44
- package/dist/chunk-2JG5JU4M.js +0 -8
- package/dist/chunk-4PAWQEXM.js +0 -1
- package/dist/chunk-7XYTJPWW.js +0 -29
- package/dist/chunk-BNJWZAQE.js +0 -12
- package/dist/chunk-COJYPNKF.js +0 -2
- package/dist/chunk-DESWIPOZ.js +0 -3
- package/dist/chunk-DWR7MYQU.js +0 -7
- package/dist/chunk-EU3JZGV2.js +0 -14
- package/dist/chunk-I4VIEGCX.js +0 -2
- package/dist/chunk-IKNG7EFQ.js +0 -12
- package/dist/chunk-JSGQWVYH.js +0 -7
- package/dist/chunk-KTVXPGGB.js +0 -11
- package/dist/chunk-LU6NA4RU.js +0 -5
- package/dist/chunk-M4K6FLIY.js +0 -1
- package/dist/chunk-PJQGYKN6.js +0 -11
- package/dist/chunk-PN5FQVMB.js +0 -7
- package/dist/chunk-PN65IIYN.js +0 -8
- package/dist/chunk-PUF75SMJ.js +0 -1
- package/dist/chunk-Q6YNMNUH.js +0 -6
- package/dist/chunk-RPYFOQM2.js +0 -6
- package/dist/chunk-RRUHQLUY.js +0 -14
- package/dist/chunk-TMNAHOJ7.js +0 -9
- package/dist/chunk-UBMY23AG.js +0 -6
- package/dist/chunk-VNACNNCJ.js +0 -19
- package/dist/chunk-W35N7SL3.js +0 -8
- package/dist/chunk-W4OBVKN4.js +0 -1
- package/dist/chunk-WMEYNKXZ.js +0 -22
- package/dist/chunk-Y3R267FV.js +0 -15
- package/dist/chunk-ZZVE64OI.js +0 -2
- /package/dist/{chunk-6V6ANLHW.js → chunk-Y2AGVGOP.js} +0 -0
|
@@ -0,0 +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{ChartTooltip as r}from"./chunk-WZ5QSSUM.js";import{angleScale as n}from"./chunk-2JWPNR2U.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 U=v/2,$=v/2,W=v/2-10,Y=x??Math.max(...g.map(e=>e.value),1),z="track"===k?Math.max(6,(W-.16*v)/g.length):0,A=Math.max(1,Math.floor((W-.16*v)/z||1)),F="track"===k?g.slice(0,A):g,G=Math.min(j,Math.max(1,z-2)),H=n(F.length,.03),I=null!==E?F[E]:void 0;/* @__PURE__ */
|
|
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":B,onMouseLeave:()=>P(null),children:[
|
|
4
|
+
/* @__PURE__ */p("title",{id:B,children:"track"===k?C.radialTrack(F.length):C.radialCycle(F.length)}),F.map((l,r)=>{const n=o(r,l.color,l.tone),s=Math.max(0,Math.min(1,l.value/Y)),c=((e,t)=>null!==E?E!==e:null!==T&&T!==t)(r,l.key);if("track"===k){const o=W-r*z,m=o-z+G,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(U,$,m,o,h,h+f),fill:i.grid}),
|
|
7
|
+
/* @__PURE__ */p("path",{d:e(U,$,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(U,$,m,m+(W-m)*s,H(r),H(r)+H.step),fill:n})},l.key)})]}),I&&null!==E&&/* @__PURE__ */p("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */p(r,{title:I.label,rows:[{key:"value",label:C.value,color:o(E,I.color,I.tone),value:Q(I.value)}]})}),
|
|
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
|
+
/* @__PURE__ */p("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:o(t,e.color,e.tone)}}),
|
|
11
|
+
/* @__PURE__ */p("span",{className:"flex-1 truncate",children:e.label}),
|
|
12
|
+
/* @__PURE__ */p("span",{className:"tabular-nums text-gray-800",children:Q(e.value)})]},e.key))})]})}export{g as RadialBarChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Sparkline as e}from"./chunk-CKCDGSTC.js";import{STATUS_VARS as t,resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as r,useShellLocale as n}from"./chunk-
|
|
1
|
+
import{Sparkline as e}from"./chunk-CKCDGSTC.js";import{STATUS_VARS as t,resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as r,useShellLocale as n}from"./chunk-GDQJBQ5B.js";import{formatPlain as l}from"./chunk-C3QOHMR6.js";import{jsxs as s,jsx as o}from"react/jsx-runtime";var d={up:{glyph:"▲",word:"trendUp"},down:{glyph:"▼",word:"trendDown"},flat:{glyph:"■",word:"trendFlat"}};function i({label:i,value:m,unit:c,delta:h,deltaTone:p,trend:u,trendTone:g,footnote:x,className:f}){const y=r().charts,w=n(),N=null==h?null:h>0?"up":h<0?"down":"flat",b=p?t[p]:void 0,k=g?t[g]:a(0);/* @__PURE__ */
|
|
2
2
|
return s("div",{className:`flex flex-col gap-0.5 rounded-lg border border-gray-200 bg-white p-4 ${f??""}`,children:[
|
|
3
3
|
/* @__PURE__ */o("span",{className:"text-xs font-medium uppercase tracking-wide text-gray-500",children:i}),
|
|
4
4
|
/* @__PURE__ */s("span",{className:"flex items-baseline gap-2",children:[
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{fromDateKey as e,toMonthKey as t,toDateKey as r,fromMonthKey as a}from"./chunk-2HMNOLKX.js";import{calendarNames as n,firstDayOfWeek as o}from"./chunk-Y3JW2GW5.js";import{Icon as l}from"./chunk-2UO47XB4.js";import{useBrowserValue as i}from"./chunk-D65T4H6J.js";import{useShellStrings as s,useShellLocale as c}from"./chunk-
|
|
1
|
+
import{fromDateKey as e,toMonthKey as t,toDateKey as r,fromMonthKey as a}from"./chunk-2HMNOLKX.js";import{calendarNames as n,firstDayOfWeek as o}from"./chunk-Y3JW2GW5.js";import{Icon as l}from"./chunk-2UO47XB4.js";import{useBrowserValue as i}from"./chunk-D65T4H6J.js";import{useShellStrings as s,useShellLocale as c}from"./chunk-GDQJBQ5B.js";import{useMemo as g,useState as u,useRef as d,useEffect as h}from"react";import{jsxs as m,jsx as f,Fragment as b}from"react/jsx-runtime";var y="grid grid-cols-[repeat(7,minmax(0,40px))] sm:grid-cols-[repeat(7,minmax(0,32px))] justify-center gap-1";var v=()=>r(/* @__PURE__ */new Date);var p=(e,t)=>new Date(e.getFullYear(),e.getMonth(),e.getDate()+t),x=(e,t)=>{const r=new Date(e.getFullYear(),e.getMonth()+t,1),a=new Date(r.getFullYear(),r.getMonth()+1,0).getDate();return new Date(r.getFullYear(),r.getMonth(),Math.min(e.getDate(),a))};function w({value:w,endValue:D,mode:M="single",onSelect:N,min:Y,max:k,month:F,defaultMonth:j,onMonthChange:A,weekStartsOn:C,quickJump:S=!0,markedDates:q,readOnly:B=!1,"aria-label":J,className:K=""}){const O=g(()=>new Set(q??[]),[q]),P=e(w),W=i(v,null),H=e(W),U=s().calendar,$=c(),E=n($),G=i(()=>o($),0),L=C??G,Q=()=>{if(!H)return null;const e=t(H);return Y&&e<Y.slice(0,7)?Y.slice(0,7):k&&e>k.slice(0,7)?k.slice(0,7):e},[X,I]=u(()=>j||(P?t(P):Q())),R=F??X??Q(),T=null===R?null:function(e,t){return a(e)??t}(R,H),[V,z]=u(()=>w??W),Z=d(null),_=d(!1),[ee,te]=u("days"),re=g(()=>T?function(e,t){const r=new Date(e.getFullYear(),e.getMonth(),1),a=(r.getDay()-t+7)%7,n=new Date(r.getFullYear(),r.getMonth(),1-a);return Array.from({length:42},(e,t)=>new Date(n.getFullYear(),n.getMonth(),n.getDate()+t))}(T,L):[],[R,L]),ae=e=>!!Y&&e<Y||!!k&&e>k,ne=V??W,oe=re.some(e=>r(e)===ne),le=T?re.find(e=>e.getMonth()===T.getMonth())??re[0]:null,ie=oe&&ne?ne:le?r(le):"";if(h(()=>{_.current&&(_.current=!1,Z.current?.querySelector('[data-active="true"]')?.focus())},[ie,R]),!T)/* @__PURE__ */
|
|
2
2
|
return m("div",{className:K,"aria-hidden":"true","data-calendar-pending":"",children:[
|
|
3
3
|
/* @__PURE__ */f("div",{className:"mb-2 h-6"}),
|
|
4
|
-
/* @__PURE__ */f("div",{className:"space-y-1",children:Array.from({length:7},(e,t)=>/* @__PURE__ */f("div",0===t?{className:"py-1 text-xs",children:" "}:{className:y,children:/* @__PURE__ */f("span",{className:"aspect-square"})},t))})]});const se=e=>"years"===ee?new Date(T.getFullYear()+12*e,T.getMonth(),1):"months"===ee?new Date(T.getFullYear()+e,T.getMonth(),1):x(T,e),ce=e=>{const r=t(e);void 0===F&&
|
|
4
|
+
/* @__PURE__ */f("div",{className:"space-y-1",children:Array.from({length:7},(e,t)=>/* @__PURE__ */f("div",0===t?{className:"py-1 text-xs",children:" "}:{className:y,children:/* @__PURE__ */f("span",{className:"aspect-square"})},t))})]});const se=e=>"years"===ee?new Date(T.getFullYear()+12*e,T.getMonth(),1):"months"===ee?new Date(T.getFullYear()+e,T.getMonth(),1):x(T,e),ce=e=>{const r=t(e);void 0===F&&I(r),A?.(r)},ge=J??E.monthYear(T.getFullYear(),T.getMonth());/* @__PURE__ */
|
|
5
5
|
return m("div",{className:K,children:[
|
|
6
6
|
/* @__PURE__ */m("div",{className:"mb-2 flex items-center justify-between px-1",children:[
|
|
7
7
|
/* @__PURE__ */f("button",{type:"button","aria-label":"years"===ee?U.previousYears:"months"===ee?U.previousYear:U.previousMonth,onClick:()=>ce(se(-1)),className:"rounded-full p-1 text-gray-600 hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */f(l,{name:"chevron-left",className:"h-4 w-4",strokeWidth:"2","aria-hidden":"true"})}),
|
|
8
|
-
/* @__PURE__ */f("div",{"aria-live":"polite",className:"flex items-center gap-1 text-sm font-semibold text-gray-800",children:S?/* @__PURE__ */m(b,{children:["years"!==ee&&/* @__PURE__ */f("button",{type:"button","aria-label":U.chooseMonth(
|
|
9
|
-
/* @__PURE__ */f("button",{type:"button","aria-label":U.chooseYear(T.getFullYear()),onClick:()=>te(e=>"years"===e?"days":"years"),className:"rounded-md px-2 py-0.5 transition-colors hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:T.getFullYear()})]}):/* @__PURE__ */f("span",{children
|
|
10
|
-
/* @__PURE__ */f("button",{type:"button","aria-label":"years"===ee?U.nextYears:"months"===ee?U.nextYear:U.nextMonth,onClick:()=>ce(se(1)),className:"rounded-full p-1 text-gray-600 hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */f(l,{name:"chevron-right",className:"h-4 w-4",strokeWidth:"2","aria-hidden":"true"})})]}),"months"===ee&&/* @__PURE__ */f("div",{role:"group","aria-label":U.monthPanel,className:"grid grid-cols-3 gap-1 text-center text-sm",children
|
|
11
|
-
/* @__PURE__ */m("div",{ref:Z,role:"grid","aria-label":ge,className:"space-y-1","aria-readonly":
|
|
8
|
+
/* @__PURE__ */f("div",{"aria-live":"polite",className:"flex items-center gap-1 text-sm font-semibold text-gray-800",children:S?/* @__PURE__ */m(b,{children:["years"!==ee&&/* @__PURE__ */f("button",{type:"button","aria-label":U.chooseMonth(E.months[T.getMonth()]),onClick:()=>te(e=>"months"===e?"days":"months"),className:"rounded-md px-2 py-0.5 transition-colors hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:E.months[T.getMonth()]}),
|
|
9
|
+
/* @__PURE__ */f("button",{type:"button","aria-label":U.chooseYear(T.getFullYear()),onClick:()=>te(e=>"years"===e?"days":"years"),className:"rounded-md px-2 py-0.5 transition-colors hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:T.getFullYear()})]}):/* @__PURE__ */f("span",{children:E.monthYear(T.getFullYear(),T.getMonth())})}),
|
|
10
|
+
/* @__PURE__ */f("button",{type:"button","aria-label":"years"===ee?U.nextYears:"months"===ee?U.nextYear:U.nextMonth,onClick:()=>ce(se(1)),className:"rounded-full p-1 text-gray-600 hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */f(l,{name:"chevron-right",className:"h-4 w-4",strokeWidth:"2","aria-hidden":"true"})})]}),"months"===ee&&/* @__PURE__ */f("div",{role:"group","aria-label":U.monthPanel,className:"grid grid-cols-3 gap-1 text-center text-sm",children:E.monthsShort.map((e,t)=>/* @__PURE__ */f("button",{type:"button","aria-pressed":t===T.getMonth(),onClick:()=>{ce(new Date(T.getFullYear(),t,1)),te("days")},className:["rounded-md py-4 transition-colors rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",t===T.getMonth()?"bg-blue-600 font-semibold text-white":H&&t===H.getMonth()&&T.getFullYear()===H.getFullYear()?"font-medium text-blue-600 hover:bg-gray-100":"text-gray-700 hover:bg-gray-100"].join(" "),children:e},e))}),"years"===ee&&/* @__PURE__ */f("div",{role:"group","aria-label":U.yearPanel,className:"grid grid-cols-3 gap-1 text-center text-sm",children:Array.from({length:12},(e,t)=>{return r=T.getFullYear(),12*Math.floor(r/12)+t;var r}).map(e=>/* @__PURE__ */f("button",{type:"button","aria-pressed":e===T.getFullYear(),onClick:()=>{ce(new Date(e,T.getMonth(),1)),te("months")},className:["rounded-md py-4 transition-colors rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",e===T.getFullYear()?"bg-blue-600 font-semibold text-white":e===H?.getFullYear()?"font-medium text-blue-600 hover:bg-gray-100":"text-gray-700 hover:bg-gray-100"].join(" "),children:e},e))}),
|
|
11
|
+
/* @__PURE__ */m("div",{ref:Z,role:"grid","aria-label":ge,className:"space-y-1","aria-readonly":B||void 0,onKeyDown:a=>{const n=e(ie)??H??T,o={ArrowLeft:()=>p(n,-1),ArrowRight:()=>p(n,1),ArrowUp:()=>p(n,-7),ArrowDown:()=>p(n,7),Home:()=>p(n,-(n.getDay()-L+7)%7),End:()=>p(n,6-(n.getDay()-L+7)%7),PageUp:()=>x(n,a.shiftKey?-12:-1),PageDown:()=>x(n,a.shiftKey?12:1)};if(o[a.key])return a.preventDefault(),l=o[a.key](),_.current=!0,z(r(l)),void(t(l)!==R&&ce(l));var l;"Enter"!==a.key&&" "!==a.key||(a.preventDefault(),B||ae(ie)||N(ie))},hidden:"days"!==ee,children:[
|
|
12
12
|
/* @__PURE__ */f("div",{role:"row",className:`${y} text-center text-xs font-medium text-ink-faint`,children:Array.from({length:7},(e,t)=>(t+L)%7).map(e=>
|
|
13
|
-
/* @__PURE__ */f("div",{role:"columnheader","aria-label"
|
|
14
|
-
return f("div",{role:"gridcell","aria-selected":n,"aria-label":
|
|
13
|
+
/* @__PURE__ */f("div",{role:"columnheader","aria-label":E.weekdays[e],className:"py-1",children:/* @__PURE__ */f("abbr",{title:E.weekdays[e],className:"no-underline",children:E.weekdaysShort[e]})},e))}),Array.from({length:6},(e,t)=>/* @__PURE__ */f("div",{role:"row",className:`${y} text-center text-sm`,children:re.slice(7*t,7*t+7).map(e=>{const t=r(e),a=e.getMonth()!==T.getMonth(),n=t===w||"range"===M&&t===D,o=(e=>!("range"!==M||!w||!D)&&e>w&&e<D)(t),l=ae(t),i=E.longDate(e.getFullYear(),e.getMonth(),e.getDate()),s=e=>["relative w-full aspect-square rounded-md transition-colors",e?"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"",l?"cursor-not-allowed text-gray-300":n?"bg-accent-fill font-semibold text-on-accent":o?"bg-accent-tint-strong text-blue-800":a?"text-ink-faint"+(e?" hover:bg-gray-100":""):"text-ink"+(e?" hover:bg-gray-100":""),t!==W||n?"":"font-semibold text-blue-600"].filter(Boolean).join(" "),c=O.has(t)&&/* @__PURE__ */f("span",{"data-marked":"","aria-hidden":"true",className:"absolute bottom-1 left-1/2 h-1 w-1 -translate-x-1/2 rounded-full "+(n?"bg-surface":a?"bg-gray-400":"bg-blue-500")});/* @__PURE__ */
|
|
14
|
+
return f("div",{role:"gridcell","aria-selected":n,"aria-label":B?i:void 0,children:B?/* @__PURE__ */m("span",{"aria-hidden":"true",className:`grid place-items-center ${s(!1)}`,children:[e.getDate(),c]}):/* @__PURE__ */m("button",{type:"button","data-active":t===ie,tabIndex:t===ie?0:-1,disabled:l,"aria-label":i,"aria-current":t===W?"date":void 0,onClick:()=>{z(t),N(t)},className:s(!0),children:[e.getDate(),c]})},t)})},t))]})]})}export{w as Calendar};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{EmptyValue as r}from"./chunk-HNQPF5QZ.js";import{toInstant as e,timeAgo as t}from"./chunk-GEYM4WN3.js";import{formatDateTime as o}from"./chunk-Y3JW2GW5.js";import{useShellLocale as c}from"./chunk-
|
|
1
|
+
import{EmptyValue as r}from"./chunk-HNQPF5QZ.js";import{toInstant as e,timeAgo as t}from"./chunk-GEYM4WN3.js";import{formatDateTime as o}from"./chunk-Y3JW2GW5.js";import{useShellLocale as c}from"./chunk-GDQJBQ5B.js";import{jsx as i}from"react/jsx-runtime";function m({value:m,precise:n,locale:s,className:l}){const a=c(),p=e(m);if(!p)/* @__PURE__ */return i(r,{});const u="string"==typeof m?m:p.toISOString();/* @__PURE__ */
|
|
2
2
|
return i("time",{dateTime:u,title:o(u,{locale:s??a}),className:l,children:t(p,{precise:n,locale:s??a})})}export{m as TimeAgo};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DEFAULT_SHELL_STRINGS as e,useShellStrings as t}from"./chunk-
|
|
1
|
+
import{DEFAULT_SHELL_STRINGS as e,useShellStrings as t}from"./chunk-GDQJBQ5B.js";import{useRef as r,useState as n,useCallback as s}from"react";import{jsx as a}from"react/jsx-runtime";function o(e,t){const r=(t??"").split(",").map(e=>e.trim().toLocaleLowerCase()).filter(Boolean);if(0===r.length||r.includes("*")||r.includes("*/*"))return!0;const n=e.name.toLocaleLowerCase(),s=e.type.toLocaleLowerCase();return r.some(e=>e.startsWith(".")?n.endsWith(e):e.endsWith("/*")?s.startsWith(e.slice(0,-1)):s===e)}var l=(t,r=e.files)=>t<1024?r.bytes(t):t<1048576?r.kilobytes(Math.round(t/1024)):r.megabytes(t/1048576),i=e=>Array.from(e.dataTransfer?.types??[]).includes("Files");function c(e){const t=e.clipboardData;if(!t)return[];if(t.files&&t.files.length>0)return Array.from(t.files);const r=[];for(const e of Array.from(t.items??[]))if("file"===e.kind){const t=e.getAsFile();t&&r.push(t)}return r}function u({onAccept:e,accept:a,maxSizeBytes:u,maxFiles:f,multiple:p=!0,currentCount:m=0,acceptHint:d,disabled:h=!1}){const g=t().files,y=r(null),[x,v]=n(!1),[D,L]=n([]),b=r(0),A="string"==typeof d?d:"",j=s(t=>{if(h||!t)return;const r=Array.from(t);if(0===r.length)return;const n=[],s=[];for(const e of p?r:r.slice(0,1))o(e,a)?null!=u&&e.size>u?s.push({file:e,reason:"size",message:g.tooLarge(e.name,l(e.size,g),l(u,g))}):p&&null!=f&&m+n.length>=f?s.push({file:e,reason:"count",message:g.tooMany(e.name,f)}):n.push(e):s.push({file:e,reason:"type",message:g.notAccepted(e.name,A)});L(s),n.length&&e(n),y.current&&(y.current.value="")},[h,p,a,A,u,f,m,e,g]),k=s(()=>{h||y.current?.click()},[h]),z=s(()=>L([]),[]);return{inputRef:y,inputProps:{ref:y,type:"file",accept:a||void 0,multiple:p,disabled:h,tabIndex:-1,"aria-hidden":!0,className:"hidden",onChange:e=>j(e.target.files)},zoneProps:h?{}:{onDragEnter:e=>{i(e)&&(e.preventDefault(),b.current+=1,v(!0))},onDragOver:e=>{i(e)&&(e.preventDefault(),x||v(!0))},onDragLeave:e=>{i(e)&&(b.current=Math.max(0,b.current-1),0===b.current&&v(!1))},onDrop:e=>{i(e)&&(e.preventDefault(),b.current=0,v(!1),j(e.dataTransfer.files))}},pasteProps:h?{}:{onPaste:e=>{const t=c(e);0!==t.length&&(e.preventDefault(),j(t))}},open:k,take:j,dragOver:x,rejections:D,clearRejections:z}}function f({rejections:e,className:t="mt-2"}){return 0===e.length?null:/* @__PURE__ */a("ul",{role:"alert",className:`${t} flex flex-col gap-0.5`,children:e.map(({file:e,message:t},r)=>/* @__PURE__ */a("li",{className:"text-xs text-red-600",children:t},`${e.name}-${r}`))})}export{f as FileIntakeAlert,o as acceptsFile,l as humanSize,i as isFileDrag,c as pastedFiles,u as useFileIntake};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Popover as e}from"./chunk-
|
|
2
|
-
return i(e,{className:v,disabled:f,triggerLabel:
|
|
1
|
+
import{Popover as e}from"./chunk-G4JTO5PB.js";import{IconButton_default as r}from"./chunk-FX6DBXXD.js";import{Icon as n}from"./chunk-2UO47XB4.js";import{Tooltip as a}from"./chunk-Q3IR5SKD.js";import{useShellStrings as l}from"./chunk-GDQJBQ5B.js";import{useRef as t}from"react";import{jsx as i,jsxs as o}from"react/jsx-runtime";var s={ArrowLeft:[0,-1],ArrowRight:[0,1],ArrowUp:[-1,0],ArrowDown:[1,0]};function c({value:c,onChange:m,options:u,label:d,emptyValue:h,columns:p=5,disabled:f=!1,className:v=""}){const g=l(),b=g.iconPicker,x=g.iconNames,w=e=>e.label??x[e.value]??e.value,N=t([]),k=Math.max(0,u.findIndex(e=>e.value===c)),D=u[k],j=D?.value===h,A=t(null);/* @__PURE__ */
|
|
2
|
+
return i(e,{className:v,disabled:f,triggerLabel:D?b.button(d,w(D)):d,"aria-label":d,initialFocus:A,panelClassName:"!p-2",trigger:/* @__PURE__ */o("span",{className:"inline-flex items-center gap-2",children:[/* @__PURE__ */i("span",j||!D?{className:"text-sm",children:D?w(D):""}:{"aria-hidden":"true",className:"inline-flex [&_svg]:h-4 [&_svg]:w-4",children:D.icon}),
|
|
3
3
|
/* @__PURE__ */i(n,{name:"chevron-down",className:"h-4 w-4"})]}),children:({close:e})=>/* @__PURE__ */i("div",{role:"listbox","aria-label":d,className:"grid gap-1",style:{gridTemplateColumns:`repeat(${p}, 2rem)`},children:u.map((n,l)=>{const t=n.value===c;/* @__PURE__ */
|
|
4
|
-
return i(a,{content:w(n),children:/* @__PURE__ */i(r,{ref:e=>{N.current[l]=e,l===k&&(
|
|
4
|
+
return i(a,{content:w(n),children:/* @__PURE__ */i(r,{ref:e=>{N.current[l]=e,l===k&&(A.current=e)},role:"option","aria-selected":t,"aria-label":w(n),pressed:t,tabIndex:l===k?0:-1,onKeyDown:e=>((e,r)=>{const n=s[r.key];if(!n)return;r.preventDefault();const a=Math.floor(e/p)+n[0],l=e%p+n[1];if(a<0||l<0||l>=p)return;const t=a*p+l;if(!(t>=u.length)){for(const[e,r]of N.current.entries())r?.setAttribute("tabindex",e===t?"0":"-1");N.current[t]?.focus()}})(l,e),onClick:()=>{m(n.value),e()},children:/* @__PURE__ */i("span",{"aria-hidden":"true",className:"inline-flex [&_svg]:h-4 [&_svg]:w-4",children:n.icon})})},n.value)})})})}export{c as IconPicker};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{ChartTooltip as e}from"./chunk-WZ5QSSUM.js";import{axisGutter as t,radiusScale as i,niceMax as l,logScale as r,linearScale as o}from"./chunk-2JWPNR2U.js";import{usePlotWidth as n}from"./chunk-MAFUXCPZ.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:S=[4,22],className:U,emptyLabel:D}){const L=m().charts,Q=h(),W=z??(e=>f(e,Q)),B=$??(e=>f(e,Q)),P=D??L.noObservations,C=u(null),E=n(C),O=v??E,V=p(),[Z,F]=d(null);x(()=>{if(null!==Z)return c(e=>"Escape"===e.key&&(F(null),!0))},[Z]);const I=(e,t)=>!t||e>=Math.min(t[0],t[1])&&e<=Math.max(t[0],t[1]),J=b.map((e,t)=>({...e,slot:t})).filter(e=>e.points.length>0),T=j||w?J.map(e=>({...e,points:e.points.filter(e=>I(e.x,j)&&I(e.y,w))})).filter(e=>e.points.length>0):J,X=J.reduce((e,t)=>e+t.points.length,0)-T.reduce((e,t)=>e+t.points.length,0);if(0===T.length)/* @__PURE__ */
|
|
2
|
+
return y("div",{className:U,ref:C,children:/* @__PURE__ */y("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:k},children:P})});const G=T.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,O-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:S[0],to:S[1]}),ne=Z?T[Z.s]:void 0,ae=Z&&ne?ne.points[Z.i]:void 0,se=T.flatMap((e,t)=>e.points.map((e,i)=>({s:t,i:i})));/* @__PURE__ */
|
|
3
|
+
return g("div",{className:`relative ${U??""}`,ref:C,children:[
|
|
4
|
+
/* @__PURE__ */g("svg",{width:"100%",height:k,viewBox:`0 0 ${O} ${k}`,role:"img","aria-label":L.scatter(T.map(e=>e.label),A??L.yAxis,M??L.xAxis)+(X>0?`. ${L.outsideRange(X)}`:""),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>F(null),onBlur:()=>F(null),onKeyDown:e=>{if("ArrowRight"!==e.key&&"ArrowLeft"!==e.key)return;e.preventDefault();const t="ArrowRight"===e.key?1:-1,i=Z?se.findIndex(e=>e.s===Z.s&&e.i===Z.i):0;F(se[Math.min(se.length-1,Math.max(0,i+t))])},children:[
|
|
5
|
+
/* @__PURE__ */y("defs",{children:/* @__PURE__ */y("clipPath",{id:V,children:/* @__PURE__ */y("rect",{x:ie-S[1],y:K-S[1],width:le-ie+2*S[1],height:k-q-K+2*S[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(#${V})`,children:T.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):S[0]+1,fill:i,fillOpacity:Z&&Z.s!==t?.25:.62,stroke:a.surface,strokeWidth:2,onMouseEnter:()=>F({s:t,i:r})},`${e.key}-${r}`))})})]}),Z&&ne&&ae&&/* @__PURE__ */y("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */y(e,{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};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{Calendar as e}from"./chunk-
|
|
2
|
-
return x("input",{ref:K,type:"date",lang:re,id:U,name:Y,disabled:z,"aria-label":
|
|
1
|
+
import{Calendar as e}from"./chunk-JH4ZCPHW.js";import{fromDateKey as t,toDateKey as r}from"./chunk-2HMNOLKX.js";import{inputClasses as a,PLACEHOLDER_INK as n}from"./chunk-AYZY3YNC.js";import{calendarNames as i}from"./chunk-Y3JW2GW5.js";import{Icon as o}from"./chunk-2UO47XB4.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as s}from"./chunk-62LW225J.js";import{useDropdownPosition as d}from"./chunk-GLUJS42B.js";import{registerModalEscapeInterceptor as u}from"./chunk-TWVUQUUD.js";import{useBrowserLayoutEffect as c}from"./chunk-D65T4H6J.js";import{useShellStrings as m,useShellLocale as b}from"./chunk-GDQJBQ5B.js";import{forwardRef as f,useState as p,useRef as h,useId as v,useEffect as g}from"react";import{createPortal as y}from"react-dom";import{jsx as x,jsxs as N}from"react/jsx-runtime";var k=/^\d{4}-\d{2}-\d{2}$/,j=/^(aria|data)-/,w=/* @__PURE__ */new Set(["aria-invalid","aria-required"]);function B(e){if(null==e||""===e)return"";if(e instanceof Date)return Number.isNaN(e.getTime())?"":r(e);if(k.test(e))return e;const t=new Date(e);return Number.isNaN(t.getTime())?"":r(t)}function D(e,r){const a=t(e);return a?r.longDate(a.getFullYear(),a.getMonth(),a.getDate()):""}var W=f(function({value:f,onChange:k,min:W,max:C,invalid:F,size:J,native:O,weekStartsOn:$,className:q="","aria-label":E,"aria-describedby":L,"aria-labelledby":S,id:U,name:Y,disabled:z,placeholder:G,required:H,clearable:I,form:T,title:M,tabIndex:P,autoFocus:Q,onFocus:X,onBlur:Z,...A},K){const R=I??!H,V=B(f),_=B(W),ee=B(C),te=m().datePicker,re=b(),ae=i(re),[ne,ie]=p(!1),oe=h(null),le=h(null),se=h(null),de=v(),ue=v(),ce=v(),me=d(le,ne,{popupRef:se}),[be,fe]=p(!1);c(()=>{const e=!!U&&(le.current?.labels?.length??0)>0;e!==be&&fe(e)});const pe=!E&&(!!S||be);if(g(()=>{if(!ne)return;const e=e=>{const t=e.target;oe.current?.contains(t)||se.current?.contains(t)||ie(!1)};document.addEventListener("pointerdown",e,!0);const t=l(()=>ie(!1));return()=>{document.removeEventListener("pointerdown",e,!0),t()}},[ne]),g(()=>{if(ne)return u(e=>"Escape"===e.key&&(ie(!1),le.current?.focus(),!0),()=>se.current)},[ne]),O)/* @__PURE__ */
|
|
2
|
+
return x("input",{ref:K,type:"date",lang:re,id:U,name:Y,disabled:z,"aria-label":E,"aria-describedby":L,"aria-invalid":F||void 0,value:V,min:_||void 0,max:ee||void 0,onChange:e=>k?.(t(e.target.value)),className:a({invalid:F,size:J,className:q}),"aria-labelledby":S,required:H,form:T,title:M,tabIndex:P,autoFocus:Q,onFocus:X,onBlur:Z,...A});const he=Object.fromEntries(Object.entries(A).filter(([e])=>j.test(e)&&!w.has(e))),ve=A["aria-required"],ge=!!H||!0===ve||"true"===ve,ye=[pe?ue:void 0,ge?ce:void 0,L].filter(Boolean).join(" ")||void 0,xe=r(/* @__PURE__ */new Date),Ne=(!_||xe>=_)&&(!ee||xe<=ee),ke=G??te.placeholder;/* @__PURE__ */
|
|
3
3
|
return N("div",{ref:oe,className:"relative",children:[
|
|
4
|
-
/* @__PURE__ */x("input",{ref:K,type:"hidden",name:Y,form:
|
|
5
|
-
/* @__PURE__ */N("button",{ref:le,type:"button",...he,id:U,disabled:z,title:
|
|
6
|
-
/* @__PURE__ */x("span",{className:V?"text-ink-strongest":n,children:V?
|
|
7
|
-
/* @__PURE__ */x(o,{name:"date",className:`h-4 w-4 shrink-0 ${n}`,strokeWidth:"1.75","aria-hidden":"true"})]}),pe&&/* @__PURE__ */x("span",{id:ue,className:"sr-only",children:V?
|
|
8
|
-
/* @__PURE__ */N("div",{ref:se,id:de,role:"dialog","aria-label":
|
|
9
|
-
/* @__PURE__ */x(e,{value:V||null,min:_||null,max:ee||null,weekStartsOn
|
|
4
|
+
/* @__PURE__ */x("input",{ref:K,type:"hidden",name:Y,form:T,value:V}),
|
|
5
|
+
/* @__PURE__ */N("button",{ref:le,type:"button",...he,id:U,disabled:z,title:M,tabIndex:P,autoFocus:Q,onFocus:X,onBlur:Z,"aria-haspopup":"dialog","aria-expanded":ne,"aria-controls":ne?de:void 0,"aria-labelledby":S,"aria-describedby":ye,"aria-label":E?`${E}${V?`, ${D(V,ae)}`:""}`:void 0,onClick:()=>ie(e=>!e),className:`${a({invalid:F,size:J,className:q})} flex items-center justify-between text-left`,children:[
|
|
6
|
+
/* @__PURE__ */x("span",{className:V?"text-ink-strongest":n,children:V?D(V,ae):ke}),
|
|
7
|
+
/* @__PURE__ */x(o,{name:"date",className:`h-4 w-4 shrink-0 ${n}`,strokeWidth:"1.75","aria-hidden":"true"})]}),pe&&/* @__PURE__ */x("span",{id:ue,className:"sr-only",children:V?D(V,ae):ke}),ge&&/* @__PURE__ */x("span",{id:ce,className:"sr-only",children:te.required}),ne&&y(
|
|
8
|
+
/* @__PURE__ */N("div",{ref:se,id:de,role:"dialog","aria-label":E??te.dialog,className:"fixed w-72 rounded-xl border border-gray-200 bg-white p-3 shadow-lg",style:{zIndex:s.popup,left:me?.left,right:me?.right,top:me?.top,bottom:me?.bottom,maxWidth:me?.maxWidth,visibility:me?void 0:"hidden"},children:[
|
|
9
|
+
/* @__PURE__ */x(e,{value:V||null,min:_||null,max:ee||null,weekStartsOn:$,onSelect:e=>{ie(!1),le.current?.focus(),k?.(t(e))}}),(R||Ne)&&/* @__PURE__ */N("div",{className:"mt-2 flex justify-between border-t border-gray-100 pt-2",children:[R&&/* @__PURE__ */x("button",{type:"button",onClick:()=>{ie(!1),le.current?.focus(),k?.(null)},className:"rounded-(--radius-control) px-2 py-1 text-sm text-gray-500 hover:bg-gray-100 hover:text-gray-700",children:te.clear}),Ne&&/* @__PURE__ */x("button",{type:"button",onClick:()=>{ie(!1),le.current?.focus(),k?.(/* @__PURE__ */new Date)},className:"ml-auto rounded-(--radius-control) px-2 py-1 text-sm font-medium text-blue-600 hover:bg-blue-50",children:te.today})]})]}),document.body)]})});export{W as DatePicker_default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{SidebarLayout as e}from"./chunk-
|
|
1
|
+
import{SidebarLayout as e}from"./chunk-OUIE2N2Z.js";import{Avatar as t}from"./chunk-AFYLVV74.js";import{ItemCount as r}from"./chunk-HS2E7DVI.js";import{Button_default as a}from"./chunk-HXNMRJQ4.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,4 +1,4 @@
|
|
|
1
|
-
import{useShellStrings as t,useShellLocale as e}from"./chunk-
|
|
1
|
+
import{useShellStrings as t,useShellLocale as e}from"./chunk-GDQJBQ5B.js";import{formatPlain as a}from"./chunk-C3QOHMR6.js";import{jsxs as n,jsx as r}from"react/jsx-runtime";var o="inline-flex h-8 min-w-8 items-center justify-center rounded-md px-2 text-sm transition-colors disabled:cursor-not-allowed disabled:opacity-40";function l({page:l,pageCount:i,onPageChange:s,siblingCount:c=1,showEdges:b=!1,className:u=""}){const d=t().pagination,g=e();if(i<=1)return null;const m=function(t,e,a){const n=/* @__PURE__ */new Set([1,e]);for(let r=t-a;r<=t+a;r++)r>=1&&r<=e&&n.add(r);const r=[...n].sort((t,e)=>t-e),o=[];let l=0;for(const t of r)l&&t-l>1&&o.push("…"),o.push(t),l=t;return o}(l,i,c),p=t=>{t>=1&&t<=i&&t!==l&&s(t)};/* @__PURE__ */
|
|
2
2
|
return n("nav",{"aria-label":d.label,className:`flex items-center gap-1 ${u}`.trim(),children:[b&&/* @__PURE__ */r("button",{type:"button","aria-label":d.first,disabled:1===l,onClick:()=>p(1),className:`${o} text-gray-600 hover:bg-gray-100`,children:"«"}),
|
|
3
3
|
/* @__PURE__ */r("button",{type:"button","aria-label":d.previous,disabled:1===l,onClick:()=>p(l-1),className:`${o} text-gray-600 hover:bg-gray-100`,children:"‹"}),m.map((t,e)=>"…"===t?/* @__PURE__ */r("span",{className:"px-1 text-gray-400",children:"…"},`gap-${e}`):/* @__PURE__ */r("button",{type:"button","aria-current":t===l?"page":void 0,onClick:()=>p(t),className:`${o} ${t===l?"bg-blue-600 font-medium text-white":"text-gray-700 hover:bg-gray-100"}`,children:a(t,g)},t)),
|
|
4
4
|
/* @__PURE__ */r("button",{type:"button","aria-label":d.next,disabled:l===i,onClick:()=>p(l+1),className:`${o} text-gray-600 hover:bg-gray-100`,children:"›"}),b&&/* @__PURE__ */r("button",{type:"button","aria-label":d.last,disabled:l===i,onClick:()=>p(i),className:`${o} text-gray-600 hover:bg-gray-100`,children:"»"})]})}export{l as Pagination};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{swallowPress as e,describedByWith as r,OffWithReason as i}from"./chunk-
|
|
1
|
+
import{swallowPress as e,describedByWith as r,OffWithReason as i}from"./chunk-SQCUN2DX.js";import{Tooltip as o}from"./chunk-Q3IR5SKD.js";import{useId as a,useRef as n}from"react";import{jsx as t}from"react/jsx-runtime";var l={ArrowLeft:[0,-1],ArrowRight:[0,1],ArrowUp:[-1,0],ArrowDown:[1,0]};function s({label:s,value:d,points:c,onChange:u,disabled:b=!1,disabledReason:v,id:f,className:g=""}){const h=a(),m=n([]),p=c.findIndex(e=>e.value===d),x=c.findIndex(e=>!b&&!0!==e.disabled),w=p>=0?p:Math.max(0,x);/* @__PURE__ */
|
|
2
2
|
return t("div",{id:f,role:"radiogroup","aria-label":s,className:`grid w-max grid-cols-3 gap-px overflow-hidden rounded-(--radius-control) border border-line bg-gray-200 ${g}`.trim(),children:c.map((a,n)=>{const s=d===a.value,f=b||!0===a.disabled,g=f&&(!0===a.disabled&&a.title||(b?v:void 0))||void 0,p=`${h}-${n}`,x=/* @__PURE__ */t("button",{type:"button",role:"radio","aria-checked":s,"aria-label":a.label,"aria-disabled":f||void 0,"aria-describedby":r(void 0,g?p:void 0),ref:e=>{m.current[n]=e},tabIndex:n===w?0:-1,onKeyDown:e=>((e,r)=>{const i=l[r.key];if(!i)return;r.preventDefault();const o=Math.floor(e/3)+i[0],a=e%3+i[1];if(o<0||a<0||a>=3)return;const n=3*o+a;if(n>=c.length)return;m.current[n]?.focus();const t=c[n];b||!0===t.disabled||t.value===d||u(t.value)})(n,e),onClick:f?e:()=>u(a.value),className:"group relative flex size-(--control-height-lg) items-center justify-center transition-colors rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring)] aria-disabled:cursor-not-allowed aria-disabled:opacity-60 "+(s?"bg-accent-tint hover:bg-blue-100":"bg-surface hover:bg-row-hover"),children:a.icon?/* @__PURE__ */t("span",{"data-icon-slot":"","aria-hidden":"true",className:"inline-flex items-center justify-center [&_svg]:h-4 [&_svg]:w-4 "+(s?"text-blue-700":"text-ink-faint group-hover:text-gray-700"),children:a.icon}):/* @__PURE__ */t("span",{"data-dot":"","aria-hidden":"true",className:s?"size-3 rounded-sm bg-accent-fill":"size-1 rounded-full bg-[color:var(--ink-faintest)] transition-colors group-hover:bg-[color:var(--ink-faint)]"})},a.value);return g?/* @__PURE__ */t(i,{reason:g,id:p,block:!0,children:x},a.value):/* @__PURE__ */t(o,{content:a.title??a.label,className:"relative flex",children:x},a.value)})})}export{s as AlignmentGrid};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{appendKey as r,backspace as a}from"./chunk-VEPVOHCV.js";import{Button_default as e}from"./chunk-
|
|
1
|
+
import{appendKey as r,backspace as a}from"./chunk-VEPVOHCV.js";import{Button_default as e}from"./chunk-HXNMRJQ4.js";import{useShellStrings as n}from"./chunk-GDQJBQ5B.js";import{jsxs as i,jsx as c}from"react/jsx-runtime";var o=["1","2","3","4","5","6","7","8","9",".","0"];function l({value:l,onChange:s,onEnter:t,enterLabel:m,enterDisabled:d,className:h=""}){const p=n().keypad,u=r=>{r!==l&&s(r)};/* @__PURE__ */
|
|
2
2
|
return i("div",{className:`grid grid-cols-3 gap-3 ${h}`.trim(),children:[o.map(a=>/* @__PURE__ */c(e,{size:"touch-xl",variant:"secondary",onClick:()=>u(r(l,a)),children:a},a)),
|
|
3
3
|
/* @__PURE__ */c(e,{size:"touch-xl",variant:"secondary","aria-label":p.backspace,onClick:()=>u(a(l)),children:"⌫"}),t&&/* @__PURE__ */c(e,{size:"touch-xl",variant:"primary",className:"col-span-3",disabled:d,onClick:t,children:m??p.enter})]})}export{l as NumericKeypad};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Z_LAYERS as t}from"./chunk-62LW225J.js";import{VIEWPORT_MARGIN as e,placeMenu as r,followRect as n}from"./chunk-GLUJS42B.js";import{
|
|
2
|
-
/* @__PURE__ */l("div",{ref:J,role:"group","aria-label":g,"data-floating-bar":"",onMouseDown:t=>{const e=t.target;e?.closest?.('input, textarea, select, [contenteditable]:not([contenteditable="false"])')||t.preventDefault()},className:`fixed rounded-(--radius-popup) p-1 ${w}`.trim(),style:{...
|
|
1
|
+
import{Z_LAYERS as t}from"./chunk-62LW225J.js";import{VIEWPORT_MARGIN as e,placeMenu as r,followRect as n}from"./chunk-GLUJS42B.js";import{solidSurfaceStyle as o}from"./chunk-F27JJHNJ.js";import{useHydrated as i,useBrowserLayoutEffect as s}from"./chunk-D65T4H6J.js";import{useRef as c,useCallback as a,useEffect as u}from"react";import{createPortal as d}from"react-dom";import{jsx as l}from"react/jsx-runtime";var f=()=>({left:0,top:0,right:window.innerWidth,bottom:window.innerHeight});function p({anchor:p,bounds:m,side:h="top",align:b="start","aria-label":g,children:x,className:w=""}){const v=i(),J=c(null),j=c(p);j.current=p;const k=c(m);k.current=m;const y=a(()=>{const t=J.current,n=j.current();if(!t||!n)return;const o=(k.current??f)(),i=t.style;i.maxWidth=`${Math.max(0,o.right-o.left-2*e)}px`;const s=r({trigger:n,menu:{width:t.offsetWidth,height:t.offsetHeight},bounds:o,align:b,side:h});i.left=`${s.left}px`,i.top=`${s.top}px`,t.dataset.side=s.side},[b,h]);s(()=>{v&&y()}),u(()=>{if(!v)return;const t=n(()=>j.current(),y),e=J.current;if(!e||"undefined"==typeof ResizeObserver)return t;const r=new ResizeObserver(()=>y());return r.observe(e),()=>{t(),r.disconnect()}},[v,y]);return v&&p()?d(
|
|
2
|
+
/* @__PURE__ */l("div",{ref:J,role:"group","aria-label":g,"data-floating-bar":"",onMouseDown:t=>{const e=t.target;e?.closest?.('input, textarea, select, [contenteditable]:not([contenteditable="false"])')||t.preventDefault()},className:`fixed rounded-(--radius-popup) p-1 ${w}`.trim(),style:{...o(),position:"fixed",left:0,top:0,zIndex:t.popup},children:x}),document.body):null}export{p as FloatingBar};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{mediaMoveSubmenu as e}from"./chunk-
|
|
1
|
+
import{mediaMoveSubmenu as e}from"./chunk-OPN4I565.js";import{optionNoteClass as n}from"./chunk-URHGHXDN.js";import{Icon as r}from"./chunk-2UO47XB4.js";import{jsxs as d,jsx as l}from"react/jsx-runtime";var a={folder:/* @__PURE__ */l(r,{name:"folder","aria-hidden":"true",className:"h-4 w-4"}),"folder-plus":/* @__PURE__ */l(r,{name:"folder-plus","aria-hidden":"true",className:"h-4 w-4"}),edit:/* @__PURE__ */l(r,{name:"edit","aria-hidden":"true",className:"h-4 w-4"}),swap:/* @__PURE__ */l(r,{name:"swap","aria-hidden":"true",className:"h-4 w-4"}),copy:/* @__PURE__ */l(r,{name:"copy","aria-hidden":"true",className:"h-4 w-4"}),external:/* @__PURE__ */l(r,{name:"external","aria-hidden":"true",className:"h-4 w-4"}),trash:/* @__PURE__ */l(r,{name:"trash","aria-hidden":"true",className:"h-4 w-4"}),undo:/* @__PURE__ */l(r,{name:"undo","aria-hidden":"true",className:"h-4 w-4"})},o=e=>a[e];function i(e,r){return r?/* @__PURE__ */d("span",{className:"flex min-w-0 flex-col",children:[
|
|
2
2
|
/* @__PURE__ */l("span",{children:e}),
|
|
3
3
|
/* @__PURE__ */l("span",{className:n(),children:r})]}):e}function t(n,r){const{words:d,denied:l}=r,a=[],t=(e,n,r,d={})=>{if(!r)return;const o=d.deny?l[d.deny]:void 0;a.push({key:e,label:i(n,o),icon:d.icon,danger:d.danger,disabled:!!o||!!d.off,onSelect:r})},c=(n,d,i,t)=>{const c=r.move;c&&a.push(e({count:d,kind:i,head:t,icon:o("folder"),disabled:!!l.move,targets:r.moveTargets(n),onPick:e=>c(n,e.key===s?null:e.key)},r.media))},h=e=>{a.length&&a.push({type:"divider",key:e})};switch(n.kind){case"folder":{const e={kind:"folder",id:n.id};if(t("new",d.newSubfolder,r.newSubfolder&&(()=>r.newSubfolder(n.id)),{icon:o("folder-plus"),deny:"newFolder"}),t("rename",d.rename,r.rename&&(()=>r.rename({kind:"folder",id:n.id})),{icon:o("edit"),deny:"rename"}),c(e,1,"file",!1),r.deleteFolder){h("d-delete");const e=!l.deleteFolder&&!!r.folderNotEmpty?.(n.id);a.push({key:"delete-folder",label:i(d.deleteFolder,l.deleteFolder??(e?d.folderNotEmpty:void 0)),icon:o("trash"),danger:!0,disabled:!!l.deleteFolder||e,onSelect:()=>r.deleteFolder(n.id)})}return a}case"files":{const{ids:e}=n,l=1===e.length,i={kind:"files",ids:e};l||a.push({type:"label",key:"count",label:d.filesSelected(e.length)}),c(i,e.length,r.kindOf(e),!0),t("rename",d.rename,r.rename&&(()=>r.rename({kind:"file",id:e[0]})),{icon:o("edit"),deny:"rename",off:!l}),t("replace",d.replace,r.replace&&(()=>r.replace(e[0])),{icon:o("swap"),deny:"replace",off:!l}),t("copy",d.copyUrl,()=>r.copyUrl(e[0]),{icon:o("copy"),off:!l});const s=l?r.urlOf(e[0]):void 0;return s&&a.push({type:"link",key:"open",label:d.openOriginal,href:s,icon:o("external")}),r.trash&&(h("d-trash"),t("trash",l?d.moveToTrash:d.moveFilesToTrash(e.length),()=>r.trash(i),{icon:o("trash"),danger:!0,deny:"trash"})),a}case"trashed":{const{ids:e}=n;return e.length>1&&a.push({type:"label",key:"count",label:d.filesSelected(e.length)}),t("restore",d.restore,r.restore&&(()=>r.restore(e)),{icon:o("undo"),deny:"restore"}),r.deleteForever&&(h("d-delete"),t("delete",d.deleteForever,()=>r.deleteForever(e),{icon:o("trash"),danger:!0,deny:"deleteForever"})),a}case"product-node":case"render":return a.push({type:"label",key:"read-only",label:d.readOnlyMenu}),t("design",d.openInDesign,r.openInDesign&&(()=>r.openInDesign({kind:n.kind,id:n.id})),{icon:o("external")}),"render"===n.kind&&t("copy",d.copyUrl,()=>r.copyUrl(n.id),{icon:o("copy")}),a;default:return a}}var s="__all-files__";export{s as ROOT_KEY,t as mediaLibraryMenu};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";function r({size:r=18,...i}){/* @__PURE__ */
|
|
2
|
+
return e("svg",{width:r,height:r,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",...i,children:/* @__PURE__ */e("path",{fillRule:"evenodd",d:"M5,6.125h10c0.2766,0 0.53074,0.15224 0.66126,0.39611c0.13051,0.24387 0.11621,0.53978 -0.03722,0.76992l-5,7.5c-0.1391,0.20865 -0.37327,0.33397 -0.62404,0.33397c-0.25076,0 -0.48494,-0.12533 -0.62404,-0.33397l-5,-7.5c-0.15343,-0.23014 -0.16773,-0.52605 -0.03722,-0.76992c0.13051,-0.24387 0.38466,-0.39611 0.66126,-0.39611z"})})}export{r as SeparatorTriangleMiniIcon};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import{Markdown as e}from"./chunk-
|
|
1
|
+
import{Markdown as e}from"./chunk-IX7QXMNJ.js";import{PLACEHOLDER_INK as t}from"./chunk-AYZY3YNC.js";import{Icon as l}from"./chunk-2UO47XB4.js";import{LoadingSpinner as r}from"./chunk-R2VKEMZH.js";import{useShellStrings as s}from"./chunk-GDQJBQ5B.js";import{useState as a,useMemo as n}from"react";import{jsxs as i,jsx as o,Fragment as c}from"react/jsx-runtime";var d=({open:e})=>/* @__PURE__ */o(l,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 transition-transform "+(e?"rotate-90":""),"aria-hidden":"true"});function h({docs:h,loading:m=!1,categoryOrder:p,canEdit:u=!1,onNew:g,onEdit:x,renderBody:f,emptyMessage:b}){const y=s(),[N,v]=a(""),[w,k]=a(null),[C,j]=a({}),M=N.trim().toLowerCase(),B=n(()=>{const e=/* @__PURE__ */new Map;for(const t of h){let l=e.get(t.category);l||(l={key:t.category,label:t.category_label||t.category,docs:[]},e.set(t.category,l)),l.docs.push(t)}if(!p?.length)return[...e.values()];const t=new Map(p.map((e,t)=>[e,t]));return[...e.values()].sort((e,l)=>(t.get(e.key)??1/0)-(t.get(l.key)??1/0))},[h,p]),_=e=>!M||e.title.toLowerCase().includes(M)||e.body.toLowerCase().includes(M)||e.category_label.toLowerCase().includes(M),L=n(()=>B.map(e=>({...e,docs:e.docs.filter(_)})).filter(e=>e.docs.length>0),[B,M]),A=n(()=>L.flatMap(e=>e.docs),[L]),E=(w?A.find(e=>e.slug===w):void 0)??A[0]??null,Q=e=>!!M||(C[e]??e===E?.category);/* @__PURE__ */
|
|
2
2
|
return i("div",{className:"flex h-full gap-4 px-4 py-3 min-h-0",children:[
|
|
3
3
|
/* @__PURE__ */i("aside",{className:"w-64 shrink-0 flex flex-col bg-white rounded-lg shadow overflow-hidden",children:[
|
|
4
4
|
/* @__PURE__ */i("div",{className:"flex items-center justify-between gap-2 px-3 py-2 border-b border-gray-200 bg-gray-50 shrink-0",children:[
|
|
5
5
|
/* @__PURE__ */o("h2",{className:"text-sm font-semibold text-gray-900",children:y.help.title}),u&&g&&/* @__PURE__ */o("button",{type:"button",onClick:g,className:"text-xs text-blue-600 hover:underline",children:y.help.newArticle})]}),
|
|
6
6
|
/* @__PURE__ */o("div",{className:"px-3 py-2 border-b border-line-subtle shrink-0",children:/* @__PURE__ */i("div",{className:"relative",children:[
|
|
7
7
|
/* @__PURE__ */o(l,{name:"search",look:"mini",className:`pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 ${t}`,"aria-hidden":"true"}),
|
|
8
|
-
/* @__PURE__ */o("input",{type:"text",value:
|
|
9
|
-
/* @__PURE__ */o("div",{className:"flex-1 overflow-y-auto py-1",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"py-6",label:y.help.loading}):0===
|
|
8
|
+
/* @__PURE__ */o("input",{type:"text",value:N,onChange:e=>v(e.target.value),placeholder:y.help.searchPlaceholder,className:"w-full rounded-md border border-line-strong bg-surface h-8 pl-8 pr-2 text-sm shadow-sm focus:border-blue-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-accent)]"})]})}),
|
|
9
|
+
/* @__PURE__ */o("div",{className:"flex-1 overflow-y-auto py-1",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"py-6",label:y.help.loading}):0===L.length?/* @__PURE__ */o("p",{className:"px-3 py-6 text-center text-xs text-gray-500",children:M?y.help.noResults:b??y.help.empty}):L.map(e=>{const t=Q(e.key);/* @__PURE__ */
|
|
10
10
|
return i("div",{className:"py-0.5",children:[
|
|
11
|
-
/* @__PURE__ */i("button",{type:"button",onClick:()=>{return t=e.key,j(e=>({...e,[t]:!
|
|
11
|
+
/* @__PURE__ */i("button",{type:"button",onClick:()=>{return t=e.key,j(e=>({...e,[t]:!Q(t)}));var t},className:"w-full flex items-center gap-2 h-8 px-3 text-left text-3xs font-semibold uppercase tracking-wide text-ink-faintest hover:text-gray-600",children:[
|
|
12
12
|
/* @__PURE__ */o(d,{open:t}),
|
|
13
|
-
/* @__PURE__ */o("span",{className:"truncate",children:e.label})]}),t&&e.docs.map(e=>{const t=
|
|
13
|
+
/* @__PURE__ */o("span",{className:"truncate",children:e.label})]}),t&&e.docs.map(e=>{const t=E?.slug===e.slug;/* @__PURE__ */
|
|
14
14
|
return i("button",{type:"button",onClick:()=>k(e.slug),className:"w-full text-left pl-8 pr-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 transition-colors "+(t?"bg-blue-50 text-blue-700 font-medium":"text-gray-700 hover:bg-gray-50"),children:[
|
|
15
15
|
/* @__PURE__ */o("span",{className:"truncate",children:e.title}),!1===e.is_published&&/* @__PURE__ */o("span",{className:"ml-auto shrink-0 text-2xs text-amber-600",children:y.help.draft})]},e.slug)})]},e.key)})})]}),
|
|
16
|
-
/* @__PURE__ */o("main",{className:"flex-1 min-w-0 bg-white rounded-lg shadow overflow-hidden flex flex-col",children:
|
|
16
|
+
/* @__PURE__ */o("main",{className:"flex-1 min-w-0 bg-white rounded-lg shadow overflow-hidden flex flex-col",children:E?/* @__PURE__ */i(c,{children:[
|
|
17
17
|
/* @__PURE__ */i("div",{className:"flex items-start justify-between gap-4 px-5 py-3 border-b border-gray-200 bg-gray-50 shrink-0",children:[
|
|
18
18
|
/* @__PURE__ */i("div",{className:"min-w-0",children:[
|
|
19
|
-
/* @__PURE__ */o("h1",{className:"text-lg font-semibold text-gray-900 truncate",children:
|
|
20
|
-
/* @__PURE__ */i("p",{className:"text-xs text-gray-500 mt-0.5",children:[
|
|
21
|
-
/* @__PURE__ */o("div",{className:"flex-1 overflow-auto px-5 py-4",children:f?f(
|
|
19
|
+
/* @__PURE__ */o("h1",{className:"text-lg font-semibold text-gray-900 truncate",children:E.title}),
|
|
20
|
+
/* @__PURE__ */i("p",{className:"text-xs text-gray-500 mt-0.5",children:[E.category_label,!1===E.is_published&&/* @__PURE__ */i("span",{className:"ml-2 text-amber-600",children:["· ",y.help.draft]})]})]}),u&&x&&/* @__PURE__ */o("button",{type:"button",onClick:()=>x(E),className:"shrink-0 text-sm text-blue-600 hover:underline",children:y.help.edit})]}),
|
|
21
|
+
/* @__PURE__ */o("div",{className:"flex-1 overflow-auto px-5 py-4",children:f?f(E):E.body?/* @__PURE__ */o(e,{children:E.body}):/* @__PURE__ */o("p",{className:"text-sm text-gray-500 italic",children:y.help.noBody})})]}):/* @__PURE__ */o("div",{className:"flex-1 flex items-center justify-center px-6 text-center",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"",label:y.help.loading}):/* @__PURE__ */o("p",{className:"text-sm text-ink-faint",children:y.help.pickArticle})})})]})}export{h as HelpCenter};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{IconButton_default as e}from"./chunk-
|
|
1
|
+
import{IconButton_default as e}from"./chunk-FX6DBXXD.js";import{CloseGlyph as t}from"./chunk-UG6RI525.js";import{humanSize as n,useFileIntake as r,FileIntakeAlert as a}from"./chunk-JTMEFXRL.js";import{Button_default as s}from"./chunk-HXNMRJQ4.js";import{Icon as i}from"./chunk-2UO47XB4.js";import{useShellStrings as c}from"./chunk-GDQJBQ5B.js";import{useRef as l,useEffect as o}from"react";import{jsx as d,jsxs as u}from"react/jsx-runtime";function m({className:e="h-4 w-4"}){/* @__PURE__ */
|
|
2
2
|
return d(i,{name:"attach",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:e})}function p({className:e="h-4 w-4"}){/* @__PURE__ */
|
|
3
3
|
return d(i,{name:"page",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:e})}function h({intake:e,dropLabel:t,className:n="",children:r}){const a=c().files;/* @__PURE__ */
|
|
4
4
|
return u("div",{...e.zoneProps,...e.pasteProps,className:`relative ${n}`,children:[r,
|
|
@@ -6,7 +6,7 @@ return u("div",{...e.zoneProps,...e.pasteProps,className:`relative ${n}`,childre
|
|
|
6
6
|
return u("li",{className:"flex max-w-full items-center gap-2 rounded-md border border-line bg-surface-sunken py-1 pl-2 pr-1 text-xs text-ink",children:[c?/* @__PURE__ */d("img",{src:c,alt:"",className:"h-6 w-6 shrink-0 rounded object-cover"}):/* @__PURE__ */d("span",{className:"text-gray-400",children:/* @__PURE__ */d(p,{})}),
|
|
7
7
|
/* @__PURE__ */d("span",{className:"min-w-0 truncate",title:e.name,children:e.name}),
|
|
8
8
|
/* @__PURE__ */d("span",{className:"shrink-0 tabular-nums text-gray-400",children:n(e.size,i)}),r&&/* @__PURE__ */d("button",{type:"button",disabled:a,onClick:()=>r(s),"aria-label":i.remove(e.name),className:"shrink-0 rounded p-0.5 text-gray-400 hover:bg-gray-200 hover:text-gray-600 disabled:cursor-not-allowed",children:/* @__PURE__ */d(t,{className:"h-3.5 w-3.5"})})]},`${e.name}-${e.size}-${s}`)})})}function b({onClick:t,count:n=0,variant:r="button",label:a,disabled:i=!1}){const l=c().files,o=a??l.attach,p=n>0?`${o} (${n})`:o;return"icon"===r?/* @__PURE__ */u("span",{className:"relative inline-flex",children:[
|
|
9
|
-
/* @__PURE__ */d(e,{"aria-label":p,onClick:t,disabled:i,size:"sm",children:/* @__PURE__ */d(m,{})}),n>0&&/* @__PURE__ */d("span",{"aria-hidden":"true",className:"pointer-events-none absolute -right-1 -top-1 min-w-[1rem] rounded-full bg-accent-fill px-1 text-center text-2xs font-semibold leading-4 text-on-accent",children:n})]}):/* @__PURE__ */d(s,{type:"button",variant:"secondary",size:"sm",onClick:t,disabled:i,leftIcon:/* @__PURE__ */d(m,{}),children:p})}function x({files:e,onChange:t,accept:n,maxSizeBytes:s,maxFiles:i,acceptHint:c,disabled:m=!1,dropLabel:p,attachLabel:x,trigger:g="button",actions:k,onReject:j,className:N="",children:v}){const L=r({accept:n,maxSizeBytes:s,maxFiles:i,acceptHint:c,disabled:m,multiple:!0,currentCount:e.length,onAccept:n=>t([...e,...n])}),
|
|
9
|
+
/* @__PURE__ */d(e,{"aria-label":p,onClick:t,disabled:i,size:"sm",children:/* @__PURE__ */d(m,{})}),n>0&&/* @__PURE__ */d("span",{"aria-hidden":"true",className:"pointer-events-none absolute -right-1 -top-1 min-w-[1rem] rounded-full bg-accent-fill px-1 text-center text-2xs font-semibold leading-4 text-on-accent",children:n})]}):/* @__PURE__ */d(s,{type:"button",variant:"secondary",size:"sm",onClick:t,disabled:i,leftIcon:/* @__PURE__ */d(m,{}),children:p})}function x({files:e,onChange:t,accept:n,maxSizeBytes:s,maxFiles:i,acceptHint:c,disabled:m=!1,dropLabel:p,attachLabel:x,trigger:g="button",actions:k,onReject:j,className:N="",children:v}){const L=r({accept:n,maxSizeBytes:s,maxFiles:i,acceptHint:c,disabled:m,multiple:!0,currentCount:e.length,onAccept:n=>t([...e,...n])}),R=l([]);return o(()=>{j&&L.rejections.length>0&&L.rejections!==R.current&&(R.current=L.rejections,j(L.rejections))},[L.rejections,j]),/* @__PURE__ */u(h,{intake:L,dropLabel:p,className:N,children:[v,
|
|
10
10
|
/* @__PURE__ */d(f,{files:e,disabled:m,onRemove:n=>{L.clearRejections(),t(e.filter((e,t)=>t!==n))},className:"mt-2"}),
|
|
11
11
|
/* @__PURE__ */u("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[
|
|
12
12
|
/* @__PURE__ */d(b,{onClick:L.open,count:e.length,variant:g,label:x,disabled:m}),k]}),
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import{Calendar as e}from"./chunk-
|
|
2
|
-
/* @__PURE__ */M("button",{type:"button",onClick:()=>ne("Custom"),className:
|
|
3
|
-
/* @__PURE__ */M(e,{mode:"range",min:
|
|
1
|
+
import{Calendar as e}from"./chunk-JH4ZCPHW.js";import{toDateKey as t,fromDateKey as r,toMonthKey as n}from"./chunk-2HMNOLKX.js";import{FILTER_ON as a,FILTER_ON_INK as o,FILTER_OFF as i}from"./chunk-AYZY3YNC.js";import{calendarNames as l}from"./chunk-Y3JW2GW5.js";import{pad2 as s}from"./chunk-LF27WIN2.js";import{buttonClasses as c}from"./chunk-UQYNPYF4.js";import{Icon as d}from"./chunk-2UO47XB4.js";import{onOverlayOpen as m}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as u}from"./chunk-62LW225J.js";import{useDropdownPosition as h}from"./chunk-GLUJS42B.js";import{glassStyle as p}from"./chunk-F27JJHNJ.js";import{useBrowserLayoutEffect as f}from"./chunk-D65T4H6J.js";import{useShellStrings as g,useShellLocale as b}from"./chunk-GDQJBQ5B.js";import{useState as x,useRef as v,useId as y,useEffect as w}from"react";import{createPortal as N}from"react-dom";import{jsxs as k,Fragment as C,jsx as M}from"react/jsx-runtime";var W=["last2Weeks","lastMonth","last3Months","last6Months","last12Months"],j=t;function D(e,r){const n=r.getFullYear(),a=r.getMonth(),o=new Date(n,a,r.getDate()),i=new Date(n,a,0),l=e=>new Date(n,a-e,1);switch(e){case"last2Weeks":return{from:t(new Date(n,a,r.getDate()-14)),to:t(o)};case"lastMonth":return{from:t(l(1)),to:t(i)};case"last3Months":return{from:t(l(3)),to:t(i)};case"last6Months":return{from:t(l(6)),to:t(i)};case"last12Months":return{from:t(l(12)),to:t(i)}}}function $(e,t,r){const a=n(e);return t&&a<t.slice(0,7)?t.slice(0,7):r&&a>r.slice(0,7)?r.slice(0,7):a}function F(e){const t=r(e);return t?`${s(t.getDate())}/${s(t.getMonth()+1)}/${t.getFullYear()}`:e}var Y=/* @__PURE__ */new Map;function H({from:t,to:n,onChange:s,formatDisplay:j,clearable:H,required:J=!1,name:O,id:S,"aria-labelledby":B,"aria-label":L,weekStartsOn:G,placeholder:T,fullWidth:U=!1,min:E,max:R,disabled:q=!1,allowOpenEnd:A=!1}){const I=g().dateRange,P=b(),Q=j??(P?function(e){let t=Y.get(e);t||(t=new Intl.DateTimeFormat(e,{year:"numeric",month:"2-digit",day:"2-digit",timeZone:"UTC",calendar:"gregory"}),Y.set(e,t));const n=t;return e=>{const t=r(e);return t?n.format(new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()))):e}}(P):F),Z=T??I.placeholder,X=H??!J,[z,K]=x(!1),[V,_]=x(t),[ee,te]=x(n),[re,ne]=x(null),[ae,oe]=x("from"),ie=v(null),le=v(null),se=v(null),ce=y(),de=y(),me=y(),[ue,he]=x(!1),pe=h(ie,z,{preferredMaxWidth:520,preferredMaxHeight:ue?720:560,popupRef:se}),fe=v(null),ge=v(null),[be,xe]=x(!0);f(()=>{const e=ge.current;if(!z||!ue||!e)return;const t=getComputedStyle(e).gridTemplateColumns.split(" ").filter(Boolean).length||1,r=parseFloat(getComputedStyle(e).columnGap)||0,n=(e.clientWidth-r*(t-1))/t,a=Math.max(...Array.from(e.querySelectorAll("[data-preset-measure]"),e=>e.offsetWidth))+24+2<=n+.5;a!==be&&xe(a)});const ve=v(null);f(()=>{const e=se.current;if(!z||!pe||!e)return;const t=getComputedStyle(e),r=pe.maxWidth-(e.offsetWidth-e.clientWidth)-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight);if(ue)null!==ve.current&&ve.current<=r&&he(!1);else{const e=fe.current?.offsetWidth??0;if(0===e)return;ve.current=e,e>r+.5&&he(!0)}});const[ye,we]=x(!1);f(()=>{const e=!!S&&(le.current?.labels?.length??0)>0;e!==ye&&we(e)});const Ne=!!L||!!B||ye,ke=/* @__PURE__ */new Date,[Ce,Me]=x(()=>t?t.slice(0,7):$(ke,E,R)),We=W.filter(e=>((e,t,r)=>(!t||e.from>=t)&&(!r||e.to<=r))(D(e,ke),E,R)),je=e=>e?Q(e):"";w(()=>{if(!z)return;const e=e=>{const t=e.target;ie.current?.contains(t)||se.current?.contains(t)||K(!1)};document.addEventListener("mousedown",e);const t=m(()=>K(!1));return()=>{document.removeEventListener("mousedown",e),t()}},[z]),w(()=>{q&&K(!1)},[q]);const De=()=>{s("",""),K(!1)},$e=t&&n?`${je(t)} — ${je(n)}`:t?I.fromOnly(je(t)):n?I.toOnly(je(n)):"",Fe=l(P),Ye=e=>{const t=r(e);return t?Fe.longDate(t.getFullYear(),t.getMonth(),t.getDate()):e},He=t&&n?I.range(Ye(t),Ye(n)):t?I.fromOnly(Ye(t)):n?I.toOnly(Ye(n)):Z,Je=e=>ue?"h-8 w-full min-w-0 truncate rounded-(--radius-control) border px-3 text-sm transition-colors "+(re===e?"border-blue-300 bg-accent-tint text-blue-700 font-medium":"border-line text-ink hover:bg-row-hover"):"h-8 text-left px-3 text-sm rounded-(--radius-control) transition-colors "+(re===e?"bg-accent-tint text-blue-700 font-medium":"text-ink hover:bg-row-hover"),Oe=/* @__PURE__ */k(C,{children:[We.map(e=>/* @__PURE__ */M("button",{type:"button",onClick:()=>(e=>{if("Custom"===e)return;const t=D(e,ke);_(t.from),te(t.to),ne(e),Me(t.from.slice(0,7))})(e),className:Je(e),"aria-label":ue?I[e]:void 0,children:ue?be?I[e]:I[`${e}Short`]:I[e]},e)),
|
|
2
|
+
/* @__PURE__ */M("button",{type:"button",onClick:()=>ne("Custom"),className:Je("Custom"),children:I.custom})]}),Se=(e,t)=>A?/* @__PURE__ */M("button",{type:"button","data-range-end":e,"aria-pressed":ae===e,onClick:()=>oe(e),className:"flex items-center gap-2 whitespace-nowrap rounded rosh-focus-ring",children:t}):/* @__PURE__ */M("div",{className:"flex items-center gap-2 whitespace-nowrap",children:t}),Be=e=>A&&ae===e?" ring-1 ring-blue-400":"",Le=
|
|
3
|
+
/* @__PURE__ */M(e,{mode:"range",min:E,max:R,value:V||null,endValue:ee||null,month:Ce,onMonthChange:Me,onSelect:e=>{ne("Custom"),A?"from"===ae?(ee&&e>ee?(_(ee),te(e)):_(e),oe("to")):V&&e<V?(te(V),_(e)):te(e):!V||V&&ee?(_(e),te("")):e<V?(te(V),_(e)):te(e)},weekStartsOn:G,"aria-label":I.dialog});/* @__PURE__ */
|
|
4
4
|
return k("div",{className:"relative"+(U?" w-full":""),ref:ie,children:[
|
|
5
|
-
/* @__PURE__ */k("div",{className:`${U?"flex w-full":"inline-flex"} h-8 items-center gap-2 border rounded-lg px-3 text-sm focus-within:border-blue-500 has-focus-visible:ring-1 has-focus-visible:ring-[color:var(--rosh-focus-ring-deep)] ${t||n?`${a} ${o}`:i}${
|
|
6
|
-
/* @__PURE__ */k("button",{ref:le,type:"button",onClick:()=>{
|
|
5
|
+
/* @__PURE__ */k("div",{className:`${U?"flex w-full":"inline-flex"} h-8 items-center gap-2 border rounded-lg px-3 text-sm focus-within:border-blue-500 has-focus-visible:ring-1 has-focus-visible:ring-[color:var(--rosh-focus-ring-deep)] ${t||n?`${a} ${o}`:i}${q?" cursor-not-allowed opacity-60":""}`,children:[
|
|
6
|
+
/* @__PURE__ */k("button",{ref:le,type:"button",onClick:()=>{q||(_(t),te(n),ne(null),oe(t&&!n?"to":"from"),Me(t?t.slice(0,7):$(ke,E,R)),K(!0))},"aria-haspopup":"dialog","aria-expanded":z,id:S,disabled:q||void 0,"aria-label":L,"aria-labelledby":B,"aria-describedby":[Ne?de:void 0,J?me:void 0].filter(Boolean).join(" ")||void 0,"aria-controls":z?ce:void 0,className:"inline-flex items-center gap-2 rosh-focus-ring"+(U?" min-w-0 flex-1 justify-start":""),children:[
|
|
7
7
|
/* @__PURE__ */M(d,{name:"date",className:"w-4 h-4 shrink-0",strokeWidth:"2","aria-hidden":"true"}),
|
|
8
|
-
/* @__PURE__ */M("span",{className:"truncate",children:$e||Z})]}),
|
|
9
|
-
/* @__PURE__ */M("input",{type:"hidden",name:
|
|
10
|
-
/* @__PURE__ */M("input",{type:"hidden",name:
|
|
11
|
-
/* @__PURE__ */k("div",{ref:se,id:ce,role:"dialog","aria-label":I.dialog,"data-layout":ue?"stacked":"side",className:"fixed rounded-(--radius-popup) p-4",style:{zIndex:u.popup,left:pe?.left,right:pe?.right,top:pe?.top,bottom:pe?.bottom,width:ue&&pe?pe.maxWidth:"max-content",maxWidth:pe?.maxWidth,maxHeight:pe?.maxHeight,overflowY:"auto",visibility:pe?void 0:"hidden",...
|
|
12
|
-
/* @__PURE__ */k("div",{className:ue?"mb-3 flex flex-wrap items-center gap-x-4 gap-y-2":"flex items-center gap-3 mb-3",children:[
|
|
8
|
+
/* @__PURE__ */M("span",{className:"truncate",children:$e||Z})]}),X&&!q&&(t||n)&&/* @__PURE__ */M("button",{type:"button",onClick:De,"aria-label":I.clearRange,className:"text-blue-400 hover:text-red-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded",children:"×"})]}),Ne&&/* @__PURE__ */M("span",{id:de,className:"sr-only",children:He}),J&&/* @__PURE__ */M("span",{id:me,className:"sr-only",children:I.required}),O&&/* @__PURE__ */k(C,{children:[
|
|
9
|
+
/* @__PURE__ */M("input",{type:"hidden",name:O.from,value:t,disabled:q||void 0}),
|
|
10
|
+
/* @__PURE__ */M("input",{type:"hidden",name:O.to,value:n,disabled:q||void 0})]}),z&&N(
|
|
11
|
+
/* @__PURE__ */k("div",{ref:se,id:ce,role:"dialog","aria-label":I.dialog,"data-layout":ue?"stacked":"side",className:"fixed rounded-(--radius-popup) p-4",style:{zIndex:u.popup,left:pe?.left,right:pe?.right,top:pe?.top,bottom:pe?.bottom,width:ue&&pe?pe.maxWidth:"max-content",maxWidth:pe?.maxWidth,maxHeight:pe?.maxHeight,overflowY:"auto",visibility:pe?void 0:"hidden",...p()},children:[
|
|
12
|
+
/* @__PURE__ */k("div",{className:ue?"mb-3 flex flex-wrap items-center gap-x-4 gap-y-2":"flex items-center gap-3 mb-3",children:[Se("from",/* @__PURE__ */k(C,{children:[
|
|
13
13
|
/* @__PURE__ */M("span",{className:"text-xs font-medium text-gray-500",children:I.from}),
|
|
14
|
-
/* @__PURE__ */M("span",{className:`text-sm px-2 py-1 rounded border min-w-[90px] ${V?"border-blue-300 bg-accent-tint text-blue-700":"border-line bg-surface-sunken text-ink-faintest"}${
|
|
14
|
+
/* @__PURE__ */M("span",{className:`text-sm px-2 py-1 rounded border min-w-[90px] ${V?"border-blue-300 bg-accent-tint text-blue-700":"border-line bg-surface-sunken text-ink-faintest"}${Be("from")}`,children:V?je(V):I.start})]})),!ue&&/* @__PURE__ */M("span",{className:"text-gray-300",children:"—"}),Se("to",/* @__PURE__ */k(C,{children:[
|
|
15
15
|
/* @__PURE__ */M("span",{className:"text-xs font-medium text-gray-500",children:I.to}),
|
|
16
|
-
/* @__PURE__ */M("span",{className:`text-sm px-2 py-1 rounded border min-w-[90px] ${ee?"border-blue-300 bg-accent-tint text-blue-700":"border-line bg-surface-sunken text-ink-faintest"}${
|
|
17
|
-
/* @__PURE__ */k("div",{ref:ge,className:"relative grid grid-cols-2 gap-2 @min-[320px]:grid-cols-3",children:[
|
|
18
|
-
/* @__PURE__ */M("div",{className:"w-full",children:
|
|
16
|
+
/* @__PURE__ */M("span",{className:`text-sm px-2 py-1 rounded border min-w-[90px] ${ee?"border-blue-300 bg-accent-tint text-blue-700":"border-line bg-surface-sunken text-ink-faintest"}${Be("to")}`,children:ee?je(ee):I.end})]}))]}),ue?/* @__PURE__ */k(C,{children:[We.length>0&&/* @__PURE__ */k("div",{className:"mb-3 @container",children:[!be&&/* @__PURE__ */M("p",{"aria-hidden":"true",className:"mb-1 text-xs font-medium text-ink-faint",children:I.lastHeading}),
|
|
17
|
+
/* @__PURE__ */k("div",{ref:ge,className:"relative grid grid-cols-2 gap-2 @min-[320px]:grid-cols-3",children:[Oe,We.map(e=>/* @__PURE__ */M("span",{"data-preset-measure":"","aria-hidden":"true",className:"invisible absolute left-0 top-0 whitespace-nowrap text-sm",children:I[e]},e))]})]}),
|
|
18
|
+
/* @__PURE__ */M("div",{className:"w-full",children:Le})]}):
|
|
19
19
|
/* @__PURE__ */k("div",{ref:fe,className:"flex w-max gap-4",children:[
|
|
20
|
-
/* @__PURE__ */M("div",{className:"w-64",children:
|
|
21
|
-
/* @__PURE__ */k("div",{className:"flex flex-wrap justify-end gap-2 mt-4 pt-3 border-t border-gray-200",children:[
|
|
20
|
+
/* @__PURE__ */M("div",{className:"w-64",children:Le}),We.length>0&&/* @__PURE__ */M("div",{className:"border-l border-gray-200 pl-4 flex flex-col gap-1 min-w-[130px]",children:Oe})]}),
|
|
21
|
+
/* @__PURE__ */k("div",{className:"flex flex-wrap justify-end gap-2 mt-4 pt-3 border-t border-gray-200",children:[X&&/* @__PURE__ */M("button",{type:"button",onClick:De,className:c({variant:"ghost"}),children:I.clear}),
|
|
22
22
|
/* @__PURE__ */M("button",{type:"button",onClick:()=>K(!1),className:c({variant:"secondary"}),children:I.cancel}),
|
|
23
|
-
/* @__PURE__ */M("button",{type:"button",onClick:()=>{s(V,ee),K(!1)},disabled:
|
|
23
|
+
/* @__PURE__ */M("button",{type:"button",onClick:()=>{s(V,ee),K(!1)},disabled:A?!V&&!ee:!V||!ee,className:c({variant:"primary"}),children:I.apply})]})]}),document.body)]})}export{H as DateRangePicker,D as presetRange,j as toISODate};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{AccessibleTable as e}from"./chunk-ZMRGHVKS.js";import{bumpPath as t}from"./chunk-VFC6QUEN.js";import{useHighlight as n}from"./chunk-CNYAHYE6.js";import{ChartTooltip as o}from"./chunk-WZ5QSSUM.js";import{usePlotWidth as l}from"./chunk-MAFUXCPZ.js";import{resolveSeriesColor as r,CHART_INK as a}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as s}from"./chunk-GDQJBQ5B.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{useRef as c,useState as m}from"react";import{jsx as d,jsxs as u}from"react/jsx-runtime";function f({nodes:f,links:k,height:p=320,width:x,nodeWidth:g=14,nodePadding:y=12,formatValue:v,className:M,emptyLabel:w}){const b=i().charts,j=s(),$=v??(e=>h(e,j)),N=w??b.noFlows,C=c(null),E=l(C),F=x??E,[Q,S]=m(null),{highlighted:A}=n();if(0===f.length||0===k.length)/* @__PURE__ */
|
|
2
|
+
return d("div",{className:M,ref:C,children:/* @__PURE__ */d("p",{className:"py-8 text-center text-sm text-gray-500",children:N})});const U=[...new Set(f.map(e=>e.depth))].sort((e,t)=>e-t),Z=e=>U.length<=1?0:U.indexOf(e)/(U.length-1)*(F-g-140)+70,z=new Map(f.map(e=>{const t=k.filter(t=>t.from===e.key).reduce((e,t)=>e+t.value,0),n=k.filter(t=>t.to===e.key).reduce((e,t)=>e+t.value,0);return[e.key,Math.max(t,n,e.value??0)]})),B=/* @__PURE__ */new Map;for(const e of f)B.set(e.depth,[...B.get(e.depth)??[],e]);const H=Math.max(...[...B.values()].map(e=>e.reduce((e,t)=>e+(z.get(t.key)??0),0))),O=p-20,R=H>0?(O-y*(Math.max(...[...B.values()].map(e=>e.length))-1))/H:0,V=/* @__PURE__ */new Map;for(const[e,t]of B){const n=t.map(e=>Math.max(2,(z.get(e.key)??0)*R)),o=n.reduce((e,t)=>e+t,0)+y*(t.length-1),l=n.reduce((e,t)=>e+Math.max(0,t-2),0),r=o>O&&l>0?Math.max(0,1-(o-O)/l):1;let a=10;t.forEach((t,o)=>{const l=2+Math.max(0,n[o]-2)*r;V.set(t.key,{x:Z(e),y:a,h:l,index:o}),a+=l+y})}const W=/* @__PURE__ */new Map,G=/* @__PURE__ */new Map,L=/* @__PURE__ */new Map,P=(e,t)=>e.from===t||e.to===t,T="link"===Q?.kind?k[Q.index]:void 0,Y="node"===Q?.kind?f.find(e=>e.key===Q.key):void 0;/* @__PURE__ */
|
|
3
|
+
return u("div",{className:`relative ${M??""}`,ref:C,children:[
|
|
4
|
+
/* @__PURE__ */u("svg",{width:"100%",height:p,viewBox:`0 0 ${F} ${p}`,role:"img","aria-label":b.sankey(f.length,k.length),onMouseLeave:()=>S(null),children:[k.map((e,n)=>{const o=V.get(e.from),l=V.get(e.to);if(!o||!l)return null;const a=Math.max(1,e.value*R),i=o.y+(W.get(e.from)??0)+a/2,s=l.y+(G.get(e.to)??0)+a/2;W.set(e.from,(W.get(e.from)??0)+a),G.set(e.to,(G.get(e.to)??0)+a);const h=o.x+g,c=l.x,m=r(o.index,e.color),u=`${e.from}→${e.to}`,f=L.get(u)??0;L.set(u,f+1);const k=((e,t)=>Q?"link"===Q.kind?Q.index===t:P(e,Q.key):null!==A?P(e,A):null)(e,n);/* @__PURE__ */
|
|
5
|
+
return d("path",{d:t([[h,i],[c,s]]),fill:"none",stroke:m,strokeWidth:a,strokeOpacity:null===k||k?.42:.12,onMouseEnter:()=>S({kind:"link",index:n})},f?`${u}#${f}`:u)}),f.map(e=>{const t=V.get(e.key);if(!t)return null;const n=t.x>F/2,o=(l=e.key,Q?"node"===Q.kind?Q.key===l:P(k[Q.index],l):null!==A?A===l:null);var l;/* @__PURE__ */
|
|
6
|
+
return u("g",{opacity:null===o||o?1:.45,onMouseEnter:()=>S({kind:"node",key:e.key}),children:[
|
|
7
|
+
/* @__PURE__ */d("rect",{x:t.x,y:t.y,width:g,height:t.h,rx:2,fill:r(t.index,e.color,e.tone)}),
|
|
8
|
+
/* @__PURE__ */d("text",{x:n?t.x-8:t.x+g+8,y:t.y+t.h/2+4,textAnchor:n?"end":"start",fontSize:11,fill:a.label,children:e.label})]},e.key)})]}),T&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(o,{title:`${T.from} → ${T.to}`,rows:[{key:"value",label:b.flow,color:r(V.get(T.from)?.index??0,T.color),value:$(T.value)}]})}),Y&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(o,{title:Y.label,rows:[{key:"value",label:b.throughput,color:r(V.get(Y.key)?.index??0,Y.color,Y.tone),value:$(z.get(Y.key)??0)}]})}),
|
|
9
|
+
/* @__PURE__ */d(e,{caption:b.sankey(f.length,k.length),head:[b.tableFrom,b.tableTo,b.value],rows:k.map(e=>[e.from,e.to,$(e.value)])})]})}export{f as SankeyChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{formatMoney as e}from"./chunk-GEYM4WN3.js";import{EMPTY_VALUE as r}from"./chunk-36BRD5J3.js";import{TimeSeriesChart as t}from"./chunk-
|
|
1
|
+
import{formatMoney as e}from"./chunk-GEYM4WN3.js";import{EMPTY_VALUE as r}from"./chunk-36BRD5J3.js";import{TimeSeriesChart as t}from"./chunk-4Q25UHWB.js";import{ChartFrame as a}from"./chunk-VAK5FQXH.js";import{ColumnChart as l}from"./chunk-4D66DUU5.js";import{TH_ONE_LINE as s}from"./chunk-S5SRXI4V.js";import{jsxs as o,jsx as i}from"react/jsx-runtime";function n({spec:n,height:c=200,width:m,animate:d=!0,className:h}){const u=function(r){if(r.currency)return t=>e(t,r.currency);const t=r.unit?` ${r.unit}`:"";return e=>`${e.toLocaleString("en-US",{maximumFractionDigits:2})}${t}`}(n),p=n.currency?r=>e(r,n.currency,{whole:!0}):u,b=n.series.map((e,r)=>({key:`s${r}`,label:e.name,data:e.values})),y=n.title??n.series.map(e=>e.name).join(", "),f=/* @__PURE__ */o("table",{className:"w-full border-collapse text-sm",children:[
|
|
2
2
|
/* @__PURE__ */i("thead",{children:/* @__PURE__ */o("tr",{children:[
|
|
3
3
|
/* @__PURE__ */i("td",{className:"border-b border-gray-200"}),n.series.map((e,r)=>/* @__PURE__ */i("th",{scope:"col",className:`${s} border-b border-gray-200 px-2 py-1 text-right font-semibold text-gray-700`,children:e.name},r))]})}),
|
|
4
4
|
/* @__PURE__ */i("tbody",{children:n.x.map((e,t)=>/* @__PURE__ */o("tr",{children:[
|