efficient-shell 8.18.0 → 8.19.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 +25 -8
- package/dist/{Browser-H5OJL6TK.js → Browser-MISWU3ND.js} +14 -14
- package/dist/Calculator-PH6NVEEZ.js +29 -0
- package/dist/{CurrencyConverter-5AIXDNF6.js → CurrencyConverter-PD2CEL6V.js} +8 -8
- package/dist/{Documents-352IGNWY.js → Documents-FQ6H7THR.js} +5 -5
- package/dist/{Files-ODENHLKQ.js → Files-R2657GKS.js} +21 -21
- package/dist/{Notepad-DWPTCM2I.js → Notepad-S3OWN7B7.js} +10 -10
- package/dist/{PdfViewer-456B27TB.js → PdfViewer-GODDA4GG.js} +1 -1
- package/dist/{PomodoroTimer-YWR6X3FT.js → PomodoroTimer-JEQTTMGA.js} +33 -33
- package/dist/{Preview-LMUHIWNB.js → Preview-DR4RDUTU.js} +30 -30
- package/dist/Sidebar-SJMMY2Y2.js +43 -0
- package/dist/{Spreadsheet-DAZUBPFY.js → Spreadsheet-XJX6HY6R.js} +13 -13
- package/dist/{Stock-C2EQYFNA.js → Stock-VCMJMUCW.js} +7 -7
- package/dist/{Weather-EZU5A7JW.js → Weather-HF3E3N3M.js} +15 -15
- package/dist/{WorldClock-SKUEYQXU.js → WorldClock-PM5CJQSL.js} +6 -6
- package/dist/ai/index.js +11 -11
- 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/ChartBrush.js +1 -1
- package/dist/charts/ChartFrame.js +1 -1
- package/dist/charts/ChartSkeleton.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/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-KH6GERFP.js → chunk-2GPXC6JX.js} +1 -1
- package/dist/{chunk-WDIFRAQM.js → chunk-2SHDXTB6.js} +4 -4
- package/dist/{chunk-QTNPOMXM.js → chunk-36DYXGQI.js} +5 -5
- package/dist/{chunk-O5PJELY7.js → chunk-3AVHOYQZ.js} +1 -1
- package/dist/{chunk-KW4VUPJV.js → chunk-3KDY6V6I.js} +8 -8
- package/dist/{chunk-Z7PS4QUO.js → chunk-3NWCVZRK.js} +6 -6
- package/dist/{chunk-JSVYN6D6.js → chunk-3P7SBAKK.js} +1 -1
- package/dist/{chunk-YFY2LSWZ.js → chunk-3RM3D2P3.js} +6 -6
- package/dist/{chunk-DQEST7MN.js → chunk-3V6UFR7M.js} +1 -1
- package/dist/{chunk-2ZIVFBJN.js → chunk-3WM23XSR.js} +6 -6
- package/dist/{chunk-TDAFCJY7.js → chunk-47MFBFIX.js} +4 -4
- package/dist/{chunk-BVDGHZ4H.js → chunk-4MTC6HA5.js} +2 -2
- package/dist/{chunk-DBBUHXRT.js → chunk-4TER5BHR.js} +1 -1
- package/dist/{chunk-3NU2B2WM.js → chunk-55DONELU.js} +9 -9
- package/dist/{chunk-F2HM7SV4.js → chunk-5GMWOYTF.js} +1 -1
- package/dist/{chunk-EA37JL6P.js → chunk-5JQCPUEO.js} +1 -1
- package/dist/{chunk-YGITR6I5.js → chunk-5TVF4BCM.js} +1 -1
- package/dist/{chunk-XW56UIDQ.js → chunk-5VUVKP55.js} +6 -6
- package/dist/{chunk-NQ46AZ3D.js → chunk-6SBPGUSR.js} +1 -1
- package/dist/{chunk-4JCNWUVZ.js → chunk-7HTURXIA.js} +2 -2
- package/dist/{chunk-A3MOA3T7.js → chunk-7RD623PT.js} +1 -1
- package/dist/{chunk-FJUFQXDS.js → chunk-7SPX7DLO.js} +21 -21
- package/dist/{chunk-DGTP6BGV.js → chunk-ABD5X73I.js} +1 -1
- package/dist/{chunk-UNDHDLWB.js → chunk-AILWMDWP.js} +1 -1
- package/dist/{chunk-HKAWQF7O.js → chunk-AK632G3F.js} +7 -7
- package/dist/{chunk-SACUPX6L.js → chunk-AZWEWGYG.js} +3 -3
- package/dist/chunk-B36HEVMT.js +28 -0
- package/dist/{chunk-ABD34D3N.js → chunk-B5MOPSMW.js} +3 -3
- package/dist/{chunk-XINUGME7.js → chunk-BIEKHPZ5.js} +82 -82
- package/dist/chunk-BLO7KTPH.js +1 -0
- package/dist/chunk-BZWTFLQD.js +15 -0
- package/dist/{chunk-LWGNNVDA.js → chunk-CDBS47XI.js} +1 -1
- package/dist/{chunk-K2DUF2AR.js → chunk-CHOMUTLT.js} +1 -1
- package/dist/{chunk-U5YJREQJ.js → chunk-CIGHIX6Z.js} +10 -10
- package/dist/{chunk-P5ILG2DA.js → chunk-CQAXN3HN.js} +1 -1
- package/dist/{chunk-QTK5NV7L.js → chunk-CQXKO5PB.js} +1 -1
- package/dist/{chunk-6JLZMVVE.js → chunk-CVNM25BM.js} +5 -5
- package/dist/{chunk-TPDOOCFS.js → chunk-CY5N5OA3.js} +1 -1
- package/dist/{chunk-5WYCXSUM.js → chunk-D6FSZBJ5.js} +1 -1
- package/dist/chunk-DAJTVAWO.js +11 -0
- package/dist/{chunk-QCP4F6EF.js → chunk-DBDJQVQM.js} +1 -1
- package/dist/{chunk-HBBTB6RW.js → chunk-DBLJIK5J.js} +1 -1
- package/dist/{chunk-2VFRVO3N.js → chunk-DCNXCFAD.js} +28 -28
- package/dist/{chunk-TSOK3QNK.js → chunk-E2YGQAFU.js} +1 -1
- package/dist/{chunk-VSQSBY2P.js → chunk-ENVCMR3M.js} +5 -5
- package/dist/{chunk-Y67ILJVG.js → chunk-EVPOZQOI.js} +1 -1
- package/dist/{chunk-WVWIRII2.js → chunk-EXVR3BWW.js} +9 -9
- package/dist/{chunk-HIDOSOI4.js → chunk-F22KWATP.js} +1 -1
- package/dist/{chunk-AAYACT5T.js → chunk-F4PESM6A.js} +4 -4
- package/dist/{chunk-HAZLMRTT.js → chunk-F5VXS5JO.js} +1 -1
- package/dist/{chunk-EOPPYQIT.js → chunk-FBSQABH2.js} +1 -1
- package/dist/{chunk-BG5BCF64.js → chunk-FFZ7KPIV.js} +7 -7
- package/dist/{chunk-NU55QIUV.js → chunk-G3IG4X4Z.js} +1 -1
- package/dist/chunk-GMEOULVW.js +11 -0
- package/dist/{chunk-ZVK74ERI.js → chunk-H5GQWWPA.js} +1 -1
- package/dist/chunk-H5VGRHNT.js +9 -0
- package/dist/{chunk-7F5FURAC.js → chunk-HFSEPYFH.js} +1 -1
- package/dist/chunk-HLGE6TVE.js +4 -0
- package/dist/{chunk-HNFLUVVM.js → chunk-HME2P5VX.js} +22 -22
- package/dist/{chunk-6OPAUSMV.js → chunk-HT33WUTK.js} +2 -2
- package/dist/{chunk-37DRDM4D.js → chunk-IGH6DECG.js} +13 -13
- package/dist/{chunk-EO2XHSIK.js → chunk-IH4SVMXJ.js} +2 -2
- package/dist/{chunk-CG4KTWP4.js → chunk-IM7QHAXT.js} +5 -5
- package/dist/{chunk-I5T3A4KI.js → chunk-J67YIQEN.js} +1 -1
- package/dist/{chunk-A3R6DKQ5.js → chunk-JJ6IUIYX.js} +1 -1
- package/dist/{chunk-7NOU275V.js → chunk-JSB5G2XQ.js} +2 -2
- package/dist/{chunk-LDHYCVMV.js → chunk-KATRRQD5.js} +1 -1
- package/dist/{chunk-APMBWBD7.js → chunk-KB6BGPQK.js} +1 -1
- package/dist/{chunk-ZSRYQW64.js → chunk-KE6NYTGF.js} +3 -3
- package/dist/chunk-KKZZAK76.js +1 -0
- package/dist/{chunk-DTJQHW3Q.js → chunk-KZ6P7WC6.js} +1 -1
- package/dist/{chunk-K5UPORAA.js → chunk-L2XGVLO7.js} +1 -1
- package/dist/{chunk-2QYQDCJE.js → chunk-LMOPRRQY.js} +10 -10
- package/dist/{chunk-3XLDWJDG.js → chunk-MBXTOYMX.js} +6 -6
- package/dist/{chunk-BJGD2ZWK.js → chunk-MQADQ4YF.js} +1 -1
- package/dist/{chunk-SGVIMTN6.js → chunk-MRBC7GLE.js} +17 -17
- package/dist/{chunk-CGY5RNAF.js → chunk-MVCNSGM4.js} +2 -2
- package/dist/chunk-N7GAQVSH.js +8 -0
- package/dist/{chunk-SLC3KT7F.js → chunk-N7KL336H.js} +6 -6
- package/dist/{chunk-HQIUFRWO.js → chunk-NDOW3VA6.js} +1 -1
- package/dist/{chunk-NADUURUA.js → chunk-NGVODCMV.js} +1 -1
- package/dist/chunk-NI76QOA2.js +2 -0
- package/dist/{chunk-GVYJYXVH.js → chunk-NZ67C5OK.js} +10 -10
- package/dist/{chunk-2RKTVTJJ.js → chunk-O3HXASSH.js} +1 -1
- package/dist/{chunk-HQNR4JQG.js → chunk-O43QLNPL.js} +1 -1
- package/dist/{chunk-Q6BY4BME.js → chunk-OAYHU7YN.js} +1 -1
- package/dist/{chunk-QMLG5XKP.js → chunk-OHSJWKNV.js} +5 -5
- package/dist/chunk-PTMPGFUQ.js +8 -0
- package/dist/{chunk-SS7BG7BS.js → chunk-PXCARPLZ.js} +1 -1
- package/dist/{chunk-73FD77RD.js → chunk-Q2S76TZH.js} +1 -1
- package/dist/{chunk-KIYO4U4T.js → chunk-Q6YPDR7U.js} +12 -12
- package/dist/{chunk-AG3ALTVD.js → chunk-Q75PSCZ5.js} +10 -10
- package/dist/{chunk-6EAVTBKE.js → chunk-QKHTL3FQ.js} +4 -4
- package/dist/{chunk-LJVLMM3Q.js → chunk-QSPW43OC.js} +7 -7
- package/dist/{chunk-M7JJOCBU.js → chunk-R6L6PKQP.js} +1 -1
- package/dist/chunk-R7XAMDBY.js +2 -0
- package/dist/{chunk-Z3ZIVVKE.js → chunk-RC5SGXXR.js} +1 -1
- package/dist/{chunk-LAHK4WVH.js → chunk-RHYMHVFS.js} +8 -8
- package/dist/{chunk-6YPZHG7O.js → chunk-RQ5RVKRO.js} +2 -2
- package/dist/{chunk-2YZ3ITNG.js → chunk-RV6N2Y52.js} +2 -2
- package/dist/{chunk-JBMGI5YX.js → chunk-RZT7QES5.js} +4 -4
- package/dist/{chunk-S2PKTGHB.js → chunk-SIQSD3QT.js} +6 -6
- package/dist/chunk-TCB2J3PS.js +9 -0
- package/dist/{chunk-JLDGZFNY.js → chunk-TKBP5HRY.js} +12 -12
- package/dist/chunk-TMTTEBZV.js +19 -0
- package/dist/{chunk-RPY7FBYY.js → chunk-U62AWCZR.js} +1 -1
- package/dist/{chunk-EFUQ4KAH.js → chunk-UELYZT4T.js} +1 -1
- package/dist/{chunk-HKTU536H.js → chunk-UEMGH6EO.js} +1 -1
- package/dist/{chunk-EJNFOBE3.js → chunk-UEUCGC6G.js} +4 -4
- package/dist/{chunk-HMA4ZSCS.js → chunk-VO3HT6IK.js} +1 -1
- package/dist/{chunk-UB6TIA2R.js → chunk-VO3KDIDR.js} +1 -1
- package/dist/{chunk-5N6VSOZV.js → chunk-VWVFKMU7.js} +1 -1
- package/dist/{chunk-PEEVPAIJ.js → chunk-VXWCX65A.js} +1 -1
- package/dist/chunk-VYKITRFG.js +12 -0
- package/dist/{chunk-56CQPUIJ.js → chunk-WGSIYW63.js} +14 -14
- package/dist/chunk-WL3AJ2UB.js +8 -0
- package/dist/chunk-WMO2JQNL.js +8 -0
- package/dist/{chunk-WVSLFX37.js → chunk-XBXEK6XP.js} +7 -7
- package/dist/{chunk-V7NVQ3Z7.js → chunk-XSFQR374.js} +1 -1
- package/dist/{chunk-QAR4NYW6.js → chunk-XUK35DKG.js} +1 -1
- package/dist/{chunk-USE4HNZ2.js → chunk-XXBGWT7L.js} +1 -1
- package/dist/{chunk-I74FRKHQ.js → chunk-Y65MPP3M.js} +1 -1
- package/dist/{chunk-4NB3WHWK.js → chunk-YUIWG2QT.js} +1 -1
- package/dist/{chunk-6MN2JR25.js → chunk-YXS67QZO.js} +8 -8
- package/dist/{chunk-4S724CEA.js → chunk-YZCRHDOB.js} +1 -1
- package/dist/{chunk-W4YNYZDQ.js → chunk-Z4BJRPAF.js} +2 -2
- package/dist/{chunk-V5GDA4I6.js → chunk-Z6V3EY6F.js} +3 -3
- package/dist/{chunk-UJULZQM2.js → chunk-ZDJNTOUS.js} +1 -1
- package/dist/{chunk-ZVY4J3PU.js → chunk-ZLHF5XRR.js} +7 -7
- package/dist/{chunk-MPN267PR.js → chunk-ZNZDV6SN.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/format/index.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Calendar.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DatePicker.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/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/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/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/PositionInput.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/TimePicker.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/mediaMoveItems.js +1 -1
- package/dist/forms/useFileIntake.js +1 -1
- package/dist/index.d.ts +26 -2
- package/dist/index.js +695 -695
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +2 -2
- package/dist/page-tabs/index.js +4 -4
- 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/CountBadge.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/EditableGrid.js +1 -1
- package/dist/shell/EmptyState.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/LanguageSelect.js +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/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/TimeAgo.js +1 -1
- package/dist/shell/TimelineTrack.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/language.js +1 -1
- package/dist/shell/strings.d.ts +3 -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.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.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-VHXRKH2M.js +0 -29
- package/dist/Sidebar-ZIHLBHKR.js +0 -43
- package/dist/chunk-7GCBMTP2.js +0 -4
- package/dist/chunk-AJOWAZ46.js +0 -1
- package/dist/chunk-B6BE4WSP.js +0 -8
- package/dist/chunk-BE4APEUI.js +0 -2
- package/dist/chunk-CKDFXYYY.js +0 -8
- package/dist/chunk-FNQJO3HZ.js +0 -11
- package/dist/chunk-FTQ5DH5U.js +0 -8
- package/dist/chunk-GTRUBA2R.js +0 -1
- package/dist/chunk-GVKFLNRP.js +0 -12
- package/dist/chunk-MNQ6EPAR.js +0 -9
- package/dist/chunk-QSVKEONU.js +0 -2
- package/dist/chunk-QYGBWH5J.js +0 -15
- package/dist/chunk-VKLVHULL.js +0 -22
- package/dist/chunk-WEJFTUS7.js +0 -9
- package/dist/chunk-YULJ7F6Z.js +0 -19
- package/dist/chunk-ZGCLFQS5.js +0 -8
- package/dist/chunk-ZWQRFYE6.js +0 -11
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Avatar as e}from"./chunk-
|
|
1
|
+
import{Avatar as e}from"./chunk-D6FSZBJ5.js";import{StatCard as a,Card as t}from"./chunk-47MFBFIX.js";import{Sparkline as r}from"./chunk-CKCDGSTC.js";import{PieChart as s}from"./chunk-RHYMHVFS.js";import{ColumnChart as l}from"./chunk-WL3AJ2UB.js";import{StatusBadgeProvider as i,StatusBadge as d}from"./chunk-5SULG7D5.js";import{TH_ONE_LINE as c}from"./chunk-7T3COEQK.js";import{Button_default as n}from"./chunk-UDD7GB4F.js";import{jsx as o,jsxs as m}from"react/jsx-runtime";var u={paid:"success",shipped:"active",processing:"queued",refunded:"neutral",overdue:"danger"},h=[12,18,14,22,19,27,24,31,28,35,30,38],p=["J","F","M","A","M","J","J","A","S","O","N","D"],g=[{key:"direct",label:"Direct",value:45},{key:"search",label:"Search",value:30},{key:"social",label:"Social",value:15},{key:"email",label:"Email",value:10}],x=[{id:"#3201",customer:"Alice Nguyen",total:"$1,204",status:"paid"},{id:"#3202",customer:"Marco Reyes",total:"$642",status:"shipped"},{id:"#3203",customer:"Priya Patel",total:"$2,980",status:"processing"},{id:"#3204",customer:"Tom Becker",total:"$318",status:"overdue"},{id:"#3205",customer:"Sara Lind",total:"$540",status:"refunded"}];function v(){/* @__PURE__ */
|
|
2
2
|
return o(i,{groups:u,children:/* @__PURE__ */o("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */m("div",{className:"mx-auto max-w-6xl space-y-6",children:[
|
|
3
3
|
/* @__PURE__ */m("div",{className:"flex items-center justify-between gap-4",children:[
|
|
4
4
|
/* @__PURE__ */m("div",{children:[
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Popover as e}from"./chunk-RNBM5JZI.js";import{IconButton_default as r}from"./chunk-HMZLRXLA.js";import{Icon as n}from"./chunk-42BBJJDP.js";import{Tooltip as a}from"./chunk-2LXTJXWC.js";import{useShellStrings as l}from"./chunk-
|
|
1
|
+
import{Popover as e}from"./chunk-RNBM5JZI.js";import{IconButton_default as r}from"./chunk-HMZLRXLA.js";import{Icon as n}from"./chunk-42BBJJDP.js";import{Tooltip as a}from"./chunk-2LXTJXWC.js";import{useShellStrings as l}from"./chunk-KKZZAK76.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,N=e=>e.label??x[e.value]??e.value,w=t([]),k=Math.max(0,u.findIndex(e=>e.value===c)),A=u[k],j=A?.value===h,C=t(null);/* @__PURE__ */
|
|
2
2
|
return i(e,{className:v,disabled:f,triggerLabel:A?b.button(d,N(A)):d,"aria-label":d,initialFocus:C,panelClassName:"!p-2",trigger:/* @__PURE__ */o("span",{className:"inline-flex items-center gap-2",children:[/* @__PURE__ */i("span",j||!A?{className:"text-sm",children:A?N(A):""}:{"aria-hidden":"true",className:"inline-flex [&_svg]:h-4 [&_svg]:w-4",children:A.icon}),
|
|
3
3
|
/* @__PURE__ */i(n,{name:"chevron-down",className:"h-4 w-4"})]}),children:({close:e})=>/* @__PURE__ */i("div",{role:"listbox","aria-label":d,className:"grid gap-1",style:{gridTemplateColumns:`repeat(${p}, 2rem)`},children:u.map((n,l)=>{const t=n.value===c;/* @__PURE__ */
|
|
4
4
|
return i(a,{content:N(n),children:/* @__PURE__ */i(r,{ref:e=>{w.current[l]=e,l===k&&(C.current=e)},role:"option","aria-selected":t,"aria-label":N(n),pressed:t,tabIndex:l===k?0:-1,onKeyDown:e=>((e,r)=>{const n=s[r.key];if(!n)return;r.preventDefault();const a=Math.floor(e/p)+n[0],l=e%p+n[1];if(a<0||l<0||l>=p)return;const t=a*p+l;if(!(t>=u.length)){for(const[e,r]of w.current.entries())r?.setAttribute("tabindex",e===t?"0":"-1");w.current[t]?.focus()}})(l,e),onClick:()=>{m(n.value),e()},children:/* @__PURE__ */i("span",{"aria-hidden":"true",className:"inline-flex [&_svg]:h-4 [&_svg]:w-4",children:n.icon})})},n.value)})})})}export{c as IconPicker};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{TimelineCard as e}from"./chunk-SURSVJA2.js";import{TimelineTrack as n,TimelineMilestoneIcon as s}from"./chunk-HME2P5VX.js";import{toDayMs as i,fmtSliderDate as t,DAY_MS as a}from"./chunk-YDEIXM2A.js";import{useBrowserValueOnce as l}from"./chunk-D65T4H6J.js";import{useShellStrings as o,useShellLocale as r}from"./chunk-KKZZAK76.js";import{jsx as h}from"react/jsx-runtime";function m({title:m,heading:d,subject:c,milestones:p,summary:u,endDate:g,phaseLabels:k,variant:v="card",edgeCaptions:f,highlightKeys:y=null,onHoverChange:b}){const M=l(Date.now,null),j=[],x=[],C=o().timeline,K=r();for(const e of p){const n=i(e.date??null);null===n?x.push({key:e.key,label:e.label,kind:e.kind}):j.push({...e,ms:n})}j.sort((e,n)=>e.ms-n.ms);const D=i(g??null);let H,w,A=!0;0===j.length?(w=D??M??0,H=w-30*a,A=null!==D||null!==M):(H=j[0].ms,w=D??j[j.length-1].ms,w-H<a&&(w=H+a));const N=j.length>0?Math.max(0,Math.round((w-H)/a)):0,O=u??(N>0?C.duration(N):void 0),E=[j.length>0?C.started(t(j[0].ms,K)):void 0,O,x.length>0?C.reached(j.length,p.length):void 0],J=j.map(e=>{return{key:e.key,ms:e.ms,kind:e.kind,label:e.label,detail:e.detail,preview:e.preview,glyph:e.glyph,onClick:e.onClick,onOpen:e.onOpen,priority:(n=e.kind,"dfm"===n?1:0),caption:e.caption,provisional:e.provisional};var n}),L={};for(const e of j)e.phase&&(L[e.phase]=L[e.phase]||[]).push(e.ms);const S=Object.entries(L).filter(([,e])=>e.length>=2).map(([e,n])=>({key:e,label:k?.[e]??e,minMs:Math.min(...n),maxMs:Math.max(...n)})),V="rail"===v,X=A&&/* @__PURE__ */h("div",{className:"select-none",children:/* @__PURE__ */h(n,{axis:V?"spread":"compressed",labels:V?"none":"lanes",items:J,pending:x,phases:S,startMs:H,endMs:w,todayMs:M??void 0,edgeCaptions:f,highlightKeys:y,onHoverChange:b,ariaLabel:C.milestones(m)})});/* @__PURE__ */
|
|
2
|
+
return h("div",V?{className:"shrink-0","data-timeline-variant":"rail",children:X}:{className:"shrink-0",children:/* @__PURE__ */h(e,{icon:/* @__PURE__ */h(s,{}),heading:d??m,subject:c,meta:E,children:X})})}export{m as MilestoneTimeline};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{nextEnabledIndex as e}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as t,filterOptionItems as n,optionMatches as r,groupedRows as l,OptionCheck as o,OptionSublabel as a}from"./chunk-QSW26NAH.js";import{INPUT_BASE_ON as i,INPUT_BASE as s}from"./chunk-JFSYWEHD.js";import{Button_default as u}from"./chunk-UDD7GB4F.js";import{LoadingSpinner as c}from"./chunk-Q5MD3VY6.js";import{Tooltip as d}from"./chunk-2LXTJXWC.js";import{onOverlayOpen as h}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as p}from"./chunk-62LW225J.js";import{useDropdownPosition as m,MENU_MAX_HEIGHT as f}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as g}from"./chunk-D65T4H6J.js";import{GLASS_DIVIDER as b,glassStyle as v}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{useShellStrings as w}from"./chunk-
|
|
2
|
-
return S("button",{type:"button","aria-label":t,onMouseDown:t=>{t.preventDefault(),t.stopPropagation(),e()},className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity text-base leading-none",children:"×"})}function
|
|
3
|
-
return C("div",{ref:ye,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&(ye.current?.contains(t)||xe.current?.contains(t))||je.current||document.activeElement!==we.current&&De(!0)},children:[(
|
|
4
|
-
/* @__PURE__ */S("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */S("span",{ref:Ae,className:"whitespace-pre"})}),Ee&&/* @__PURE__ */S(
|
|
5
|
-
/* @__PURE__ */C("div",{ref:xe,onMouseDownCapture:()=>{je.current=!0,setTimeout(()=>{je.current=!1},0)},className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:p.popup,left:We?.left,right:We?.right,top:We?.top,bottom:We?.bottom,minWidth:We?.minWidth,width:We?.width,...re&&{maxWidth:We?.maxWidth},visibility:We?void 0:"hidden",...v()},children:[
|
|
1
|
+
import{nextEnabledIndex as e}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as t,filterOptionItems as n,optionMatches as r,groupedRows as l,OptionCheck as o,OptionSublabel as a}from"./chunk-QSW26NAH.js";import{INPUT_BASE_ON as i,INPUT_BASE as s}from"./chunk-JFSYWEHD.js";import{Button_default as u}from"./chunk-UDD7GB4F.js";import{LoadingSpinner as c}from"./chunk-Q5MD3VY6.js";import{Tooltip as d}from"./chunk-2LXTJXWC.js";import{onOverlayOpen as h}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as p}from"./chunk-62LW225J.js";import{useDropdownPosition as m,MENU_MAX_HEIGHT as f}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as g}from"./chunk-D65T4H6J.js";import{GLASS_DIVIDER as b,glassStyle as v}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{useShellStrings as w}from"./chunk-KKZZAK76.js";import{useState as x,useId as k,useRef as $,useMemo as j,useEffect as D}from"react";import{createPortal as N}from"react-dom";import{jsxs as C,jsx as S}from"react/jsx-runtime";function W(e,t){const n=e.length;if(0===n||t(e.join(", ")))return{shown:n,cut:!1};if(1===n)return{shown:1,cut:!0};let r=0;for(let l=1;l<n&&t(`${e.slice(0,l).join(", ")} +${n-l}`);l+=1)r=l;return{shown:r,cut:!1}}function F({onClear:e,ariaLabel:t}){/* @__PURE__ */
|
|
2
|
+
return S("button",{type:"button","aria-label":t,onMouseDown:t=>{t.preventDefault(),t.stopPropagation(),e()},className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity text-base leading-none",children:"×"})}function L(L){const{options:R,placeholder:T,emptyOptionLabel:E,className:M="",disabled:z,id:A,filter:J=!1,allowFreeText:O=!1,freeTextOption:U,onSearchChange:B,loading:H=!1,error:I,onRetry:K,rightAdornment:G,renderOption:Q,clearable:X=!0,"aria-label":P,"aria-labelledby":V,"aria-describedby":Y}=L,Z=!0===L.multiple,q=L.multiple?L.value:L.value?[L.value]:[],_=L.multiple?"":L.value,ee=e=>{L.multiple?L.onChange(e):L.onChange(e[0]??"")},te=q.length>0,ne=J&&te&&!z,re=Z||J,le=null!=U,oe=O||le,[ae,ie]=x(!1),[se,ue]=x(-1),ce=k(),de=A??`${ce}-input`,he=`${ce}-listbox`,pe=e=>`${ce}-opt-${e}`,[me,fe]=x(""),ge=w(),be=E??ge.select.none,ve=e=>{fe(e),ue(-1),B?.(e)},ye=$(null),we=$(null),xe=$(null),ke=$(null),$e=$(ae);$e.current=ae;const je=$(!1),De=e=>{$e.current&&($e.current=!1,e&&O&&!le&&Xe&&(Z?q.includes(Xe)||ee([...q,Xe]):Xe!==_&&ee([Xe])),ie(!1),ve(""))},Ne=(e,t)=>{if(!e.disabled){if(Z)return ee(q.includes(e.value)?q.filter(t=>t!==e.value):[...q,e.value]),void(e===Pe?ve(""):ue(t));ee([e.value]),De(!1)}},[Ce,Se]=x(null);g(()=>{if(!G||ae)return void Se(null);const e=ke.current?.offsetWidth??0;Se(e?e+(Ee?32:8)+6:null)});const We=m(we,ae,re?{popupRef:xe}:{matchTriggerWidth:!0}),Fe=j(()=>t(R),[R]),Le=q.join("\0"),Re=j(()=>{const e=[],t=/* @__PURE__ */new Set;for(const n of Fe)q.includes(n.value)&&!t.has(n.value)&&(t.add(n.value),e.push(n.label));if(oe)for(const n of q)t.has(n)||e.push(n);return e},[Fe,Le,oe]),Te=Re.join(", "),Ee=X&&te&&!z,[Me,ze]=x(null),Ae=$(null),Je=$(""),Oe=$(()=>{});Oe.current=()=>{const e=we.current,t=Ae.current;if(!Z||!e||!t)return;const n=getComputedStyle(e),r=e.clientWidth-(parseFloat(n.paddingLeft)||0)-(parseFloat(n.paddingRight)||0),l=[n.fontStyle,n.fontWeight,n.fontSize,n.fontFamily,n.letterSpacing].join("|"),o=`${r}|${l}|${Re.join("\0")}`;if(o===Je.current)return;Je.current=o;let a=null;r>0&&Re.length>0&&(t.style.fontStyle=n.fontStyle,t.style.fontWeight=n.fontWeight,t.style.fontSize=n.fontSize,t.style.fontFamily=n.fontFamily,t.style.letterSpacing=n.letterSpacing,a=W(Re,e=>(t.textContent=e,t.getBoundingClientRect().width<=r)),t.textContent=""),ze(e=>e?.shown===a?.shown&&e?.cut===a?.cut?e:a)},g(()=>{Oe.current()}),D(()=>{const e=we.current;if(!Z||!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Oe.current());return t.observe(e),()=>t.disconnect()},[Z]);const Ue=Re.length,Be=!Z||!Me||Me.shown>=Ue?Te:0===Me.shown?ge.select.selectedCount(Ue):`${Re.slice(0,Me.shown).join(", ")} +${Ue-Me.shown}`,He=Z&&null!==Me&&(Me.shown<Ue||Me.cut),Ie=ae&&te&&re;D(()=>{if(!ae)return;const e=e=>{const t=e.target;ye.current?.contains(t)||xe.current?.contains(t)||De(!0)};document.addEventListener("mousedown",e);const t=h(()=>De(!0));return()=>{document.removeEventListener("mousedown",e),t()}},[ae,O,me,Le,L.onChange]),D(()=>{if(ae)return y(e=>!("Escape"!==e.key||!$e.current)&&(De(!1),we.current?.blur(),!0),()=>xe.current)},[ae]);const Ke=j(()=>{const e=/* @__PURE__ */new Set;return n(R,t=>!e.has(t.value)&&(e.add(t.value),!0))},[R]),Ge=j(()=>{if(B)return Ke;const e=me.trim().toLowerCase();return e?n(Ke,t=>r(t,e)):Ke},[Ke,me,B]),Qe=j(()=>t(Ge),[Ge]),Xe=me.trim(),Pe=j(()=>le&&Xe?Fe.some(e=>e.label===Xe)||q.includes(Xe)?null:{value:Xe,label:Xe}:null,[le,Xe,Fe,Le]),Ve=j(()=>Pe?[...Qe,Pe]:Qe,[Qe,Pe]);/* @__PURE__ */
|
|
3
|
+
return C("div",{ref:ye,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&(ye.current?.contains(t)||xe.current?.contains(t))||je.current||document.activeElement!==we.current&&De(!0)},children:[(Ye=/* @__PURE__ */S("input",{id:de,ref:we,type:"text",autoComplete:"off",role:"combobox","aria-expanded":ae,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-controls":ae?he:void 0,"aria-activedescendant":ae&&se>=0&&se<Ve.length?pe(se):void 0,"aria-label":V?void 0:P,"aria-labelledby":V,"aria-describedby":Y,value:ae?me:Be,onChange:e=>{ve(e.target.value),ie(!0)},onFocus:()=>{z||(ve(""),ie(!0))},onKeyDown:t=>{if("ArrowDown"===t.key||"ArrowUp"===t.key){if(z)return;if(t.preventDefault(),!ae)return void ie(!0);if(0===Ve.length)return;const n="ArrowDown"===t.key?1:-1;return void ue(t=>e(Ve,t,n))}"Enter"===t.key?(t.preventDefault(),ae&&se>=0&&se<Ve.length?Ne(Ve[se],se):1!==Qe.length||Qe[0].disabled?O&&!le&&Xe&&(Z?(q.includes(Xe)||ee([...q,Xe]),ve("")):(ee([Xe]),De(!1),we.current?.blur())):Ne(Qe[0],0)):"Escape"===t.key?(De(!1),we.current?.blur()):"Tab"===t.key&&De(!0)},placeholder:Ie?Be:T||be,className:`${ne?i:s} ${M} ${Ee?"pr-8":""} ${z?"bg-gray-50 text-gray-400 cursor-not-allowed":""} truncate${Ie?" rosh-field-shows-choice":""}`,style:Ce?{paddingRight:Ce}:void 0,disabled:z}),Z?/* @__PURE__ */S(d,{content:!ae&&He?Te:null,className:"block",children:Ye}):Ye),Z&&
|
|
4
|
+
/* @__PURE__ */S("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */S("span",{ref:Ae,className:"whitespace-pre"})}),Ee&&/* @__PURE__ */S(F,{ariaLabel:ge.select.clear,onClear:()=>{ee([]),De(!1)}}),G&&!ae&&/* @__PURE__ */S("div",{ref:ke,className:`absolute top-1/2 -translate-y-1/2 ${Ee?"right-8":"right-2"} flex items-center gap-1 flex-nowrap justify-end pointer-events-none`,children:G}),ae&&N(
|
|
5
|
+
/* @__PURE__ */C("div",{ref:xe,onMouseDownCapture:()=>{je.current=!0,setTimeout(()=>{je.current=!1},0)},className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:p.popup,left:We?.left,right:We?.right,top:We?.top,bottom:We?.bottom,minWidth:We?.minWidth,width:We?.width,...re&&{maxWidth:We?.maxWidth},visibility:We?void 0:"hidden",...v()},children:[Z&&te&&X&&!z&&
|
|
6
6
|
/* @__PURE__ */S("button",{type:"button",tabIndex:-1,onMouseDown:e=>{e.preventDefault(),ee([])},className:`block w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm text-gray-600 hover:bg-gray-50 border-b ${b}`,children:ge.select.clearAll}),H?
|
|
7
7
|
/* @__PURE__ */S(c,{size:"sm",padding:"py-2",label:ge.search.searching}):I?/* @__PURE__ */C("div",{role:"alert",className:"flex items-center gap-2 px-3 py-2 text-sm text-red-600",children:[
|
|
8
|
-
/* @__PURE__ */S("span",{className:"min-w-0 flex-1",children:I}),
|
|
9
|
-
/* @__PURE__ */C("div",{id:he,role:
|
|
10
|
-
return C("button",{id:pe(t),type:"button",role:"option","aria-selected":n,"aria-disabled":e.disabled||void 0,tabIndex:-1,onMouseDown:n=>{(e.disabled||
|
|
11
|
-
/* @__PURE__ */S("span",{className:`min-w-0 ${re?"flex-auto":"flex-1"} truncate`,children:
|
|
12
|
-
/* @__PURE__ */S("button",{id:pe(
|
|
8
|
+
/* @__PURE__ */S("span",{className:"min-w-0 flex-1",children:I}),K&&/* @__PURE__ */S(u,{variant:"link",size:"sm",onMouseDown:e=>e.preventDefault(),onClick:K,className:"shrink-0",children:ge.list.retry})]}):null,
|
|
9
|
+
/* @__PURE__ */C("div",{id:he,role:Ve.length?"listbox":void 0,"aria-labelledby":Ve.length?V??(P?void 0:de):void 0,"aria-label":Ve.length&&!V?P:void 0,"aria-multiselectable":!(!Ve.length||!Z)||void 0,className:"overflow-y-auto",style:{maxHeight:We?.maxHeight??f},children:[0===Ve.length?H||I?null:/* @__PURE__ */S("p",{className:"px-3 py-3 text-sm text-gray-400 text-center",children:ge.select.noMatches}):0===Qe.length?null:l(Ge,(e,t)=>{const n=q.includes(e.value);/* @__PURE__ */
|
|
10
|
+
return C("button",{id:pe(t),type:"button",role:"option","aria-selected":n,"aria-disabled":e.disabled||void 0,tabIndex:-1,onMouseDown:n=>{(e.disabled||Z)&&n.preventDefault(),Ne(e,t)},className:"w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center justify-between gap-2 whitespace-nowrap "+(e.disabled?"cursor-not-allowed text-gray-400":`hover:bg-gray-50 ${n?"text-blue-600 font-medium":"text-gray-700"} ${t===se?"bg-gray-100":n?"bg-blue-50/50":""}`),children:[Z&&/* @__PURE__ */S(o,{selected:n}),
|
|
11
|
+
/* @__PURE__ */S("span",{className:`min-w-0 ${re?"flex-auto":"flex-1"} truncate`,children:Q?Q(e,{selected:n,active:t===se}):e.label}),e.sublabel&&/* @__PURE__ */S(a,{grows:re,children:e.sublabel})]},e.value)},ce),Pe&&U&&
|
|
12
|
+
/* @__PURE__ */S("button",{id:pe(Qe.length),type:"button",role:"option","aria-selected":!1,tabIndex:-1,onMouseDown:e=>{Z&&e.preventDefault(),Ne(Pe,Qe.length)},className:`w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 whitespace-nowrap text-gray-700 hover:bg-gray-50 ${Qe.length?`border-t ${b}`:""} ${se===Qe.length?"bg-gray-100":""}`,children:/* @__PURE__ */S("span",{className:"min-w-0 flex-1 truncate",children:U(Pe.value)})},`${ce}-typed`)]})]}),document.body)]});var Ye}export{L as SearchableSelect,W as fitChoice};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Card as e}from"./chunk-
|
|
1
|
+
import{Card as e}from"./chunk-47MFBFIX.js";import{Select_default as l}from"./chunk-Q75PSCZ5.js";import{Input_default as a}from"./chunk-UNEJ2ABD.js";import{FormField as r}from"./chunk-MVQBVPWP.js";import{Checkbox_default as i}from"./chunk-CGZBDI6C.js";import{Banner as c}from"./chunk-CQXKO5PB.js";import{Button_default as d}from"./chunk-UDD7GB4F.js";import{useState as s}from"react";import{jsx as n,jsxs as t}from"react/jsx-runtime";var h=[{name:"Mechanical keyboard",qty:1,price:129},{name:"USB-C cable (2m)",qty:2,price:12},{name:"Laptop stand",qty:1,price:48}];function m(){const[m,o]=s(!0),[p,u]=s("us"),y=h.reduce((e,l)=>e+l.qty*l.price,0),g=y+9;/* @__PURE__ */
|
|
2
2
|
return n("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */t("div",{className:"mx-auto max-w-5xl space-y-5",children:[
|
|
3
3
|
/* @__PURE__ */n("h1",{className:"text-xl font-semibold text-gray-900",children:"Checkout"}),
|
|
4
4
|
/* @__PURE__ */t("div",{className:"grid grid-cols-1 gap-5 lg:grid-cols-3",children:[
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Card as e}from"./chunk-
|
|
1
|
+
import{Card as e}from"./chunk-47MFBFIX.js";import{Radio_default as a}from"./chunk-NI5FXWK5.js";import{Select_default as l}from"./chunk-Q75PSCZ5.js";import{Input_default as r}from"./chunk-UNEJ2ABD.js";import{FormField as n}from"./chunk-MVQBVPWP.js";import{Checkbox_default as i}from"./chunk-CGZBDI6C.js";import{Textarea_default as c}from"./chunk-AWY3F6PV.js";import{Button_default as o}from"./chunk-UDD7GB4F.js";import{useState as t}from"react";import{jsx as m,jsxs as d}from"react/jsx-runtime";function s(){const[s,h]=t("pro"),[u,p]=t(!0),[f,g]=t("us");/* @__PURE__ */
|
|
2
2
|
return m("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */d("form",{className:"mx-auto max-w-2xl space-y-5",onSubmit:e=>e.preventDefault(),children:[
|
|
3
3
|
/* @__PURE__ */d("div",{children:[
|
|
4
4
|
/* @__PURE__ */m("h1",{className:"text-xl font-semibold text-gray-900",children:"Account settings"}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{InputNumber_default as e}from"./chunk-
|
|
1
|
+
import{InputNumber_default as e}from"./chunk-IH4SVMXJ.js";import{IconButton_default as a}from"./chunk-HMZLRXLA.js";import{Icon as r}from"./chunk-42BBJJDP.js";import{Tooltip as i}from"./chunk-2LXTJXWC.js";import{jsx as t,jsxs as n,Fragment as o}from"react/jsx-runtime";var d="h-3.5 w-3.5",s={padding:{top:/* @__PURE__ */t(r,{name:"padding-top","aria-hidden":"true",className:d}),right:/* @__PURE__ */t(r,{name:"padding-right","aria-hidden":"true",className:d}),bottom:/* @__PURE__ */t(r,{name:"padding-bottom","aria-hidden":"true",className:d}),left:/* @__PURE__ */t(r,{name:"padding-left","aria-hidden":"true",className:d}),vertical:/* @__PURE__ */t(r,{name:"padding-y","aria-hidden":"true",className:d}),horizontal:/* @__PURE__ */t(r,{name:"padding-left-right","aria-hidden":"true",className:d})},crop:{top:/* @__PURE__ */t(r,{name:"crop-top","aria-hidden":"true",className:d}),right:/* @__PURE__ */t(r,{name:"crop-right","aria-hidden":"true",className:d}),bottom:/* @__PURE__ */t(r,{name:"crop-bottom","aria-hidden":"true",className:d}),left:/* @__PURE__ */t(r,{name:"crop-left","aria-hidden":"true",className:d}),vertical:/* @__PURE__ */t(r,{name:"crop-y","aria-hidden":"true",className:d}),horizontal:/* @__PURE__ */t(r,{name:"crop-left-right","aria-hidden":"true",className:d})}},l=/* @__PURE__ */t(r,{name:"sides-each","aria-hidden":"true",className:"h-4 w-4"});var m=(e,a,r)=>null===e[r]?a[r]:String(e[r]);function c(e,a){const r=r=>m(e,a,r);return r("left")!==r("right")||r("top")!==r("bottom")}function h({label:a,value:r,onChange:i,each:d,placeholder:l,words:c,min:h=0,max:p=200,step:u=4,readOnly:g,glyphs:f="padding"}){const b=s[f],N=(a,n,o)=>{const d=function(e,a){const r=a.map(a=>e[a]);return r.every(e=>e===r[0])?r[0]:"mixed"}(r,a),s=a.map(e=>m(r,l,e)),f="mixed"!==d&&s.every(e=>e===s[0])?s[0]:"–";/* @__PURE__ */
|
|
2
2
|
return t("div",{"data-side":a.join("-"),className:"min-w-0",children:/* @__PURE__ */t(e,{value:"mixed"===d?null:d,onChange:e=>((e,a)=>{const t={...r};for(const r of e)t[r]=a;i(t)})(a,e),min:h,max:p,step:u,snap:!0,precision:0,steppers:"compact",readOnly:g,placeholder:f,prefix:o,suffix:c.unit,"aria-label":n})})};/* @__PURE__ */
|
|
3
3
|
return t("div",{role:"group","aria-label":a,"data-sides":d?"each":"pairs",className:"grid min-w-0 grid-cols-2 gap-2",children:/* @__PURE__ */n(o,d?{children:[N(["left"],c.sides.left,b.left),N(["top"],c.sides.top,b.top),N(["right"],c.sides.right,b.right),N(["bottom"],c.sides.bottom,b.bottom)]}:{children:[N(["left","right"],c.horizontal,b.horizontal),N(["top","bottom"],c.vertical,b.vertical)]})})}function p({each:e,onChange:r,label:n,disabled:o}){/* @__PURE__ */
|
|
4
4
|
return t(i,{content:n,children:/* @__PURE__ */t(a,{size:"sm","aria-label":n,"aria-pressed":e,disabled:o,onClick:()=>r(!e),children:l})})}export{p as SidesEachToggle,h as SidesInput,c as sidesStartEach};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{SearchableSelect as e}from"./chunk-
|
|
1
|
+
import{SearchableSelect as e}from"./chunk-NZ67C5OK.js";import{Select_default as a}from"./chunk-Q75PSCZ5.js";import{Input_default as l}from"./chunk-UNEJ2ABD.js";import{labelClasses as t}from"./chunk-EQKUFYX6.js";import{isSafeLinkHref as r}from"./chunk-PJPK2ADX.js";import{INPUT_SIZES as n}from"./chunk-JFSYWEHD.js";import{Button_default as i}from"./chunk-UDD7GB4F.js";import{Icon as o}from"./chunk-42BBJJDP.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as u}from"./chunk-KKZZAK76.js";import{useId as d,useRef as c,useState as p,useEffect as m}from"react";import{jsx as f,jsxs as v,Fragment as g}from"react/jsx-runtime";function h(e){return"select"===e.type?e.options:"groups"===e.type?e.groups.flatMap(e=>e.options):[]}var b="address",x={kindOf:()=>b,targetOf:e=>e,readFilter:()=>null,withFilter:e=>e},y=e=>r(e.trim());function k(r){const{value:n,kinds:o,rules:k=x,filtersFor:w,label:N,readOnly:C,placeholder:F,className:j=""}=r,O=void 0!==r.onApply,D=u().link,$=k.isSafe??y,E=d(),K=c(null),P=c(null),[z,A]=p({url:n}),U=O?z.url:n,[J,B]=p(!1),[S,W]=p(null),[Z,Q]=p(null),T=c(()=>{});T.current=O?r.onCancel:()=>{},m(()=>{if(O)return s(e=>{const a=K.current;return!!("Escape"===e.key&&a&&e.target instanceof Node&&a.contains(e.target))&&(T.current(),!0)},()=>K.current)},[O]),m(()=>{if(!O)return;const e=P.current;e?(e.focus(),e.select()):K.current?.querySelector("button, input")?.focus()},[]);const H=o??[{value:b,label:D.address,target:{type:"text"}}],L=S&&S.against===U?S.kind:k.kindOf(U),M=H.filter(e=>!e.hideWhenEmpty||h(e.target).length>0||e.value===L),R=M.find(e=>"text"===e.target.type),X=M.find(e=>e.value===L)??R??M[0];if(!X)return null;const Y="text"!==X.target.type,q=Y?k.targetOf(U):U,G=h(X.target),V=G.find(e=>e.value===q),I=e=>({value:e,label:D.unavailable(e)}),_="select"===X.target.type&&q&&w?w(q):null,ee=_?k.readFilter(U):null,ae=ee?_?.find(e=>e.param===ee.param):void 0,le=Z&&Z.against===U?Z.text:U,te=!Y&&""!==le.trim()&&!$(le),re=te&&(!O||J),ne=(e,a)=>{O?A({url:e,name:a}):void 0===a?r.onChange(e):r.onChange(e,a)},ie=(e,a)=>{W(a=>a?{...a,against:e}:a),ne(e,a)},oe=e=>{if(!e)return ie("");const a=G.find(a=>a.value===e);ie(e,a?.label)},se=Y?U:le.trim(),ue=()=>{if(!O||!se)return;if(!Y&&te)return void B(!0);const e=Y&&z.url===se?z.name:void 0,a=r.onApply;void 0===e?a(se):a(se,e)},de=(e,a)=>a&&!e.some(e=>e.value===a)?[I(a),...e]:[...e],ce=(l,t,r,n,i)=>{const o=[];for(const e of r){const a=o[o.length-1],l={value:e.value,label:e.label};e.group?a&&"options"in a&&a.label===e.group?a.options.push(l):o.push({label:e.group,options:[l]}):o.push(l)}if(i){const a=r.some(e=>""===e.value);/* @__PURE__ */
|
|
2
2
|
return f(e,{"aria-label":l,value:t,options:o,disabled:C,clearable:a,placeholder:r.find(e=>""===e.value)?.label,onChange:n})}/* @__PURE__ */
|
|
3
|
-
return f(a,{size:"sm","aria-label":l,value:t,options:o,readOnly:C,onChange:n})};let pe;if("text"===X.target.type)pe=/* @__PURE__ */f(l,{ref:
|
|
4
|
-
return f("div",{ref:
|
|
5
|
-
return v("div",{ref:
|
|
3
|
+
return f(a,{size:"sm","aria-label":l,value:t,options:o,readOnly:C,onChange:n})};let pe;if("text"===X.target.type)pe=/* @__PURE__ */f(l,{ref:P,id:`${E}-address`,size:"sm",type:"text",invalid:re,"aria-label":D.address,"aria-describedby":re?`${E}-why`:void 0,placeholder:F??D.addressPlaceholder,spellCheck:!1,autoComplete:"off",value:le,readOnly:C,onChange:e=>(e=>{B(!1);const a=e.trim();a?$(e)?(Q({text:e,against:a}),ie(a)):Q({text:e,against:U}):(Q({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,q)];pe=ce(X.label,q,a,oe,e.length>10)}const me=/* @__PURE__ */v(g,{children:[o&&ce(D.linkType,X.value,M.map(e=>({value:e.value,label:e.label})),e=>{Q(null),B(!1);const a=M.find(a=>a.value===e);if(!a||"text"===a.target.type)return void W({kind:e,against:U});const l=h(a.target)[0];W({kind:e,against:l?l.value:""}),l?ne(l.value,l.label):ne("")},!1),pe,_&&ce(D.filter,ee?.param??"",[{value:"",label:D.noFilter},...ee&&!ae?[I(ee.param)]:[],..._.map(e=>({value:e.param,label:e.label}))],e=>{if(!e)return ie(q,V?.label);const a=_?.find(a=>a.param===e),l=a?.values[0];l&&ie(k.withFilter(q,{param:e,value:l.value}),l.label)},!1),_&&ee&&ce(D.value,ee.value,de((ae?.values??[]).map(e=>({value:e.value,label:e.label})),ee.value),e=>{if(!ee)return;const a=ae?.values.find(a=>a.value===e);ie(k.withFilter(q,{param:ee.param,value:e}),a?.label)},(ae?.values.length??0)>10),re&&/* @__PURE__ */f("p",{id:`${E}-why`,role:"alert",className:"text-2xs leading-4 text-red-600",children:D.unsafe}),X.hint&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-gray-400",children:X.hint}),_&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-gray-400",children:D.filterHint})]});if(!O)/* @__PURE__ */
|
|
4
|
+
return f("div",{ref:K,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=r.onRemove;/* @__PURE__ */
|
|
5
|
+
return v("div",{ref:K,role:"dialog","aria-label":N??D.title,className:`flex min-w-0 flex-col gap-2 rounded-xl border border-gray-200 bg-white 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:[Y?/* @__PURE__ */f("span",{className:t({inline:!0}),children:D.title}):/* @__PURE__ */f("label",{htmlFor:`${E}-address`,className:t({inline:!0}),children:D.title}),me,
|
|
6
6
|
/* @__PURE__ */v("div",{className:"flex items-center justify-between gap-2",children:[fe?/* @__PURE__ */f(i,{variant:"ghost-danger",size:"sm","data-window-action":"remove",onClick:fe,children:D.remove}):null,
|
|
7
7
|
/* @__PURE__ */v("span",{className:"ml-auto flex gap-1",children:[
|
|
8
|
-
/* @__PURE__ */f(i,{variant:"secondary",size:"sm","data-window-action":"cancel",onClick:()=>
|
|
8
|
+
/* @__PURE__ */f(i,{variant:"secondary",size:"sm","data-window-action":"cancel",onClick:()=>T.current(),children:D.cancel}),
|
|
9
9
|
/* @__PURE__ */f(i,{variant:"primary",size:"sm","data-window-action":"apply",onClick:ue,disabled:C||""===se,children:D.apply})]})]})]})}function w({label:e,text:a,onTextChange:t,link:r,onLinkChange:i,kinds:s,rules:m,filtersFor:g,textPlaceholder:h,readOnly:b,className:x=""}){const y=u().link,[w,N]=p(!1),C=c(null),F=d(),j=()=>{N(!1),C.current?.focus()};/* @__PURE__ */
|
|
10
10
|
return v("div",{className:`flex min-w-0 flex-auto flex-col ${x}`.trim(),children:[
|
|
11
11
|
/* @__PURE__ */f(l,{size:"sm",type:"text",className:"rounded-b-none","aria-label":y.text(e),placeholder:h,value:a,readOnly:b,onChange:e=>t(e.target.value)}),
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{ChartTooltip as e}from"./chunk-P5BOTIJU.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{registerModalEscapeInterceptor as a}from"./chunk-TWVUQUUD.js";import{CHART_INK as s,resolveSeriesColorWithin as c}from"./chunk-TZFACUMR.js";import{useShellStrings as m,useShellLocale as h}from"./chunk-KKZZAK76.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:U=[4,22],className:S,emptyLabel:D}){const L=m().charts,P=h(),K=z??(e=>f(e,P)),O=$??(e=>f(e,P)),W=D??L.noObservations,Z=u(null),B=n(Z),C=v??B,E=p(),[I,T]=d(null);x(()=>{if(null!==I)return a(e=>"Escape"===e.key&&(T(null),!0))},[I]);const V=(e,t)=>!t||e>=Math.min(t[0],t[1])&&e<=Math.max(t[0],t[1]),F=b.map((e,t)=>({...e,slot:t})).filter(e=>e.points.length>0),J=j||w?F.map(e=>({...e,points:e.points.filter(e=>V(e.x,j)&&V(e.y,w))})).filter(e=>e.points.length>0):F,Q=F.reduce((e,t)=>e+t.points.length,0)-J.reduce((e,t)=>e+t.points.length,0);if(0===J.length)/* @__PURE__ */
|
|
2
|
+
return y("div",{className:S,ref:Z,children:/* @__PURE__ */y("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:k},children:W})});const X=J.flatMap(e=>e.points),H=X.some(e=>null!=e.size),Y=14,q=20,G=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(X.map(e=>e.y),w,R,{from:k-G,to:Y}),ie=t(te.ticks(5).map(O),_),le=Math.max(ie+1,C-q),re=ee(X.map(e=>e.x),j,N,{from:ie,to:le}),oe=i([0,Math.max(...X.map(e=>e.size??1))],{from:U[0],to:U[1]}),ne=I?J[I.s]:void 0,ae=I&&ne?ne.points[I.i]:void 0,se=J.flatMap((e,t)=>e.points.map((e,i)=>({s:t,i:i})));/* @__PURE__ */
|
|
3
|
+
return g("div",{className:`relative ${S??""}`,ref:Z,children:[
|
|
4
|
+
/* @__PURE__ */g("svg",{width:"100%",height:k,viewBox:`0 0 ${C} ${k}`,role:"img","aria-label":L.scatter(J.map(e=>e.label),A??L.yAxis,M??L.xAxis)+(Q>0?`. ${L.outsideRange(Q)}`:""),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>T(null),onBlur:()=>T(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;T(se[Math.min(se.length-1,Math.max(0,i+t))])},children:[
|
|
5
|
+
/* @__PURE__ */y("defs",{children:/* @__PURE__ */y("clipPath",{id:E,children:/* @__PURE__ */y("rect",{x:ie-U[1],y:Y-U[1],width:le-ie+2*U[1],height:k-G-Y+2*U[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:s.grid,strokeWidth:1,shapeRendering:"crispEdges"}),
|
|
7
|
+
/* @__PURE__ */y("text",{x:ie-8,y:te(e)+4,textAnchor:"end",fontSize:11,fill:s.label,style:{fontVariantNumeric:"tabular-nums"},children:O(e)})]},`y${e}`)),re.ticks(5).map(e=>/* @__PURE__ */y("text",{x:re(e),y:k-12,textAnchor:"middle",fontSize:11,fill:s.label,style:{fontVariantNumeric:"tabular-nums"},children:K(e)},`x${e}`)),M&&/* @__PURE__ */y("text",{x:(ie+le)/2,y:k-.5,textAnchor:"middle",fontSize:11,fill:s.label,children:M}),A&&/* @__PURE__ */y("text",{x:12,y:k/2,transform:`rotate(-90 12 ${k/2})`,textAnchor:"middle",fontSize:11,fill:s.label,children:A}),
|
|
8
|
+
/* @__PURE__ */y("g",{clipPath:`url(#${E})`,children:J.map((e,t)=>{const i=c(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):U[0]+1,fill:i,fillOpacity:I&&I.s!==t?.25:.62,stroke:s.surface,strokeWidth:2,onMouseEnter:()=>T({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(e,{title:ae.label??ne.label,rows:[{key:"x",label:M??L.xAxis,color:c(ne.slot,3,ne.color,ne.tone),value:K(ae.x)},{key:"y",label:A??L.yAxis,color:c(ne.slot,3,ne.color,ne.tone),value:O(ae.y)},...null!=ae.size?[{key:"size",label:L.size,color:s.muted,value:f(ae.size,P)}]:[]],footnote:ae.label?ne.label:void 0})})]})}export{b as SCATTER_SERIES_CAP,k as ScatterChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-42BBJJDP.js";import{useShellStrings as r}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-42BBJJDP.js";import{useShellStrings as r}from"./chunk-KKZZAK76.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";var s={success:"success",error:"error",warning:"warning",info:"info",404:"info",403:"warning",500:"error"},c={success:"text-green-600 bg-green-100",error:"text-red-600 bg-red-100",warning:"text-amber-600 bg-amber-100",info:"text-blue-600 bg-blue-100"},a={404:e=>e.notFound,403:e=>e.noAccess,500:e=>e.serverError};function i({tone:r}){const t={className:"h-6 w-6",strokeWidth:1.5,"aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
|
|
2
2
|
return n(e,{name:"check",...t});case"error":/* @__PURE__ */
|
|
3
3
|
return n(e,{name:"close",...t});case"warning":/* @__PURE__ */
|
|
4
4
|
return n(e,{name:"error",...t});default:/* @__PURE__ */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ShellStringsProvider as t}from"./chunk-
|
|
1
|
+
import{ShellStringsProvider as t}from"./chunk-KKZZAK76.js";import{createContext as e,useEffect as a,useCallback as n,useMemo as r,useContext as l}from"react";import{jsx as o}from"react/jsx-runtime";var g={tag:"en",name:"English",locale:null},c="react-os-shell:language",u=t=>"string"==typeof t?t:t.tag;function i(t){try{const e=new Intl.Locale(t).maximize();return{language:e.language,script:e.script}}catch{return null}}function s(t,e){const a=e.map(u),n=t.toLowerCase(),r=a.find(t=>t.toLowerCase()===n);if(r)return r;const l=i(t);if(!l)return;const o=a.map(t=>({tag:t,parts:i(t)})).filter(t=>t.parts?.language===l.language);return(o.find(t=>t.parts?.script===l.script)??o[0])?.tag}function f(){try{return globalThis.localStorage?.getItem(c)??null}catch{return null}}function m(t){try{return globalThis.localStorage?.setItem(c,t),globalThis.localStorage?.getItem(c)===t}catch{return!1}}function h({offered:t,fallback:e,saved:a=f(),preferred:n=globalThis.navigator?.languages??[]}){const r=e??(t.length>0?u(t[0]):g.tag);if(a){const e=s(a,t);if(e)return e}for(const e of n){const a=s(e,t);if(a)return a}return r}var d=e({language:g.tag,languages:[g],setLanguage:async()=>{}}),p=()=>globalThis.location?.reload();function b({languages:e,language:l,strings:g,onChange:c,reload:u=p,children:i}){const s=e.find(t=>t.tag===l),f=s?void 0===s.locale?s.tag:s.locale??void 0:void 0;a(()=>{const t=globalThis.document?.documentElement;if(!t)return;const e=t.getAttribute("lang");return t.setAttribute("lang",l),()=>{null===e?t.removeAttribute("lang"):t.setAttribute("lang",e)}},[l]);const h=n(async t=>{if(t!==l&&e.some(e=>e.tag===t)){m(t);try{await(c?.(t))}catch{}u&&u()}},[l,e,c,u]),b=r(()=>({language:l,languages:e,setLanguage:h}),[l,e,h]);/* @__PURE__ */
|
|
2
2
|
return o(d.Provider,{value:b,children:/* @__PURE__ */o(t,{value:g,locale:f,children:i})})}function v(){return l(d)}export{g as ENGLISH,c as SHELL_LANGUAGE_STORAGE_KEY,b as ShellLanguageProvider,s as matchShellLanguage,f as readSavedShellLanguage,h as resolveShellLanguage,m as saveShellLanguage,v as useShellLanguage};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import{parseHexColor as e,hexToHsv as r,hsvToHex as a,hexReadout as n,HUE_GRADIENT as o,HEX_MAX_LENGTH as t,svFromPoint as l,hueFromPoint as i}from"./chunk-H245LLX4.js";import{Popover as s}from"./chunk-RNBM5JZI.js";import{InputNumber_default as c}from"./chunk-
|
|
2
|
-
return w("button",{ref:l,type:o,"aria-pressed":a,className:$({size:r,selected:a,className:n}),...t,children:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"absolute inset-0",style:N(e)})})}),D=(e,r,a)=>Math.min(a,Math.max(r,e)),I=e=>"string"==typeof e?{value:e}:e;function
|
|
1
|
+
import{parseHexColor as e,hexToHsv as r,hsvToHex as a,hexReadout as n,HUE_GRADIENT as o,HEX_MAX_LENGTH as t,svFromPoint as l,hueFromPoint as i}from"./chunk-H245LLX4.js";import{Popover as s}from"./chunk-RNBM5JZI.js";import{InputNumber_default as c}from"./chunk-IH4SVMXJ.js";import{InSettingRowContext as u}from"./chunk-E4Z5OXBI.js";import{inputClasses as d}from"./chunk-JFSYWEHD.js";import{Tooltip as h}from"./chunk-2LXTJXWC.js";import{useShellStrings as g}from"./chunk-KKZZAK76.js";import{forwardRef as p,useState as b,useRef as m,useEffect as f,useId as v}from"react";import{jsx as w,jsxs as x}from"react/jsx-runtime";var y={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},k={backgroundImage:"conic-gradient(var(--line-strong) 25%, var(--surface) 0 50%, var(--line-strong) 0 75%, var(--surface) 0)",backgroundSize:"8px 8px"};function C(e){return null==e||Number.isNaN(e)?100:Math.round(Math.min(100,Math.max(0,e)))}function N(e,r){if(!e)return k;const a=C(r);if(a>=100)return{background:e};const n=`color-mix(in srgb, ${e} ${a}%, transparent)`;return{backgroundImage:`linear-gradient(${n}, ${n}), ${k.backgroundImage}`,backgroundSize:`auto, ${k.backgroundSize}`}}function $({size:e="md",selected:r=!1,className:a=""}={}){return["relative inline-flex shrink-0 overflow-hidden rounded-md p-0 transition-shadow","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]","disabled:cursor-not-allowed disabled:opacity-60",r?"border-2 border-blue-500":"border border-gray-300 hover:shadow-sm",y[e],a].filter(Boolean).join(" ")}var z=p(function({color:e,size:r="md",selected:a,className:n,type:o="button",...t},l){/* @__PURE__ */
|
|
2
|
+
return w("button",{ref:l,type:o,"aria-pressed":a,className:$({size:r,selected:a,className:n}),...t,children:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"absolute inset-0",style:N(e)})})}),D=(e,r,a)=>Math.min(a,Math.max(r,e)),I=e=>"string"==typeof e?{value:e}:e;function M(e,r,a){const n=a?.1:.01,o={ArrowLeft:[-n,0],ArrowRight:[n,0],ArrowDown:[0,-n],ArrowUp:[0,n]}[r];return o?{...e,s:D(e.s+o[0],0,1),v:D(e.v+o[1],0,1)}:null}function A(e,r,a){const n=a?10:1;switch(r){case"ArrowLeft":case"ArrowDown":return D(e-n,0,359);case"ArrowRight":case"ArrowUp":return D(e+n,0,359);case"PageDown":return D(e-10,0,359);case"PageUp":return D(e+10,0,359);case"Home":return 0;case"End":return 359;default:return null}}var P={boxShadow:"0 0 0 2px white, 0 0 0 3px color-mix(in srgb, black 35%, transparent)"};function j(e,r,a){const n=a?10:1;switch(r){case"ArrowLeft":case"ArrowDown":return D(e-n,0,100);case"ArrowRight":case"ArrowUp":return D(e+n,0,100);case"PageDown":return D(e-10,0,100);case"PageUp":return D(e+10,0,100);case"Home":return 0;case"End":return 100;default:return null}}function K({value:t,onChange:s,label:c,presets:d,clearable:p=!1,fallback:v,dragWrites:y="live",disabled:$=!1,opacity:D,onOpacityChange:K,onClose:S,id:T,className:L=""}){const R=g().color,E=C(D),H=e=>{const r=C(e);$||r===E||K?.(r)},O=e=>{const r=e.currentTarget.getBoundingClientRect();return r.width>0?(e.clientX-r.left)/r.width*100:E},U=e(v??""),[W,J]=b(()=>r(t||U||"")),Z=m(t);f(()=>{t!==Z.current&&(Z.current=t,t?J(r(t)):U&&J(r(U)))},[t]);const q=e=>{$||e===t||(Z.current=e,s(e))},F=a=>{const n=e(a);n&&(J(r(n)),q(n))},V=e=>{J(e),q(a(e))},[Y,G]=b(!1),Q=m(W);Q.current=W;const _=e=>({onPointerDown:r=>{if($||0!==r.button)return;r.currentTarget.setPointerCapture?.(r.pointerId),r.currentTarget.focus({preventScroll:!0});const a=e(r,Q.current);"end"===y?(G(!0),J(a)):V(a)},onPointerMove:r=>{if($||!(1&r.buttons))return;const a=e(r,Q.current);"end"===y?J(a):V(a)},onPointerUp:r=>{"end"===y&&Y&&(G(!1),V(e(r,Q.current)))}}),ee=_((e,r)=>({...r,...l(e.clientX,e.clientY,e.currentTarget.getBoundingClientRect())})),re=_((e,r)=>({...r,h:i(e.clientX,e.currentTarget.getBoundingClientRect())})),ae=Y?a(W):t,ne=e=>`${Math.round(100*e)}%`,oe=(d??[]).map(I),te=e(t),le=ae||U||"";
|
|
3
3
|
/* @__PURE__ */
|
|
4
|
-
return w(u.Provider,{value:!1,children:/* @__PURE__ */x("div",{id:
|
|
5
|
-
return w(h,{content:o,children:/* @__PURE__ */w(z,{color:a??r.value,size:"sm","aria-label":o,selected:null!==a&&a===te,disabled:$,onClick:()=>
|
|
6
|
-
/* @__PURE__ */w("div",{role:"slider",tabIndex:$?-1:0,"aria-label":
|
|
7
|
-
/* @__PURE__ */w("div",{role:"slider",tabIndex:$?-1:0,"aria-label":
|
|
4
|
+
return w(u.Provider,{value:!1,children:/* @__PURE__ */x("div",{id:T,className:`flex w-56 flex-col gap-3 ${$?"opacity-60":""} ${L}`.trim(),onKeyDown:e=>{"Escape"===e.key&&S&&(e.preventDefault(),e.stopPropagation(),S())},children:[(oe.length>0||p)&&/* @__PURE__ */x("div",{role:"group","aria-label":R.presets,className:"flex flex-wrap gap-2",children:[p&&/* @__PURE__ */w(h,{content:R.clear,children:/* @__PURE__ */w(z,{color:"",size:"sm","aria-label":R.clear,selected:""===t,disabled:$,onClick:()=>{$||""===t||(Z.current="",s(""))}})}),oe.map(r=>{const a=e(r.value),o=r.label?`${r.label} · ${n(a??r.value)}`:n(a??r.value);/* @__PURE__ */
|
|
5
|
+
return w(h,{content:o,children:/* @__PURE__ */w(z,{color:a??r.value,size:"sm","aria-label":o,selected:null!==a&&a===te,disabled:$,onClick:()=>F(r.value)})},`${r.label??""}:${r.value}`)})]}),
|
|
6
|
+
/* @__PURE__ */w("div",{role:"slider",tabIndex:$?-1:0,"aria-label":R.square,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(100*W.v),"aria-valuetext":R.squareValue(Math.round(100*W.s),Math.round(100*W.v)),"aria-disabled":$||void 0,"data-color-square":"",onKeyDown:e=>{if($)return;const r=M(W,e.key,e.shiftKey);r&&(e.preventDefault(),V(r))},...ee,className:"relative h-36 w-full cursor-crosshair touch-none rounded-md rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundColor:a({h:W.h,s:1,v:1}),backgroundImage:"linear-gradient(to top, black, transparent), linear-gradient(to right, white, transparent)"},children:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"pointer-events-none absolute h-3 w-3 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:ne(W.s),top:ne(1-W.v),...P}})}),
|
|
7
|
+
/* @__PURE__ */w("div",{role:"slider",tabIndex:$?-1:0,"aria-label":R.hue,"aria-valuemin":0,"aria-valuemax":359,"aria-valuenow":Math.round(W.h),"aria-orientation":"horizontal","aria-disabled":$||void 0,"data-color-hue":"",onKeyDown:e=>{if($)return;const r=A(W.h,e.key,e.shiftKey);null!==r&&(e.preventDefault(),V({...W,h:r}))},...re,className:"relative h-3 w-full cursor-pointer touch-none rounded-full rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundImage:o},children:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 h-3.5 w-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:W.h/360*100+"%",background:a({h:W.h,s:1,v:1}),...P}})}),K&&/* @__PURE__ */w("div",{role:"slider",tabIndex:$?-1:0,"aria-label":R.opacity(c),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":E,"aria-valuetext":`${E}%`,"aria-orientation":"horizontal","aria-disabled":$||void 0,"data-color-opacity":"",onKeyDown:e=>{if($)return;const r=j(E,e.key,e.shiftKey);null!==r&&(e.preventDefault(),H(r))},onPointerDown:e=>{$||0!==e.button||(e.currentTarget.setPointerCapture?.(e.pointerId),e.currentTarget.focus({preventScroll:!0}),H(O(e)))},onPointerMove:e=>{!$&&1&e.buttons&&H(O(e))},className:"relative h-3 w-full cursor-pointer touch-none rounded-full rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundImage:`linear-gradient(to right, transparent, ${le||"black"}), ${k.backgroundImage}`,backgroundSize:`auto, ${k.backgroundSize}`},children:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 h-3.5 w-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:`${E}%`,...N(le||"black",E),...P}})}),
|
|
8
8
|
/* @__PURE__ */x("div",{className:"flex items-center gap-2",children:[
|
|
9
|
-
/* @__PURE__ */w("span",{"aria-hidden":"true",className:"relative h-8 w-8 shrink-0 overflow-hidden rounded-md border border-gray-300",style:N(le,
|
|
10
|
-
/* @__PURE__ */w(
|
|
11
|
-
return w("input",{id:s,type:"text",value:g??(r?n(r):""),"aria-label":o,placeholder:l,maxLength:t,spellCheck:!1,autoComplete:"off",disabled:i,onChange:n=>{p(n.target.value);const o=e(n.target.value);null!==o&&o!==r&&a(o)},onFocus:e=>e.currentTarget.select(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),p(null))},onBlur:()=>p(null),"data-hex-look":u,className:m})}function
|
|
12
|
-
return w("div",{"data-color-opacity-box":"",className:"w-20 shrink-0",children:/* @__PURE__ */w(c,{value:e,onChange:e=>{null!==e&&r(e)},min:0,max:100,precision:0,suffix:"%",size:o,"aria-label":a,disabled:n})})}function
|
|
9
|
+
/* @__PURE__ */w("span",{"aria-hidden":"true",className:"relative h-8 w-8 shrink-0 overflow-hidden rounded-md border border-gray-300",style:N(le,K?E:null)}),
|
|
10
|
+
/* @__PURE__ */w(X,{value:ae,placeholder:!t&&U?n(U):void 0,onChange:F,label:R.hex(c),disabled:$}),K&&/* @__PURE__ */w(B,{value:E,onChange:H,label:R.opacity(c),disabled:$})]})]})})}var S={sm:"w-[calc(7ch+1rem+4px)] min-w-[calc(7ch+1rem+4px)]",md:"w-[calc(7ch+1.5rem+4px)] min-w-[calc(7ch+1.5rem+4px)]",lg:"w-[calc(7ch+2rem+4px)] min-w-[calc(7ch+2rem+4px)]"},T={sm:"h-6",md:"h-8",lg:"h-10"},L=["block w-[calc(7ch+0.5rem+4px)] min-w-[calc(7ch+0.5rem+4px)] flex-none rounded-(--radius-control)","border border-transparent bg-transparent px-1 text-2xs font-mono uppercase","text-gray-800 placeholder:text-gray-400 hover:border-gray-300","focus:border-blue-400 focus:bg-(--surface) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)]","disabled:cursor-not-allowed disabled:opacity-60"].join(" ");function X({value:r,onChange:a,label:o,placeholder:l,disabled:i,id:s,size:c="md",look:u="box",className:h=""}){const[g,p]=b(null),m="text"===u?`${L} ${T[c]} ${h}`.trim():d({size:c,className:`${S[c]} flex-1 font-mono uppercase ${h}`.trim()}).replace(/(^| )w-full( |$)/," ");/* @__PURE__ */
|
|
11
|
+
return w("input",{id:s,type:"text",value:g??(r?n(r):""),"aria-label":o,placeholder:l,maxLength:t,spellCheck:!1,autoComplete:"off",disabled:i,onChange:n=>{p(n.target.value);const o=e(n.target.value);null!==o&&o!==r&&a(o)},onFocus:e=>e.currentTarget.select(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),p(null))},onBlur:()=>p(null),"data-hex-look":u,className:m})}function B({value:e,onChange:r,label:a,disabled:n,size:o="md"}){/* @__PURE__ */
|
|
12
|
+
return w("div",{"data-color-opacity-box":"",className:"w-20 shrink-0",children:/* @__PURE__ */w(c,{value:e,onChange:e=>{null!==e&&r(e)},min:0,max:100,precision:0,suffix:"%",size:o,"aria-label":a,disabled:n})})}function R({value:r,onChange:a,label:o,presets:t,clearable:l,fallback:i,dragWrites:c,disabled:u,id:d,showHexInput:h=!1,opacity:p,onOpacityChange:b,size:m="md",align:f="start",open:y,onOpenChange:k,className:z=""}){const D=g().color,I=C(p),M=v(),A=e(i??""),P=r||A||"",j=r?n(r):A?n(A):D.none;
|
|
13
13
|
/* @__PURE__ */
|
|
14
14
|
return x("div",{className:`inline-flex items-center ${b?"flex-wrap justify-end gap-1":h?"gap-1":"gap-2"} ${z}`.trim(),children:[
|
|
15
|
-
/* @__PURE__ */w(s,{id:d,trigger:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"absolute inset-0",style:N(P,b?I:null)}),triggerLabel:D.swatch(o,j),triggerClassName:$({size:m}),"aria-label":D.panel(o),align:f,open:y,onOpenChange:k,disabled:u,children:/* @__PURE__ */w(
|
|
16
|
-
/* @__PURE__ */w(
|
|
15
|
+
/* @__PURE__ */w(s,{id:d,trigger:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"absolute inset-0",style:N(P,b?I:null)}),triggerLabel:D.swatch(o,j),triggerClassName:$({size:m}),"aria-label":D.panel(o),align:f,open:y,onOpenChange:k,disabled:u,children:/* @__PURE__ */w(K,{id:M,value:r,onChange:a,label:o,presets:t,clearable:l,fallback:i,dragWrites:c,disabled:u,opacity:p,onOpacityChange:b})}),h&&
|
|
16
|
+
/* @__PURE__ */w(X,{value:r,placeholder:!r&&A?n(A):void 0,onChange:e=>{u||e===r||a(e)},label:D.hex(o),disabled:u,size:m,look:"text"}),b&&/* @__PURE__ */w(B,{value:I,onChange:e=>{u||e===I||b(e)},label:D.opacity(o),disabled:u,size:m})]})}export{R as ColorPicker,K as ColorPickerPanel,z as ColorSwatch,X as HexInput,k as NO_COLOR_FILL,C as clampOpacity,N as colorFill,$ as colorSwatchClasses,A as stepHue,j as stepOpacity,M as stepSquare};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{firstEnabledIndex as e,matchTypeahead as t,lastEnabledIndex as r,nextEnabledIndex as n}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as i,groupedRows as a,isOptionGroup as l,OptionCheck as o}from"./chunk-QSW26NAH.js";import{useSettingAuto as d}from"./chunk-E4Z5OXBI.js";import{inputClasses as s,PLACEHOLDER_INK as c}from"./chunk-JFSYWEHD.js";import{useIsMobile as u}from"./chunk-UGTRSRIW.js";import{optionNoteClass as p}from"./chunk-QR4RM7PO.js";import{Icon as m}from"./chunk-42BBJJDP.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{solidSurfaceStyle as g}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{useShellStrings as x}from"./chunk-
|
|
2
|
-
/* @__PURE__ */I(
|
|
3
|
-
/* @__PURE__ */I("span",{id:
|
|
4
|
-
return I(O,{children:e.map((e,r)=>(e=>l(e))(e)?/* @__PURE__ */I("optgroup",{label:e.label,children:e.options.map(t)},`group-${r}`):t(e))})}var
|
|
1
|
+
import{firstEnabledIndex as e,matchTypeahead as t,lastEnabledIndex as r,nextEnabledIndex as n}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as i,groupedRows as a,isOptionGroup as l,OptionCheck as o}from"./chunk-QSW26NAH.js";import{useSettingAuto as d}from"./chunk-E4Z5OXBI.js";import{inputClasses as s,PLACEHOLDER_INK as c}from"./chunk-JFSYWEHD.js";import{useIsMobile as u}from"./chunk-UGTRSRIW.js";import{optionNoteClass as p}from"./chunk-QR4RM7PO.js";import{Icon as m}from"./chunk-42BBJJDP.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{solidSurfaceStyle as g}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{useShellStrings as x}from"./chunk-KKZZAK76.js";import{forwardRef as w,useId as k,useState as N,useRef as $,useMemo as D,useCallback as j,useEffect as E,useLayoutEffect as S}from"react";import{createPortal as T}from"react-dom";import{jsxs as H,jsx as I,Fragment as O}from"react/jsx-runtime";var C=w(function({value:e,onChange:t,options:r,placeholder:n,invalid:i,className:a="",size:l,touchSize:o,renderOption:c,renderValue:u,valueText:p,readOnly:m,footer:v,changed:h,auto:f,multiple:b,"aria-describedby":g,...y},w){const N=t,$=x(),D=d(),j=f??D,E=k(),S=/* @__PURE__ */H("select",{ref:w,value:e,multiple:b||void 0,onChange:e=>N(b?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),"aria-invalid":i||void 0,"aria-describedby":[g,j?E:void 0].filter(Boolean).join(" ")||void 0,className:s({invalid:i,size:l,auto:j,className:`pr-8 ${a}`.trim()}),...y,children:[void 0!==n&&!b&&/* @__PURE__ */I("option",{value:"",disabled:!0,children:n}),
|
|
2
|
+
/* @__PURE__ */I(z,{items:r})]});return j?/* @__PURE__ */H(O,{children:[S,
|
|
3
|
+
/* @__PURE__ */I("span",{id:E,hidden:!0,children:$.settingView.auto})]}):S});function z({items:e}){const t=e=>/* @__PURE__ */I("option",{value:e.value,disabled:e.disabled,lang:e.lang,children:e.label},e.value);/* @__PURE__ */
|
|
4
|
+
return I(O,{children:e.map((e,r)=>(e=>l(e))(e)?/* @__PURE__ */I("optgroup",{label:e.label,children:e.options.map(t)},`group-${r}`):t(e))})}var B=w(function({value:l,onChange:u,options:w,placeholder:C,invalid:B,className:K="",id:R,disabled:A,size:W,touchSize:P,title:U,multiple:V,renderOption:F,renderValue:J,valueText:L,readOnly:M=!1,footer:G,changed:Q=!1,auto:Z,"aria-describedby":q,"aria-label":X,"aria-labelledby":Y,..._},ee){const[te,re]=N(!1),[ne,ie]=N(-1),ae=$(null),le=$(null),oe=$(null),de=$(null),se=$([]),ce=()=>de.current??oe.current,ue=!!G?.length,pe="sm"===W,me=pe?"min-h-7 px-3 py-1 text-xs leading-4":"min-h-(--row-height-menu) px-3 py-2 text-sm leading-5",ve=p(pe),[he,fe]=N(null),be=x(),ge=$(te);ge.current=te;const ye=$({buffer:"",timer:null}),xe=k(),we=`${xe}-listbox`,ke=R??`${xe}-trigger`,Ne=e=>`${xe}-opt-${e}`,$e=`${xe}-changed`,De=d(),je=Z??De,Ee=`${xe}-auto`,Se=[q,Q?$e:void 0,je?Ee:void 0].filter(Boolean).join(" ")||void 0,Te=D(()=>i(w),[w]),He=V?l:[],Ie=u,Oe=f(le,te,{matchTriggerWidth:!0,...G?.length?{preferredMaxHeight:Number.POSITIVE_INFINITY}:{}}),Ce="undefined"==typeof window?E:S,ze=`${te}|${Oe?.top}|${Oe?.bottom}|${Oe?.maxHeight}|${w.length}`;Ce(()=>{fe(null)},[ze]),Ce(()=>{const e=oe.current;if(!te||!e||null!==he)return;if(e.scrollHeight<=e.clientHeight+1)return;const t=getComputedStyle(e),r=parseFloat(t.paddingTop)||0;parseFloat(t.paddingBottom);const n=e.getBoundingClientRect().top;let i=0;for(const t of e.querySelectorAll('[role="option"]')){const r=t.getBoundingClientRect().bottom-n+e.scrollTop;if(!(r<=e.clientHeight+.5))break;i=r}i>r&&fe(Math.floor(i))},[te,he,ze]);const Be=V?Te.findIndex(e=>He.includes(e.value)):Te.findIndex(e=>e.value===l),Ke=V?Te.filter(e=>He.includes(e.value)).map(e=>e.label).join(", ")||void 0:Be>=0?Te[Be].label:void 0,Re=!V&&Be>=0?Te[Be].lang:void 0,Ae=V?Te.filter(e=>He.includes(e.value)):Be>=0?[Te[Be]]:[],We=J&&Ae.length?J(Ae):void 0,Pe=void 0!==We&&L?L(Ae):void 0,Ue=j((e=!0)=>{re(!1),ie(-1),e&&le.current?.focus()},[]),Ve=j(()=>{A||M||(ie(Be>=0?Be:e(Te)),re(!0))},[A,M,Te,Be]),Fe=j(e=>{const t=Te[e];if(t&&!t.disabled){if(V){const r=l;return Ie(r.includes(t.value)?r.filter(e=>e!==t.value):[...r,t.value]),void ie(e)}Ie(t.value),Ue()}},[Te,V,l,Ie,Ue]);E(()=>{if(!te)return;return y(e=>!("Escape"!==e.key||!ge.current)&&(Ue(),!0),ce)},[te,Ue]),E(()=>{if(!te)return;const e=e=>{const t=e.target;ae.current?.contains(t)||ce()?.contains(t)||Ue(!1)};document.addEventListener("pointerdown",e);const t=v(()=>Ue(!1));return()=>{document.removeEventListener("pointerdown",e),t()}},[te,Ue]),E(()=>{!te||ne<0||oe.current?.querySelector(`#${CSS.escape(Ne(ne))}`)?.scrollIntoView({block:"nearest"})},[te,ne]);const Je=j(e=>{const r=ye.current;r.timer&&clearTimeout(r.timer),r.buffer+=e,r.timer=setTimeout(()=>{r.buffer="",r.timer=null},500);const n=te?ne:Be,i=t(Te,r.buffer,n);i<0||(te?ie(i):V?(ie(i),re(!0)):Fe(i))},[te,ne,Be,Te,Fe,V]),Le=te?a(w,(e,t)=>{const r=(n=e.value,V?He.includes(n):l===n);var n;const i=t===ne;/* @__PURE__ */
|
|
5
5
|
return H("div",{id:Ne(t),role:"option",lang:e.description||F?void 0:e.lang,"aria-selected":r,"aria-disabled":e.disabled||void 0,onPointerEnter:()=>{e.disabled||ie(t)},onClick:()=>Fe(t),className:`mx-1 cursor-pointer truncate rounded-lg ${me}${V?" flex items-center gap-2":""}\n ${e.disabled?"cursor-not-allowed text-gray-400":i?"bg-blue-50 text-blue-700":r?"font-medium text-blue-600":"text-gray-700"}`,children:[V&&/* @__PURE__ */I(o,{selected:r}),F?/* @__PURE__ */I("span",{className:"block min-w-0 flex-1 truncate",children:F(e,{selected:r,active:i})}):V?/* @__PURE__ */H("span",{className:"block min-w-0 flex-1",children:[
|
|
6
6
|
/* @__PURE__ */I("span",{lang:e.lang,className:"block truncate",children:e.label}),e.description&&/* @__PURE__ */I("span",{className:ve,children:e.description})]}):e.description?
|
|
7
7
|
/* @__PURE__ */H(O,{children:[
|
|
@@ -9,12 +9,12 @@ return H("div",{id:Ne(t),role:"option",lang:e.description||F?void 0:e.lang,"aria
|
|
|
9
9
|
/* @__PURE__ */I("span",{className:ve,children:e.description})]}):e.label]},e.value)},xe,"mx-1"):null,Me=void 0!==We?
|
|
10
10
|
/* @__PURE__ */H("span",{className:"relative block min-w-0 truncate",children:[
|
|
11
11
|
/* @__PURE__ */I("span",{"aria-hidden":"true","data-select-value":"",className:"flex min-w-0 items-center gap-2 truncate",children:We}),
|
|
12
|
-
/* @__PURE__ */I("span",{lang:void 0===
|
|
13
|
-
/* @__PURE__ */I("div",{className:"shrink-0 border-t border-(--rosh-glass-solid-border) px-1 py-1",children:G.map((e,t)=>/* @__PURE__ */H("button",{ref:e=>{se.current[t]=e},type:"button","data-select-action":"","aria-disabled":e.disabled||void 0,onClick:()=>(e=>{e.disabled||(
|
|
12
|
+
/* @__PURE__ */I("span",{lang:void 0===Pe?Re:void 0,className:"sr-only",children:Pe??Ke})]}):/* @__PURE__ */I("span",{lang:Re,className:"block truncate "+(void 0===Ke?"text-gray-400":""),children:Ke??C??" "}),Ge={zIndex:h.popup,left:Oe?.left,top:Oe?.top,bottom:Oe?.bottom,width:Oe?.width,maxHeight:Oe?.maxHeight??b,visibility:Oe?void 0:"hidden",...g()},Qe=/* @__PURE__ */I("div",{ref:oe,id:we,role:"listbox","aria-labelledby":Y??(X?void 0:ke),"aria-label":Y?void 0:X,"aria-multiselectable":V||void 0,className:ue?"min-h-0 shrink overflow-y-auto py-1":"fixed overflow-y-auto rounded-(--radius-popup) py-1",style:ue?null!==he?{maxHeight:he}:void 0:null!==he?{...Ge,maxHeight:he}:Ge,children:Le}),Ze=ue?/* @__PURE__ */H("div",{ref:de,className:"fixed flex flex-col overflow-hidden rounded-(--radius-popup)",style:Ge,children:[Qe,
|
|
13
|
+
/* @__PURE__ */I("div",{className:"shrink-0 border-t border-(--rosh-glass-solid-border) px-1 py-1",children:G.map((e,t)=>/* @__PURE__ */H("button",{ref:e=>{se.current[t]=e},type:"button","data-select-action":"","aria-disabled":e.disabled||void 0,onClick:()=>(e=>{e.disabled||(Ue(),e.onSelect())})(e),onKeyDown:e=>((e,t)=>{const r=(G?.length??0)-1,n=t=>{e.preventDefault(),se.current[t]?.focus()},i=()=>{e.preventDefault(),le.current?.focus()};switch(e.key){case"ArrowDown":return void n(Math.min(t+1,r));case"ArrowUp":return void(0===t?i():n(t-1));case"Home":return void n(0);case"End":return void n(r);case"Tab":return e.shiftKey?void(0===t?i():n(t-1)):t<r?void n(t+1):(e.preventDefault(),void Ue());case"Escape":return e.preventDefault(),e.stopPropagation(),void Ue()}})(e,t),className:`flex w-full items-center gap-2 rounded-lg ${me} text-left rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${e.disabled?"cursor-not-allowed text-gray-400":"cursor-pointer text-gray-700 hover:bg-blue-50 hover:text-blue-700"}`,children:[e.icon&&/* @__PURE__ */I(m,{name:e.icon,"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
|
|
14
14
|
/* @__PURE__ */I("span",{className:"min-w-0 flex-1 truncate",children:e.label})]},e.label))})]}):Qe;/* @__PURE__ */
|
|
15
15
|
return H("div",{ref:ae,className:"relative",children:[
|
|
16
|
-
/* @__PURE__ */I("button",{ref:le,id:ke,type:"button",role:"combobox","aria-haspopup":"listbox","aria-expanded":te,"aria-controls":te?we:void 0,"aria-activedescendant":te&&ne>=0?Ne(ne):void 0,"aria-invalid":
|
|
16
|
+
/* @__PURE__ */I("button",{ref:le,id:ke,type:"button",role:"combobox","aria-haspopup":"listbox","aria-expanded":te,"aria-controls":te?we:void 0,"aria-activedescendant":te&&ne>=0?Ne(ne):void 0,"aria-invalid":B||void 0,"aria-describedby":Se,"aria-label":X,"aria-labelledby":Y,title:U,disabled:A,"aria-readonly":M||void 0,onClick:()=>te?Ue():Ve(),onKeyDown:t=>{if(!A&&!M)switch(t.key){case"ArrowDown":return t.preventDefault(),void(te?ie(e=>n(Te,e,1)):Ve());case"ArrowUp":return t.preventDefault(),void(te?ie(e=>n(Te,e,-1)):Ve());case"Home":return void(te&&(t.preventDefault(),ie(e(Te))));case"End":return void(te&&(t.preventDefault(),ie(r(Te))));case"Enter":return void(te&&(t.preventDefault(),Fe(ne)));case" ":return t.preventDefault(),void(te?Fe(ne):Ve());case"Escape":return void(te&&(t.preventDefault(),t.stopPropagation(),Ue()));case"Tab":return te&&ue&&!t.shiftKey?(t.preventDefault(),void se.current[0]?.focus()):void(te&&Ue(!1));default:1!==t.key.length||t.metaKey||t.ctrlKey||t.altKey||(t.preventDefault(),Je(t.key))}},className:s({invalid:B,size:W,readOnly:M,auto:je,className:`${M?"":"pr-8 "}text-left ${K}`.trim()}),children:Q?
|
|
17
17
|
/* @__PURE__ */H("span",{className:"flex min-w-0 items-center gap-1",children:[Me,
|
|
18
|
-
/* @__PURE__ */I("span",{"aria-hidden":"true","data-select-changed":"",className:"shrink-0",children:"*"})]}):Me}),Q&&/* @__PURE__ */I("span",{id:$e,hidden:!0,children:be.select.changed}),je&&/* @__PURE__ */I("span",{id:
|
|
19
|
-
/* @__PURE__ */H("select",{ref:ee,value:l,multiple:V||void 0,onChange:e=>Ie(V?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),disabled:
|
|
20
|
-
/* @__PURE__ */I(
|
|
18
|
+
/* @__PURE__ */I("span",{"aria-hidden":"true","data-select-changed":"",className:"shrink-0",children:"*"})]}):Me}),Q&&/* @__PURE__ */I("span",{id:$e,hidden:!0,children:be.select.changed}),je&&/* @__PURE__ */I("span",{id:Ee,hidden:!0,children:be.settingView.auto}),!M&&/* @__PURE__ */I(m,{name:"chevron-up-down","aria-hidden":"true",className:`pointer-events-none absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 ${c}`,strokeWidth:2}),
|
|
19
|
+
/* @__PURE__ */H("select",{ref:ee,value:l,multiple:V||void 0,onChange:e=>Ie(V?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),disabled:A,"aria-hidden":"true",tabIndex:-1,className:"sr-only",..._,children:[void 0!==C&&!V&&/* @__PURE__ */I("option",{value:"",disabled:!0,children:C}),
|
|
20
|
+
/* @__PURE__ */I(z,{items:w})]}),te&&T(Ze,document.body)]})}),K=w(function({touchSize:e="touch",...t},r){const n=u();return!n||void 0===t.footer&&void 0===t.changed||t.readOnly?n&&!t.readOnly?/* @__PURE__ */I(C,{ref:r,...t,size:e}):/* @__PURE__ */I(B,{ref:r,...t}):/* @__PURE__ */I(B,{ref:r,...t,size:e})});export{C as NativeSelect,K as Select_default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ChartSkeleton as e}from"./chunk-
|
|
1
|
+
import{ChartSkeleton as e}from"./chunk-G3IG4X4Z.js";import{ChartHighlightProvider as r,useHighlight as a}from"./chunk-CNYAHYE6.js";import{CHART_INK as t,resolveSeriesColor as s}from"./chunk-TZFACUMR.js";import{useShellStrings as l}from"./chunk-KKZZAK76.js";import{jsx as n,jsxs as o,Fragment as c}from"react/jsx-runtime";function i({shape:e,colour:r}){const a="shrink-0";switch(e){case"circle":/* @__PURE__ */
|
|
2
2
|
return n("span",{className:`${a} h-2.5 w-2.5 rounded-full`,style:{backgroundColor:r}});case"circle-outline":/* @__PURE__ */
|
|
3
3
|
return n("span",{className:`${a} h-2.5 w-2.5 rounded-full border-2`,style:{borderColor:r}});case"rounded-square-outline":/* @__PURE__ */
|
|
4
4
|
return n("span",{className:`${a} h-2.5 w-2.5 rounded-sm border-2`,style:{borderColor:r}});case"square":/* @__PURE__ */
|
|
@@ -8,10 +8,10 @@ return n("span",{className:`${a} h-3.5 w-1 rounded-full`,style:{backgroundColor:
|
|
|
8
8
|
return n("span",{className:`${a} h-2.5 w-2.5 rounded-sm`,style:{backgroundColor:r}})}}function d({entries:e,interactive:r,fallbackSwatch:t,onClick:l}){const{highlighted:d,setHighlighted:u}=a();/* @__PURE__ */
|
|
9
9
|
return n("ul",{className:"m-0 flex flex-wrap items-center gap-x-4 gap-y-1 p-0",children:e.map((e,a)=>{const h=r&&null!==d&&d!==e.key,m=/* @__PURE__ */o(c,{children:[
|
|
10
10
|
/* @__PURE__ */n(i,{shape:e.swatch??t,colour:s(a,e.color,e.tone)}),e.label]});/* @__PURE__ */
|
|
11
|
-
return n("li",{className:"list-none",children:r||l?/* @__PURE__ */n("button",{type:"button",onClick:l?()=>l(e.key):void 0,"aria-pressed":l?Boolean(e.pressed):void 0,onMouseEnter:r?()=>u(e.key):void 0,onMouseLeave:r?()=>u(null):void 0,onFocus:r?()=>u(e.key):void 0,onBlur:r?()=>u(null):void 0,className:"flex items-center gap-2 rounded text-xs text-gray-600 transition-opacity rosh-focus-outline "+(h?"opacity-40":""),children:m}):/* @__PURE__ */n("span",{className:"flex items-center gap-2 text-xs text-gray-600",children:m})},e.key)})})}function u({title:a,subtitle:s,legend:c,table:i,tableLabel:u,busy:h=!1,loading:m=!1,skeletonVariant:p="area",skeletonHeight:b,interactiveLegend:g=!0,legendSwatch:y="rounded-square",onLegendClick:f,actions:k,children:
|
|
12
|
-
return n(r,{children:/* @__PURE__ */o("section",{className:`flex min-w-0 flex-col gap-3 rounded-lg border border-gray-200 bg-white p-5 ${
|
|
11
|
+
return n("li",{className:"list-none",children:r||l?/* @__PURE__ */n("button",{type:"button",onClick:l?()=>l(e.key):void 0,"aria-pressed":l?Boolean(e.pressed):void 0,onMouseEnter:r?()=>u(e.key):void 0,onMouseLeave:r?()=>u(null):void 0,onFocus:r?()=>u(e.key):void 0,onBlur:r?()=>u(null):void 0,className:"flex items-center gap-2 rounded text-xs text-gray-600 transition-opacity rosh-focus-outline "+(h?"opacity-40":""),children:m}):/* @__PURE__ */n("span",{className:"flex items-center gap-2 text-xs text-gray-600",children:m})},e.key)})})}function u({title:a,subtitle:s,legend:c,table:i,tableLabel:u,busy:h=!1,loading:m=!1,skeletonVariant:p="area",skeletonHeight:b,interactiveLegend:g=!0,legendSwatch:y="rounded-square",onLegendClick:f,actions:k,children:x,className:N}){const w=l().charts;/* @__PURE__ */
|
|
12
|
+
return n(r,{children:/* @__PURE__ */o("section",{className:`flex min-w-0 flex-col gap-3 rounded-lg border border-gray-200 bg-white p-5 ${N??""}`,"aria-busy":h||m||void 0,children:[
|
|
13
13
|
/* @__PURE__ */o("header",{className:"flex items-start justify-between gap-4",children:[
|
|
14
14
|
/* @__PURE__ */o("div",{className:"min-w-0",children:[
|
|
15
|
-
/* @__PURE__ */n("h3",{className:"text-base font-semibold text-gray-900",children:a}),s&&/* @__PURE__ */n("p",{className:"mt-0.5 text-sm text-gray-500",children:s})]}),k&&/* @__PURE__ */n("div",{className:"shrink-0",children:k})]}),m?/* @__PURE__ */n(e,{variant:p,height:b}):/* @__PURE__ */n("div",{className:h?"opacity-60 transition-opacity":"transition-opacity",children:
|
|
15
|
+
/* @__PURE__ */n("h3",{className:"text-base font-semibold text-gray-900",children:a}),s&&/* @__PURE__ */n("p",{className:"mt-0.5 text-sm text-gray-500",children:s})]}),k&&/* @__PURE__ */n("div",{className:"shrink-0",children:k})]}),m?/* @__PURE__ */n(e,{variant:p,height:b}):/* @__PURE__ */n("div",{className:h?"opacity-60 transition-opacity":"transition-opacity",children:x}),!m&&c&&c.length>1&&/* @__PURE__ */n(d,{entries:c,interactive:g,fallbackSwatch:y,onClick:f}),!m&&i&&/* @__PURE__ */o("details",{className:"border-t border-gray-100 pt-3",children:[
|
|
16
16
|
/* @__PURE__ */n("summary",{className:"cursor-pointer text-sm font-medium text-gray-600 rosh-focus-outline",children:u??w.showTable}),
|
|
17
17
|
/* @__PURE__ */n("div",{className:"mt-3 overflow-x-auto",style:{color:t.label},children:i})]})]})})}export{u as ChartFrame};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{toISODate as e}from"./chunk-
|
|
2
|
-
return y("input",{ref:
|
|
1
|
+
import{toISODate as e}from"./chunk-7SPX7DLO.js";import{Calendar as t}from"./chunk-TKBP5HRY.js";import{calendarNames as r}from"./chunk-5OTS2G3M.js";import{inputClasses as a,PLACEHOLDER_INK as n}from"./chunk-JFSYWEHD.js";import{Icon as i}from"./chunk-42BBJJDP.js";import{onOverlayOpen as o}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as l}from"./chunk-62LW225J.js";import{useDropdownPosition as s}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as d}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as u}from"./chunk-TWVUQUUD.js";import{useShellStrings as c,useShellLocale as m}from"./chunk-KKZZAK76.js";import{forwardRef as f,useState as b,useRef as p,useId as h,useEffect as v}from"react";import{createPortal as g}from"react-dom";import{jsx as y,jsxs as x}from"react/jsx-runtime";var N=/^\d{4}-\d{2}-\d{2}$/,k=/^(aria|data)-/,j=/* @__PURE__ */new Set(["aria-invalid","aria-required"]);function w(t){if(null==t||""===t)return"";if(t instanceof Date)return Number.isNaN(t.getTime())?"":e(t);if(N.test(t))return t;const r=new Date(t);return Number.isNaN(r.getTime())?"":e(r)}function D(e){if(!N.test(e))return null;const[t,r,a]=e.split("-").map(Number),n=new Date(t,r-1,a);return n.getMonth()===r-1&&n.getDate()===a?n:null}function B(e,t){const r=D(e);return r?t.longDate(r.getFullYear(),r.getMonth(),r.getDate()):""}var F=f(function({value:f,onChange:N,min:F,max:S,invalid:E,size:J,native:O,weekStartsOn:T,className:W="","aria-label":$,"aria-describedby":q,"aria-labelledby":C,id:L,name:P,disabled:z,placeholder:I,required:K,clearable:M,form:U,title:G,tabIndex:H,autoFocus:Y,onFocus:R,onBlur:Z,...A},Q){const V=M??!K,X=w(f),_=w(F),ee=w(S),te=c().datePicker,re=m(),ae=r(re),[ne,ie]=b(!1),oe=p(null),le=p(null),se=p(null),de=h(),ue=h(),ce=h(),me=s(le,ne,{popupRef:se}),[fe,be]=b(!1);d(()=>{const e=!!L&&(le.current?.labels?.length??0)>0;e!==fe&&be(e)});const pe=!$&&(!!C||fe);if(v(()=>{if(!ne)return;const e=e=>{const t=e.target;oe.current?.contains(t)||se.current?.contains(t)||ie(!1)};document.addEventListener("pointerdown",e,!0);const t=o(()=>ie(!1));return()=>{document.removeEventListener("pointerdown",e,!0),t()}},[ne]),v(()=>{if(ne)return u(e=>"Escape"===e.key&&(ie(!1),le.current?.focus(),!0),()=>se.current)},[ne]),O)/* @__PURE__ */
|
|
2
|
+
return y("input",{ref:Q,type:"date",lang:re,id:L,name:P,disabled:z,"aria-label":$,"aria-describedby":q,"aria-invalid":E||void 0,value:X,min:_||void 0,max:ee||void 0,onChange:e=>N?.(D(e.target.value)),className:a({invalid:E,size:J,className:W}),"aria-labelledby":C,required:K,form:U,title:G,tabIndex:H,autoFocus:Y,onFocus:R,onBlur:Z,...A});const he=Object.fromEntries(Object.entries(A).filter(([e])=>k.test(e)&&!j.has(e))),ve=A["aria-required"],ge=!!K||!0===ve||"true"===ve,ye=[pe?ue:void 0,ge?ce:void 0,q].filter(Boolean).join(" ")||void 0,xe=e(/* @__PURE__ */new Date),Ne=(!_||xe>=_)&&(!ee||xe<=ee),ke=I??te.placeholder;/* @__PURE__ */
|
|
3
3
|
return x("div",{ref:oe,className:"relative",children:[
|
|
4
|
-
/* @__PURE__ */y("input",{ref:
|
|
5
|
-
/* @__PURE__ */x("button",{ref:le,type:"button",...he,id:
|
|
6
|
-
/* @__PURE__ */y("span",{className:
|
|
7
|
-
/* @__PURE__ */y(i,{name:"date",className:`h-4 w-4 shrink-0 ${n}`,strokeWidth:"1.75","aria-hidden":"true"})]}),pe&&/* @__PURE__ */y("span",{id:ue,className:"sr-only",children:
|
|
4
|
+
/* @__PURE__ */y("input",{ref:Q,type:"hidden",name:P,form:U,value:X}),
|
|
5
|
+
/* @__PURE__ */x("button",{ref:le,type:"button",...he,id:L,disabled:z,title:G,tabIndex:H,autoFocus:Y,onFocus:R,onBlur:Z,"aria-haspopup":"dialog","aria-expanded":ne,"aria-controls":ne?de:void 0,"aria-labelledby":C,"aria-describedby":ye,"aria-label":$?`${$}${X?`, ${B(X,ae)}`:""}`:void 0,onClick:()=>ie(e=>!e),className:`${a({invalid:E,size:J,className:W})} flex items-center justify-between text-left`,children:[
|
|
6
|
+
/* @__PURE__ */y("span",{className:X?"text-gray-900":"text-gray-400",children:X?B(X,ae):ke}),
|
|
7
|
+
/* @__PURE__ */y(i,{name:"date",className:`h-4 w-4 shrink-0 ${n}`,strokeWidth:"1.75","aria-hidden":"true"})]}),pe&&/* @__PURE__ */y("span",{id:ue,className:"sr-only",children:X?B(X,ae):ke}),ge&&/* @__PURE__ */y("span",{id:ce,className:"sr-only",children:te.required}),ne&&g(
|
|
8
8
|
/* @__PURE__ */x("div",{ref:se,id:de,role:"dialog","aria-label":$??te.dialog,className:"fixed w-72 rounded-xl border border-gray-200 bg-white p-3 shadow-lg",style:{zIndex:l.popup,left:me?.left,right:me?.right,top:me?.top,bottom:me?.bottom,maxWidth:me?.maxWidth,visibility:me?void 0:"hidden"},children:[
|
|
9
|
-
/* @__PURE__ */y(t,{value:
|
|
9
|
+
/* @__PURE__ */y(t,{value:X||null,min:_||null,max:ee||null,weekStartsOn:T,onSelect:e=>{ie(!1),le.current?.focus(),N?.(D(e))}}),(V||Ne)&&/* @__PURE__ */x("div",{className:"mt-2 flex justify-between border-t border-gray-100 pt-2",children:[V&&/* @__PURE__ */y("button",{type:"button",onClick:()=>{ie(!1),le.current?.focus(),N?.(null)},className:"rounded-(--radius-control) px-2 py-1 text-sm text-gray-500 hover:bg-gray-100 hover:text-gray-700",children:te.clear}),Ne&&/* @__PURE__ */y("button",{type:"button",onClick:()=>{ie(!1),le.current?.focus(),N?.(/* @__PURE__ */new Date)},className:"ml-auto rounded-(--radius-control) px-2 py-1 text-sm font-medium text-blue-600 hover:bg-blue-50",children:te.today})]})]}),document.body)]})});export{F as DatePicker_default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Modal as e}from"./chunk-
|
|
1
|
+
import{Modal as e}from"./chunk-BIEKHPZ5.js";import{keepsNativeMenu as a}from"./chunk-5QFPTDQF.js";import{jsx as i,jsxs as n}from"react/jsx-runtime";var t={activeOpacity:70,inactiveOpacity:50,activeBlur:0,inactiveBlur:0};function r(e){try{const a=JSON.parse(localStorage.getItem(e)||"");return null!=a.blur&&null==a.activeBlur&&(a.activeBlur=a.blur,a.inactiveBlur=a.blur,delete a.blur),{...t,...a}}catch{return t}}function l({open:t,onClose:r,title:l,appearance:c,onAppearanceChange:s,onSave:d,children:o}){if(!t)return null;const u="w-full h-1.5 rounded-full appearance-none bg-gray-200 cursor-pointer accent-blue-500",p="flex items-center justify-between text-xs text-gray-500";/* @__PURE__ */
|
|
2
2
|
return i("div",{onPointerDown:e=>e.stopPropagation(),onContextMenu:e=>{e.stopPropagation(),a(e.target)||e.preventDefault()},children:/* @__PURE__ */i(e,{open:t,onClose:r,title:l,size:"sm",children:/* @__PURE__ */n("div",{className:"space-y-4",children:[o,
|
|
3
3
|
/* @__PURE__ */n("div",{children:[
|
|
4
4
|
/* @__PURE__ */i("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Appearance"}),
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{ChartTooltip as t}from"./chunk-P5BOTIJU.js";import{CartesianPlot as o}from"./chunk-N7GAQVSH.js";import{binValues as r}from"./chunk-2JWPNR2U.js";import{resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as e,useShellLocale as i}from"./chunk-KKZZAK76.js";import{formatPlain as m,formatFixed as n}from"./chunk-C3QOHMR6.js";import{jsx as l}from"react/jsx-runtime";function c({values:c,bins:s=10,precomputed:h,height:u=220,width:p,color:b,tone:f,formatBound:d,formatCount:x,yAxisLabel:g,label:k,className:y,emptyLabel:j}){const A=e().charts,v=i(),w=d??(t=>Number.isInteger(t)?m(t,v):n(t,1,v)),L=x??(t=>m(t,v)),N=g??A.countAxis,M=k??A.distribution,C=h??r(c??[],s),K=a(0,b,f),O=C.map(t=>w(t.from)),P=C.map(t=>t.count);/* @__PURE__ */
|
|
2
|
+
return l(o,{labels:O,values:P,height:u,width:p,bandPadding:0,xTickAnchor:"start",formatValue:L,yAxisLabel:N,className:y,emptyLabel:j,ariaLabel:A.histogram(M,C.length,(c??[]).length),tooltip:o=>/* @__PURE__ */l(t,{title:`${w(C[o].from)} – ${w(C[o].to)}`,rows:[{key:"count",label:A.observations,color:K,value:L(C[o].count)}]}),children:({x:t,y:o,bottom:r,active:a})=>/* @__PURE__ */l("g",{children:C.map((e,i)=>/* @__PURE__ */l("rect",{x:t(i)+.5,y:o(e.count),width:Math.max(1,t.bandwidth-1),height:Math.max(0,r-o(e.count)),fill:K,fillOpacity:null===a||a===i?.85:.42},i))})})}export{c as HistogramChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{SidebarLayout as e}from"./chunk-
|
|
1
|
+
import{SidebarLayout as e}from"./chunk-3RM3D2P3.js";import{Avatar as r}from"./chunk-D6FSZBJ5.js";import{Button_default as t}from"./chunk-UDD7GB4F.js";import{useState as a}from"react";import{jsx as i,jsxs as l}from"react/jsx-runtime";var s=[{id:"inbox",label:"Inbox",count:12},{id:"starred",label:"Starred",count:3},{id:"sent",label:"Sent"},{id:"drafts",label:"Drafts",count:1},{id:"archive",label:"Archive"},{id:"trash",label:"Trash"}],n=[{id:1,from:"Marco Reyes",subject:"Q3 roadmap review",preview:"Sharing the deck ahead of Thursday — let me know what you think before the review.",time:"9:14",unread:!0},{id:2,from:"Priya Patel",subject:"Design handoff",preview:"The Figma file is ready for engineering. I exported every icon at 1x and 2x.",time:"8:02",unread:!0},{id:3,from:"GitHub",subject:"[acme/web] PR #482 merged",preview:"Your pull request was merged into main by the release bot after all checks passed.",time:"Yest"},{id:4,from:"Sara Lind",subject:"Lunch Friday?",preview:"A few of us are heading to the new place on 5th at noon if you want to join.",time:"Yest"}];function d(){const[d,c]=a(1),o=n.find(e=>e.id===d)??n[0];/* @__PURE__ */
|
|
2
2
|
return i("div",{className:"h-full",children:/* @__PURE__ */i(e,{side:"left",defaultWidth:200,sidebar:/* @__PURE__ */l("div",{className:"flex h-full flex-col p-2",children:[
|
|
3
3
|
/* @__PURE__ */i(t,{block:!0,className:"mb-2",children:"Compose"}),s.map((e,r)=>/* @__PURE__ */l("button",{className:"flex items-center justify-between rounded-md px-3 py-2 text-left text-sm "+(0===r?"bg-blue-50 font-medium text-blue-700":"text-gray-700 hover:bg-gray-100"),children:[
|
|
4
4
|
/* @__PURE__ */i("span",{children:e.label}),null!=e.count&&/* @__PURE__ */i("span",{className:"text-xs text-gray-400",children:e.count})]},e.id))]}),children:/* @__PURE__ */l("div",{className:"flex h-full",children:[
|