efficient-shell 11.8.0 → 11.11.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 +12 -1
- package/dist/{Browser-NMILHEUX.js → Browser-NRGJ53ST.js} +14 -14
- package/dist/{Calculator-E7AMPGD5.js → Calculator-YZEGVEQ7.js} +22 -22
- package/dist/{CurrencyConverter-TAWZDMT4.js → CurrencyConverter-CJQMDBQW.js} +6 -6
- package/dist/Documents-FIGKS36O.js +84 -0
- package/dist/{Files-YQWVU6KZ.js → Files-FPNJ46XY.js} +88 -88
- package/dist/{Notepad-DZSDABU7.js → Notepad-2XW63REV.js} +9 -9
- package/dist/PdfViewer-M4RTCNNE.js +1 -0
- package/dist/{PomodoroTimer-RAZE37BO.js → PomodoroTimer-Y5GQX37J.js} +21 -21
- package/dist/{Preview-6Z6K5QLK.js → Preview-K7KDM4XK.js} +24 -24
- package/dist/Sidebar-QP5Y7RBV.js +44 -0
- package/dist/Spreadsheet-RQE4OCEK.js +75 -0
- package/dist/{Stock-HJN2BSAD.js → Stock-IHAG62QV.js} +3 -3
- package/dist/{Weather-G7AOUS36.js → Weather-EQDFEBIH.js} +19 -19
- package/dist/{WorldClock-GE3DGYYU.js → WorldClock-VQG7G2Z2.js} +6 -6
- package/dist/ai/index.js +78 -78
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/CartesianPlot.js +1 -1
- package/dist/charts/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/SpecChart.js +1 -1
- package/dist/charts/StatTile.js +1 -1
- package/dist/charts/SunburstChart.js +1 -1
- package/dist/charts/TimeSeriesChart.js +1 -1
- package/dist/charts/TreemapChart.js +1 -1
- package/dist/charts/WaterfallChart.js +1 -1
- package/dist/{chunk-LXL2UCUR.js → chunk-225LCPO7.js} +1 -1
- package/dist/{chunk-JFBL4PR3.js → chunk-2E3K4FSQ.js} +1 -1
- package/dist/chunk-2EPAXWZZ.js +14 -0
- package/dist/{chunk-N7U622NC.js → chunk-2HAJ33HM.js} +2 -2
- package/dist/{chunk-V6Y4OC6K.js → chunk-2NRNKF46.js} +8 -8
- package/dist/chunk-2XOH3NJZ.js +27 -0
- package/dist/{chunk-4EZIWLJJ.js → chunk-2XORVHF2.js} +1 -1
- package/dist/{chunk-OBJGUJIE.js → chunk-2ZAFRGRF.js} +1 -1
- package/dist/{chunk-RYLTVHCV.js → chunk-32EKHIAZ.js} +11 -11
- package/dist/{chunk-RHDM7HRD.js → chunk-3JCOD5L2.js} +2 -2
- package/dist/{chunk-X5TZHOTI.js → chunk-3OHADZYV.js} +1 -1
- package/dist/{chunk-O3MBPAWZ.js → chunk-3PZI2C4R.js} +1 -1
- package/dist/chunk-3VR5BOD4.js +8 -0
- package/dist/{chunk-3XTSXZAC.js → chunk-3X2W7R5B.js} +10 -10
- package/dist/{chunk-G3KXB7SP.js → chunk-3ZRYKZGI.js} +9 -9
- package/dist/{chunk-KTCM64DQ.js → chunk-42TLGG33.js} +1 -1
- package/dist/{chunk-SS5SQMIB.js → chunk-57WQVUBX.js} +2 -2
- package/dist/{chunk-3V5GSTZI.js → chunk-5B4GRLAA.js} +1 -1
- package/dist/{chunk-3IUPYCW3.js → chunk-5KKJAYKT.js} +1 -1
- package/dist/{chunk-UEISJFZH.js → chunk-5UCRYSQJ.js} +5 -5
- package/dist/chunk-5YP7MFPK.js +1 -0
- package/dist/{chunk-KGSOOXA7.js → chunk-62BDGAML.js} +4 -4
- package/dist/{chunk-CD7UWMPX.js → chunk-63545Z3N.js} +1 -1
- package/dist/{chunk-TGGUYAWA.js → chunk-6C6M3QXL.js} +1 -1
- package/dist/{chunk-VHF3CJVO.js → chunk-6CK44QWU.js} +28 -28
- package/dist/{chunk-5F2AIDPY.js → chunk-6DQANKTL.js} +8 -8
- package/dist/chunk-6FIYG7IH.js +28 -0
- package/dist/{chunk-SHO35OPO.js → chunk-6LITLCVV.js} +1 -1
- package/dist/{chunk-RRE2NNFS.js → chunk-6LK2BBCC.js} +5 -5
- package/dist/chunk-6R32KKIS.js +22 -0
- package/dist/{chunk-IXOL7Y3Z.js → chunk-7HLBVMMQ.js} +1 -1
- package/dist/{chunk-M4BPHBKI.js → chunk-7IVTGOGM.js} +1 -1
- package/dist/{chunk-47DO42IW.js → chunk-7R23EKON.js} +1 -1
- package/dist/{chunk-2UO47XB4.js → chunk-7V32O5NF.js} +30 -14
- package/dist/{chunk-YCWALB3A.js → chunk-A4YTWDKD.js} +1 -1
- package/dist/{chunk-PVPMJ5G2.js → chunk-AHITTM6W.js} +1 -1
- package/dist/{chunk-UGBYAVJV.js → chunk-ALJS3SYS.js} +1 -1
- package/dist/{chunk-ZXVJL7MS.js → chunk-AQGIK2CV.js} +1 -1
- package/dist/{chunk-FT3QRQWY.js → chunk-ATKFIHDP.js} +4 -4
- package/dist/{chunk-AWKJZSTO.js → chunk-AWQ5SOC5.js} +1 -1
- package/dist/{chunk-77AQNJE2.js → chunk-B2AYI45X.js} +8 -8
- package/dist/{chunk-PFKXPSOM.js → chunk-B2MD232O.js} +5 -5
- package/dist/{chunk-6EIZOX6W.js → chunk-B2SLXCMY.js} +8 -8
- package/dist/{chunk-F3ZFCQGP.js → chunk-BDUXF7BT.js} +3 -3
- package/dist/{chunk-DGNAUGZ3.js → chunk-C3UY34DC.js} +2 -2
- package/dist/{chunk-MDYJVXWD.js → chunk-CAIKDX2M.js} +2 -2
- package/dist/{chunk-FA5FBNWF.js → chunk-CDQUOCXO.js} +1 -1
- package/dist/{chunk-DJW7CM3W.js → chunk-CG5X5ZLV.js} +1 -1
- package/dist/{chunk-IDI3IOY4.js → chunk-CLAKVFOB.js} +67 -67
- package/dist/{chunk-VQBEZNHC.js → chunk-CSLMWGFS.js} +1 -1
- package/dist/{chunk-BW47XJLH.js → chunk-CT7AU2TA.js} +1 -1
- package/dist/{chunk-4ULRP4Y4.js → chunk-D4RVWSUT.js} +1 -1
- package/dist/{chunk-EOWUUOVE.js → chunk-DHMOJX2Z.js} +1 -1
- package/dist/{chunk-VAPSWR5Q.js → chunk-E3EHHR73.js} +9 -9
- package/dist/chunk-EC22ACQZ.js +11 -0
- package/dist/{chunk-M3JNILT2.js → chunk-ESWR7YNY.js} +15 -15
- package/dist/{chunk-MDV7UQJD.js → chunk-EV7VAXMO.js} +8 -8
- package/dist/{chunk-GELPD7EY.js → chunk-F636NDAU.js} +8 -8
- package/dist/{chunk-4TYIYL56.js → chunk-FFNPAJLS.js} +10 -10
- package/dist/{chunk-WMHZA4EO.js → chunk-FJBJUFD7.js} +3 -3
- package/dist/{chunk-JSG2AKCG.js → chunk-FRH2AHPI.js} +1 -1
- package/dist/{chunk-5H4SWQGM.js → chunk-FUHURDBL.js} +1 -1
- package/dist/chunk-GO6HU2O3.js +7 -0
- package/dist/{chunk-DQQKG46I.js → chunk-GRC46C4V.js} +7 -7
- package/dist/chunk-H56TNUV4.js +1 -0
- package/dist/{chunk-SDDV3UCN.js → chunk-HDABS36W.js} +16 -16
- package/dist/{chunk-LJN77RG6.js → chunk-HJBR73GS.js} +1 -1
- package/dist/{chunk-DU4WEVNS.js → chunk-HRG4FYVU.js} +1 -1
- package/dist/{chunk-4MBYFQOI.js → chunk-I5XNADZ3.js} +4 -4
- package/dist/chunk-IEOCUEJK.js +14 -0
- package/dist/{chunk-YDMXW2Q4.js → chunk-IGQZANYE.js} +11 -11
- package/dist/{chunk-ZGOHRLXG.js → chunk-IIKPM3F4.js} +1 -1
- package/dist/{chunk-XYECIBVX.js → chunk-IUG4Z2ND.js} +1 -1
- package/dist/{chunk-4XNVIKZZ.js → chunk-IUMFOSFJ.js} +1 -1
- package/dist/{chunk-EKCQ7XBZ.js → chunk-JG26ICX6.js} +2 -2
- package/dist/{chunk-TMMNCXQT.js → chunk-JJZAYAVL.js} +1 -1
- package/dist/{chunk-E6GDAV5R.js → chunk-JRCFOZEU.js} +4 -4
- package/dist/chunk-K6D7OSKZ.js +20 -0
- package/dist/{chunk-LT6PG6UW.js → chunk-K6LW2QLI.js} +1 -1
- package/dist/{chunk-MXGDFO6A.js → chunk-KKJ55GUZ.js} +1 -1
- package/dist/chunk-KU4IWX6F.js +2 -0
- package/dist/{chunk-7ELJQL7J.js → chunk-KVVZLEUG.js} +1 -1
- package/dist/{chunk-54NMFQMW.js → chunk-KYHDDVTR.js} +4 -4
- package/dist/{chunk-MTIP5DH2.js → chunk-KZEIQO3V.js} +3 -3
- package/dist/{chunk-NGLU2GKE.js → chunk-LGTYPLJM.js} +4 -4
- package/dist/{chunk-DUGYWX2R.js → chunk-LXOX5FGH.js} +1 -1
- package/dist/{chunk-OH5L6HYW.js → chunk-LXQHTY3A.js} +3 -3
- package/dist/{chunk-T7PVHIXI.js → chunk-M57KX3OM.js} +1 -1
- package/dist/chunk-MQ445O4X.js +6 -0
- package/dist/{chunk-4TGZODSH.js → chunk-MQE2FBJU.js} +5 -5
- package/dist/{chunk-SAP4YI2Y.js → chunk-NMQGAP3H.js} +1 -1
- package/dist/{chunk-HCXIXV4E.js → chunk-NMTS2L2B.js} +7 -7
- package/dist/{chunk-VAK5FQXH.js → chunk-NTUZT37J.js} +1 -1
- package/dist/{chunk-ORIXCEKO.js → chunk-O6VIHWYU.js} +1 -1
- package/dist/chunk-ODQYWMDF.js +3 -0
- package/dist/{chunk-2E2SUEEE.js → chunk-OLJUPBY4.js} +1 -1
- package/dist/chunk-OPZXVXX5.js +7 -0
- package/dist/{chunk-LJAYUDN2.js → chunk-OXCFRH33.js} +1 -1
- package/dist/chunk-OZM6DE7A.js +8 -0
- package/dist/{chunk-SL77N7VT.js → chunk-PDFV3YQB.js} +3 -3
- package/dist/{chunk-P4VKU3SL.js → chunk-PDXOGPWH.js} +1 -1
- package/dist/{chunk-YQFGRYEF.js → chunk-PETBAYS5.js} +11 -11
- package/dist/{chunk-IMDGMUE3.js → chunk-PL4HKGYP.js} +1 -1
- package/dist/chunk-PMA6DZ4Q.js +6 -0
- package/dist/{chunk-QYL26AB4.js → chunk-PMKBWDXO.js} +1 -1
- package/dist/{chunk-B634WHJ2.js → chunk-PVOTOUJG.js} +2 -2
- package/dist/{chunk-SXNQHIBY.js → chunk-PVVHWLNX.js} +1 -1
- package/dist/{chunk-FXOYA2VJ.js → chunk-PZHO4FEN.js} +1 -1
- package/dist/{chunk-ESZHN7PV.js → chunk-Q7DVGUML.js} +1 -1
- package/dist/{chunk-355CRSFS.js → chunk-QAIMZN7M.js} +11 -11
- package/dist/{chunk-WOXQODYQ.js → chunk-QEDVXD3L.js} +1 -1
- package/dist/{chunk-OTVK7DJM.js → chunk-QOJ2UNS5.js} +1 -1
- package/dist/{chunk-MS5APD3V.js → chunk-R6TDZ7T5.js} +1 -1
- package/dist/{chunk-C6YAFZG3.js → chunk-R72ZKZDP.js} +2 -2
- package/dist/chunk-R7KRBKFH.js +5 -0
- package/dist/{chunk-JFV5CQN4.js → chunk-RMSF4UCJ.js} +1 -1
- package/dist/{chunk-3NRQNKVP.js → chunk-RNBC6V2D.js} +10 -10
- package/dist/chunk-RQBQETXQ.js +11 -0
- package/dist/chunk-S43DAIIB.js +9 -0
- package/dist/{chunk-RDYFZHT3.js → chunk-SAASFWKB.js} +1 -1
- package/dist/chunk-SCZUDGRZ.js +2 -0
- package/dist/{chunk-AFYLVV74.js → chunk-SEP35R2E.js} +1 -1
- package/dist/{chunk-SXQZ5GTA.js → chunk-SGBR443F.js} +5 -5
- package/dist/{chunk-JH4ZCPHW.js → chunk-SKRFI6WB.js} +12 -12
- package/dist/chunk-SUYQ7QYB.js +13 -0
- package/dist/{chunk-BTRV3SMB.js → chunk-SWJXWDKX.js} +1 -1
- package/dist/{chunk-PCTOL2FX.js → chunk-T74FGTLW.js} +6 -6
- package/dist/{chunk-KQOY4RGP.js → chunk-TA4JGC5C.js} +1 -1
- package/dist/{chunk-GOZO6LU2.js → chunk-TXKTITMF.js} +6 -6
- package/dist/{chunk-CRILBBSU.js → chunk-TZXAW32T.js} +1 -1
- package/dist/{chunk-SX5BSWTN.js → chunk-UG42KUCT.js} +5 -5
- package/dist/{chunk-OPN4I565.js → chunk-UTITWGVW.js} +1 -1
- package/dist/{chunk-7TZV6G2F.js → chunk-UVMM7AYO.js} +1 -1
- package/dist/{chunk-4QK4WNPB.js → chunk-UWJNQH2X.js} +1 -1
- package/dist/{chunk-6UBOLLBC.js → chunk-V64CJHMY.js} +19 -19
- package/dist/{chunk-ZD36QKQS.js → chunk-VEGZVUHE.js} +1 -1
- package/dist/chunk-VEZHFONL.js +9 -0
- package/dist/{chunk-TQE6O2JA.js → chunk-VPEH3THH.js} +2 -2
- package/dist/{chunk-NU5HN3FZ.js → chunk-VU5P4ZM5.js} +11 -11
- package/dist/{chunk-CLTRQ7AQ.js → chunk-VVDK7XPH.js} +1 -1
- package/dist/{chunk-XQZL6JDD.js → chunk-VZ52KKNA.js} +6 -6
- package/dist/{chunk-P3RXXWXN.js → chunk-WEEQDPU3.js} +5 -5
- package/dist/{chunk-EN5NXWT6.js → chunk-WOOKUEED.js} +1 -1
- package/dist/{chunk-72LJMEL6.js → chunk-X2DUOIJP.js} +1 -1
- package/dist/{chunk-C764JODK.js → chunk-Y4RHGLXB.js} +1 -1
- package/dist/{chunk-ECJKIPWU.js → chunk-YOXR3VKO.js} +1 -1
- package/dist/{chunk-QVZKRROQ.js → chunk-YQLKZ5UQ.js} +1 -1
- package/dist/{chunk-X55LUERI.js → chunk-YUAF3FDE.js} +4 -4
- package/dist/{chunk-JTMEFXRL.js → chunk-ZKBGUDNB.js} +1 -1
- package/dist/{chunk-IBS7647X.js → chunk-ZOQVYSTB.js} +21 -21
- package/dist/{chunk-5CXFABVD.js → chunk-ZOQXFS3R.js} +1 -1
- package/dist/data/DataTable.js +1 -1
- package/dist/data/EntityList.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/data/ResizableTable.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/Input.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.d.ts +22 -0
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.js +1 -1
- package/dist/forms/NumericKeypad.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/RenameField.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/mediaLibraryMenu.js +1 -1
- package/dist/forms/mediaMoveItems.js +1 -1
- package/dist/forms/textAlign.js +1 -1
- package/dist/forms/useFileIntake.js +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.js +666 -666
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +3 -3
- package/dist/markdown/index.js +1 -1
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/shell/Accordion.js +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/Avatar.js +1 -1
- package/dist/shell/Banner.js +1 -1
- package/dist/shell/Breadcrumbs.js +1 -1
- package/dist/shell/BudgetBar.js +1 -1
- package/dist/shell/Card.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContainerFillChart.js +1 -1
- package/dist/shell/ContextMenu.js +1 -1
- package/dist/shell/CountBadge.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/DropdownMenu.js +1 -1
- package/dist/shell/EditableGrid.js +1 -1
- package/dist/shell/EmptyState.js +1 -1
- package/dist/shell/GlobalSearch.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/IconRail.js +1 -1
- package/dist/shell/ImageLightbox.js +1 -1
- package/dist/shell/ItemCount.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/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/PopupMenu.js +1 -1
- package/dist/shell/ProductionTimeline.js +1 -1
- package/dist/shell/ResizeHandle.js +1 -1
- package/dist/shell/Result.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SettingRow.js +1 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/SidebarNav.js +1 -1
- package/dist/shell/SortableList.js +1 -1
- package/dist/shell/Statistic.js +1 -1
- package/dist/shell/StepChain.js +1 -1
- package/dist/shell/Stepper.js +1 -1
- package/dist/shell/TimeAgo.js +1 -1
- package/dist/shell/TimelineTrack.js +1 -1
- package/dist/shell/TopNav.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/discardGuard.js +1 -1
- package/dist/shell/language.js +1 -1
- package/dist/shell/strings.d.ts +263 -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 -6
- package/dist/Documents-SDOY3ZA3.js +0 -52
- package/dist/PdfViewer-Y3SAVADX.js +0 -1
- package/dist/Sidebar-GQX7UM3M.js +0 -44
- package/dist/Spreadsheet-Q5N5KXGP.js +0 -37
- package/dist/chunk-34H3CK7R.js +0 -22
- package/dist/chunk-56KADF2B.js +0 -11
- package/dist/chunk-7GTUUBS2.js +0 -28
- package/dist/chunk-7INZ7O3A.js +0 -5
- package/dist/chunk-CZMSOB2T.js +0 -9
- package/dist/chunk-EUAC2T5D.js +0 -2
- package/dist/chunk-FO6UPEZH.js +0 -7
- package/dist/chunk-FSUQTN34.js +0 -14
- package/dist/chunk-GDQJBQ5B.js +0 -1
- package/dist/chunk-IYXNRNAF.js +0 -8
- package/dist/chunk-JNQF5CBB.js +0 -6
- package/dist/chunk-K4JQ3FQI.js +0 -2
- package/dist/chunk-L7XIGRIT.js +0 -6
- package/dist/chunk-LGDMGDSV.js +0 -14
- package/dist/chunk-LKTUUNGJ.js +0 -1
- package/dist/chunk-PLK2WHZG.js +0 -27
- package/dist/chunk-RABYGQQU.js +0 -8
- package/dist/chunk-RK7MN5L5.js +0 -3
- package/dist/chunk-RPL4H6LE.js +0 -9
- package/dist/chunk-UGGHQYDN.js +0 -11
- package/dist/chunk-WUAKIM2B.js +0 -7
- package/dist/chunk-XZAEEX2H.js +0 -13
- package/dist/chunk-ZS3TIQQ4.js +0 -20
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import{useClickOutside as e}from"./chunk-SI26KESU.js";import{useColumnConfig as t}from"./chunk-UKBXQXDZ.js";import{useShellAuth as r}from"./chunk-2QY5BJLA.js";import{useIsMobile as o}from"./chunk-UGTRSRIW.js";import{Icon as l}from"./chunk-
|
|
1
|
+
import{useClickOutside as e}from"./chunk-SI26KESU.js";import{useColumnConfig as t}from"./chunk-UKBXQXDZ.js";import{useShellAuth as r}from"./chunk-2QY5BJLA.js";import{useIsMobile as o}from"./chunk-UGTRSRIW.js";import{Icon as l}from"./chunk-7V32O5NF.js";import{TH_ONE_LINE as n}from"./chunk-CJH2BGXY.js";import{shellHttp as a}from"./chunk-STKJA4PV.js";import{useShellStrings as s}from"./chunk-5YP7MFPK.js";import{glassStyle as i}from"./chunk-5FYDNH4Y.js";import{useState as c,useMemo as d,useRef as m,useCallback as h}from"react";import{jsxs as u,jsx as p}from"react/jsx-runtime";function f({tableId:f,columns:g,sort:x,onSort:y,footer:b,afterBody:v,saveDefaultPerms:k=["change_numberingconfig"],children:N}){const w=o(),[D,j]=c(!1),C=d(()=>w&&!D?g.filter(e=>"_select"!==e.key):g,[g,w,D]),{orderedColumns:S,allColumns:_,onResizeStart:z,onDragStart:P,onDragOver:$,onDrop:Y,onDragEnd:B,toggleColumn:F,resetColumns:I,draggedIdx:K,dropGap:L}=t(f,C),{hasAnyPerm:R}=r(),T=s().columns,[A,E]=c(!1),[G,J]=c(!1),[O,U]=c(!1),W=m(null),X=k.length>0&&R(k);e(W,h(()=>{A&&E(!1)},[A]));const H=S.reduce((e,t)=>e+t.width,0),M=S.map(e=>`${e.width}px`),Q={tableLayout:"fixed",width:H,minWidth:"100%"},V=m(null),Z=h(e=>{const t=V.current;t&&(t.scrollLeft=e.currentTarget.scrollLeft)},[]),q=d(()=>g.some(e=>"_select"===e.key),[g]);/* @__PURE__ */
|
|
2
2
|
return u("div",{className:"flex flex-col flex-1 min-h-0 "+(w?"-mx-4":""),children:[
|
|
3
|
-
/* @__PURE__ */p("div",{ref:V,className:"shrink-0 overflow-x-hidden",children:/* @__PURE__ */u("table",{className:"divide-y divide-gray-200",style:
|
|
4
|
-
/* @__PURE__ */p("colgroup",{children:S.map((e,t)=>/* @__PURE__ */p("col",{style:{width:
|
|
3
|
+
/* @__PURE__ */p("div",{ref:V,className:"shrink-0 overflow-x-hidden",children:/* @__PURE__ */u("table",{className:"divide-y divide-gray-200",style:Q,children:[
|
|
4
|
+
/* @__PURE__ */p("colgroup",{children:S.map((e,t)=>/* @__PURE__ */p("col",{style:{width:M[t]}},e.key))}),
|
|
5
5
|
/* @__PURE__ */p("thead",{className:"bg-gray-50",children:/* @__PURE__ */p("tr",{children:S.map((e,t)=>{const r=g.find(t=>t.key===e.key),o=r?.sortField??("_select"!==e.key?e.key:void 0),l=x&&o&&x.field===o,a="_select"===e.key;/* @__PURE__ */
|
|
6
|
-
return u("th",{className:`${n} px-4 py-3 text-left text-xs font-medium text-ink-faint uppercase select-none relative ${
|
|
7
|
-
/* @__PURE__ */u("span",{className:`${a?"":"truncate pr-3"} block ${o&&y?"cursor-pointer hover:text-gray-700":""}`,onClick:o&&y?e=>{e.stopPropagation(),y(o)}:void 0,children:[e.headerNode??e.label,l&&/* @__PURE__ */p("span",{className:"ml-1",children:"asc"===x.direction?"▲":"▼"})]}),!a&&/* @__PURE__ */p("div",{className:"absolute right-0 top-0 bottom-0 w-4 cursor-col-resize flex items-center justify-center z-10",onMouseDown:e=>z(t,e),style:{marginRight:-8},children:/* @__PURE__ */p("div",{className:"w-0.5 h-full bg-gray-200 hover:bg-blue-500 transition-colors"})}),
|
|
6
|
+
return u("th",{className:`${n} px-4 py-3 text-left text-xs font-medium text-ink-faint uppercase select-none relative ${K===t?"bg-accent-tint":""}`,draggable:!a,onDragStart:a?void 0:()=>P(t),onDragOver:a?void 0:e=>$(t,e),onDrop:a?void 0:e=>Y(t,e),onDragEnd:a?void 0:B,style:a?void 0:{cursor:"grab"},children:[
|
|
7
|
+
/* @__PURE__ */u("span",{className:`${a?"":"truncate pr-3"} block ${o&&y?"cursor-pointer hover:text-gray-700":""}`,onClick:o&&y?e=>{e.stopPropagation(),y(o)}:void 0,children:[e.headerNode??e.label,l&&/* @__PURE__ */p("span",{className:"ml-1",children:"asc"===x.direction?"▲":"▼"})]}),!a&&/* @__PURE__ */p("div",{className:"absolute right-0 top-0 bottom-0 w-4 cursor-col-resize flex items-center justify-center z-10",onMouseDown:e=>z(t,e),style:{marginRight:-8},children:/* @__PURE__ */p("div",{className:"w-0.5 h-full bg-gray-200 hover:bg-blue-500 transition-colors"})}),L===t&&/* @__PURE__ */p("div",{className:"absolute left-0 top-0 bottom-0 w-0.5 bg-blue-500 z-20 pointer-events-none"}),t===S.length-1&&L===S.length&&/* @__PURE__ */p("div",{className:"absolute right-0 top-0 bottom-0 w-0.5 bg-blue-500 z-20 pointer-events-none"})]},e.key)})})})]})}),
|
|
8
8
|
/* @__PURE__ */u("div",{className:"flex-1 overflow-y-auto overflow-x-auto min-h-0",onScroll:Z,children:[
|
|
9
|
-
/* @__PURE__ */u("table",{className:"divide-y divide-gray-200",style:
|
|
10
|
-
/* @__PURE__ */p("colgroup",{children:S.map((e,t)=>/* @__PURE__ */p("col",{style:{width:
|
|
9
|
+
/* @__PURE__ */u("table",{className:"divide-y divide-gray-200",style:Q,children:[
|
|
10
|
+
/* @__PURE__ */p("colgroup",{children:S.map((e,t)=>/* @__PURE__ */p("col",{style:{width:M[t]}},e.key))}),N(S)]}),v]}),void 0!==b&&/* @__PURE__ */u("div",{className:"border-t border-gray-200 px-4 py-2 text-sm text-gray-500 shrink-0 flex items-center justify-between",children:[
|
|
11
11
|
/* @__PURE__ */p("span",{children:b}),
|
|
12
|
-
/* @__PURE__ */u("div",{className:"flex items-center gap-3 relative",ref:
|
|
13
|
-
/* @__PURE__ */p("button",{onClick:
|
|
14
|
-
/* @__PURE__ */p("button",{onClick:()=>
|
|
12
|
+
/* @__PURE__ */u("div",{className:"flex items-center gap-3 relative",ref:W,children:[w&&q&&/* @__PURE__ */p("button",{onClick:()=>j(e=>!e),className:"text-2xs px-2 py-0.5 rounded "+(D?"bg-accent-fill text-on-accent":"text-ink-faint hover:text-ink border border-line-strong"),title:D?T.hideSelection:T.showSelection,children:D?T.selectDone:T.select}),
|
|
13
|
+
/* @__PURE__ */p("button",{onClick:I,className:"text-2xs text-ink-faintest hover:text-gray-600",children:T.reset}),
|
|
14
|
+
/* @__PURE__ */p("button",{onClick:()=>E(!A),className:"text-gray-400 hover:text-gray-600",title:T.choose,children:/* @__PURE__ */p(l,{name:"adjust",className:"w-4 h-4",strokeWidth:"1.5"})}),A&&/* @__PURE__ */u("div",{className:"absolute bottom-full right-0 mb-1 w-52 rounded-(--radius-popup) z-(--z-popup) py-1 max-h-80 overflow-y-auto",style:i(),children:[
|
|
15
15
|
/* @__PURE__ */p("p",{className:"px-3 py-2 text-3xs font-semibold text-ink-faintest uppercase",children:T.heading}),_.filter(e=>"_select"!==e.key).map(e=>/* @__PURE__ */u("label",{className:"flex items-center gap-2 px-3 py-1 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer",children:[
|
|
16
|
-
/* @__PURE__ */p("input",{type:"checkbox",checked:!e.hidden,onChange:()=>
|
|
16
|
+
/* @__PURE__ */p("input",{type:"checkbox",checked:!e.hidden,onChange:()=>F(e.key),className:"h-3.5 w-3.5 rounded border-gray-300 text-blue-600"}),e.label]},e.key)),X&&/* @__PURE__ */p("div",{className:"border-t border-gray-100 mt-1 pt-1 px-3 pb-1",children:/* @__PURE__ */p("button",{onClick:async()=>{J(!0);const e=_.filter(e=>!e.hidden).map(e=>e.key),t=w?"mobile":"desktop",r={visible_columns:e};x&&(r.sort=x);try{await a.patch(`/auth/default-columns/${f}/`,r,{params:{viewport:t}}).catch(()=>a.post("/auth/default-columns/",{table_id:f,viewport:t,...r})),U(!0),setTimeout(()=>U(!1),2e3)}catch{}J(!1)},disabled:G,className:"text-2xs w-full text-center py-1 rounded "+(O?"text-green-600":"text-ink-faint hover:text-blue-600"),children:G?"...":O?T.savedDefault:T.saveDefault})})]})]})]})]})}export{f as ResizableTable};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Modal as e}from"./chunk-
|
|
1
|
+
import{Modal as e}from"./chunk-CLAKVFOB.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"}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{PopupMenuDivider as e,PopupMenuLabel as l,menuTextRowStyle as t,PopupSubmenu as i,itemLook as a,MenuCheckMark as r}from"./chunk-
|
|
1
|
+
import{PopupMenuDivider as e,PopupMenuLabel as l,menuTextRowStyle as t,PopupSubmenu as i,itemLook as a,MenuCheckMark as r}from"./chunk-3ZRYKZGI.js";import{jsx as n,jsxs as s}from"react/jsx-runtime";var d=e=>!!e&&"label"!==e.type&&"status"!==e.type&&"divider"!==e.type&&!e.disabled,c=(e,l)=>`${e}-status-${l}`;function o(e,l){return e.flatMap((e,t)=>"status"===e.type?[c(l,t)]:[]).join(" ")||void 0}function u(d,o){const{menuId:y,choose:b,toggle:h,followLink:p,rowProps:m=()=>({}),linkAs:k}=o,f=k??"a",v=(d,k)=>{if("divider"===d.type)/* @__PURE__ */
|
|
2
2
|
return n("div",{role:"separator",children:/* @__PURE__ */n(e,{})},d.key);if("label"===d.type)/* @__PURE__ */
|
|
3
3
|
return n("div",{id:`${y}-label-${k}`,children:/* @__PURE__ */n(l,{children:d.label})},d.key);if("status"===d.type)/* @__PURE__ */
|
|
4
4
|
return n("div",{id:c(y,k),className:"text-xs",style:t(),children:d.label},d.key);if("submenu"===d.type)/* @__PURE__ */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{mediaMoveSubmenu as e}from"./chunk-
|
|
1
|
+
import{mediaMoveSubmenu as e}from"./chunk-UTITWGVW.js";import{optionNoteClass as n}from"./chunk-URHGHXDN.js";import{Icon as r}from"./chunk-7V32O5NF.js";import{jsxs as d,jsx as l}from"react/jsx-runtime";var a={folder:/* @__PURE__ */l(r,{name:"folder","aria-hidden":"true",className:"h-4 w-4"}),"folder-plus":/* @__PURE__ */l(r,{name:"folder-plus","aria-hidden":"true",className:"h-4 w-4"}),edit:/* @__PURE__ */l(r,{name:"edit","aria-hidden":"true",className:"h-4 w-4"}),swap:/* @__PURE__ */l(r,{name:"swap","aria-hidden":"true",className:"h-4 w-4"}),copy:/* @__PURE__ */l(r,{name:"copy","aria-hidden":"true",className:"h-4 w-4"}),external:/* @__PURE__ */l(r,{name:"external","aria-hidden":"true",className:"h-4 w-4"}),trash:/* @__PURE__ */l(r,{name:"trash","aria-hidden":"true",className:"h-4 w-4"}),undo:/* @__PURE__ */l(r,{name:"undo","aria-hidden":"true",className:"h-4 w-4"})},o=e=>a[e];function i(e,r){return r?/* @__PURE__ */d("span",{className:"flex min-w-0 flex-col",children:[
|
|
2
2
|
/* @__PURE__ */l("span",{children:e}),
|
|
3
3
|
/* @__PURE__ */l("span",{className:n(),children:r})]}):e}function t(n,r){const{words:d,denied:l}=r,a=[],t=(e,n,r,d={})=>{if(!r)return;const o=d.deny?l[d.deny]:void 0;a.push({key:e,label:i(n,o),icon:d.icon,danger:d.danger,disabled:!!o||!!d.off,onSelect:r})},c=(n,d,i,t)=>{const c=r.move;c&&a.push(e({count:d,kind:i,head:t,icon:o("folder"),disabled:!!l.move,targets:r.moveTargets(n),onPick:e=>c(n,e.key===s?null:e.key)},r.media))},h=e=>{a.length&&a.push({type:"divider",key:e})};switch(n.kind){case"folder":{const e={kind:"folder",id:n.id};if(t("new",d.newSubfolder,r.newSubfolder&&(()=>r.newSubfolder(n.id)),{icon:o("folder-plus"),deny:"newFolder"}),t("rename",d.rename,r.rename&&(()=>r.rename({kind:"folder",id:n.id})),{icon:o("edit"),deny:"rename"}),c(e,1,"file",!1),r.deleteFolder){h("d-delete");const e=!l.deleteFolder&&!!r.folderNotEmpty?.(n.id);a.push({key:"delete-folder",label:i(d.deleteFolder,l.deleteFolder??(e?d.folderNotEmpty:void 0)),icon:o("trash"),danger:!0,disabled:!!l.deleteFolder||e,onSelect:()=>r.deleteFolder(n.id)})}return a}case"files":{const{ids:e}=n,l=1===e.length,i={kind:"files",ids:e};l||a.push({type:"label",key:"count",label:d.filesSelected(e.length)}),c(i,e.length,r.kindOf(e),!0),t("rename",d.rename,r.rename&&(()=>r.rename({kind:"file",id:e[0]})),{icon:o("edit"),deny:"rename",off:!l}),t("replace",d.replace,r.replace&&(()=>r.replace(e[0])),{icon:o("swap"),deny:"replace",off:!l}),t("copy",d.copyUrl,()=>r.copyUrl(e[0]),{icon:o("copy"),off:!l});const s=l?r.urlOf(e[0]):void 0;return s&&a.push({type:"link",key:"open",label:d.openOriginal,href:s,icon:o("external")}),r.trash&&(h("d-trash"),t("trash",l?d.moveToTrash:d.moveFilesToTrash(e.length),()=>r.trash(i),{icon:o("trash"),danger:!0,deny:"trash"})),a}case"trashed":{const{ids:e}=n;return e.length>1&&a.push({type:"label",key:"count",label:d.filesSelected(e.length)}),t("restore",d.restore,r.restore&&(()=>r.restore(e)),{icon:o("undo"),deny:"restore"}),r.deleteForever&&(h("d-delete"),t("delete",d.deleteForever,()=>r.deleteForever(e),{icon:o("trash"),danger:!0,deny:"deleteForever"})),a}case"product-node":case"render":return a.push({type:"label",key:"read-only",label:d.readOnlyMenu}),t("design",d.openInDesign,r.openInDesign&&(()=>r.openInDesign({kind:n.kind,id:n.id})),{icon:o("external")}),"render"===n.kind&&t("copy",d.copyUrl,()=>r.copyUrl(n.id),{icon:o("copy")}),a;default:return a}}var s="__all-files__";export{s as ROOT_KEY,t as mediaLibraryMenu};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{useSettingAuto as e}from"./chunk-2NMW66P5.js";import{
|
|
2
|
-
return f("div",{className:"relative","data-number-box":"",style:
|
|
1
|
+
import{useSettingAuto as e}from"./chunk-2NMW66P5.js";import{inputClasses as r}from"./chunk-AYZY3YNC.js";import{IconButton_default as t}from"./chunk-VCMHBUKI.js";import{Icon as n}from"./chunk-7V32O5NF.js";import{useBrowserLayoutEffect as i}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as o}from"./chunk-TWVUQUUD.js";import{useShellStrings as a}from"./chunk-5YP7MFPK.js";import{forwardRef as l,useId as c,useState as u,useRef as s,useCallback as d,useEffect as p}from"react";import{jsx as m,jsxs as f,Fragment as v}from"react/jsx-runtime";function h(e){const r=String(e),t=/e-(\d+)$/.exec(r);return t?Number(t[1]):r.split(".")[1]?.length??0}var b=(e,r)=>null==e?"":null!=r?e.toFixed(r):String(e);function y({dir:e,compact:r,label:i,disabled:o,onStep:a}){const l=s(a);l.current=a;const c=s({}),u=d(()=>{const e=c.current;void 0!==e.wait&&clearTimeout(e.wait),void 0!==e.every&&clearInterval(e.every),e.off?.(),c.current={}},[]);p(()=>u,[u]),p(()=>{o&&u()},[o,u]);const f=/* @__PURE__ */m(n,{name:e>0?"chevron-up":"chevron-down","aria-hidden":"true",focusable:"false",className:r?"h-2.5 w-2.5":"h-3.5 w-3.5",strokeWidth:r?2.6:2}),v={tabIndex:-1,"aria-label":i,disabled:o,onPointerDown:e=>{if(0!==e.button||o)return;e.preventDefault(),u();const r=e.shiftKey;l.current(r);const t=e.currentTarget.ownerDocument.defaultView??window;t.addEventListener("pointerup",u),c.current={off:()=>t.removeEventListener("pointerup",u),wait:setTimeout(()=>{c.current.every=setInterval(()=>l.current(r),60)},400)}},onPointerLeave:u,onPointerCancel:u,onClick:e=>{0===e.detail&&l.current(e.shiftKey)}};return r?/* @__PURE__ */m("button",{type:"button",...v,className:"flex min-h-0 flex-1 items-center justify-center text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900 disabled:cursor-not-allowed disabled:opacity-40",children:f}):/* @__PURE__ */m(t,{size:"sm",...v,children:f})}var g=l(function({value:t,onChange:n,min:l,max:g,precision:x,step:w,shiftStep:k,disabled:N,readOnly:j,invalid:E,placeholder:D,size:C,prefix:F,suffix:M,id:B,name:K,className:O="",onBlur:P,onFocus:S,steppers:U,stepFrom:W,snap:T=!1,allowEmpty:$=!0,appearance:z="box",display:L,reportWhileTyping:V=!0,onRevert:Y,"aria-label":I,"aria-labelledby":R,"aria-describedby":A,auto:H,...J},Q){const X="bare"===z,Z=e(),q=H??Z,G=c(),_="string"==typeof M&&""!==M.trim()?M.trim():void 0,ee=e=>function(e,r){let t=e.trim();if(r&&t.endsWith(r)&&(t=t.slice(0,-r.length).trim()),t=t.replace(",","."),""===t||"-"===t||"."===t||"-."===t)return null;const n=Number(t);return Number.isFinite(n)?n:null}(e,_),re=Object.fromEntries(Object.entries(J).filter(([e])=>e.startsWith("data-"))),te=a(),[ne,ie]=u(()=>b(t,x)),oe=s(ne);oe.current=ne;const ae=s(null),le=d(e=>{ae.current=e,"function"==typeof Q?Q(e):Q&&(Q.current=e)},[Q]),ce=s(t),ue=s(t);ue.current=t;const se=Boolean(N||j),de=U??!1,pe="compact"===de,me=s(null),[fe,ve]=u(0);i(()=>{const e=me.current;if(!e)return;const r=()=>ve(Math.ceil(e.getBoundingClientRect().width));if(r(),"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(r);return t.observe(e),()=>t.disconnect()},[F]),p(()=>{ee(oe.current)!==t&&ie(b(t,x))},[t,x]);const he=e=>{if(se)return;let r=(ee(oe.current)??W??(D?ee(D):null)??0)+e;null!=l&&r<l&&(r=l),null!=g&&r>g&&(r=g);const t=x??String(w??1).split(".")[1]?.length??0;r=Number(r.toFixed(t));const i=b(r,x);oe.current=i,ie(i),n(r),Ne()},be=s(he);be.current=he;const ye=s({unit:w??1,big:k??10*(w??1),locked:se});ye.current={unit:w??1,big:k??10*(w??1),locked:se},p(()=>{const e=ae.current;if(!e)return;const r=r=>{const{unit:t,big:n,locked:i}=ye.current;if(i||e.ownerDocument.activeElement!==e)return;const o=r.deltaY||r.deltaX;o&&(r.preventDefault(),be.current((o<0?1:-1)*(r.shiftKey?n:t)))};return e.addEventListener("wheel",r,{passive:!1}),()=>e.removeEventListener("wheel",r)},[]);const[ge,xe]=u(!1),[we,ke]=u(0),Ne=()=>{X&&ke(e=>e+1)};p(()=>{X&&ge&&document.activeElement===ae.current&&ae.current?.select()},[X,ge,we]);const je=s(!1);p(()=>{if(ge&&!se)return o(e=>{if("Escape"!==e.key||document.activeElement!==ae.current)return!1;const r=ce.current;if(ee(oe.current)===r)return!1;const t=b(r,x);return oe.current=t,ie(t),ue.current!==r&&(Y??n)(r),Ne(),!0})},[ge,se,x,n,Y]);const Ee=()=>{const e=ee(oe.current);if(null==e){if(!$){const e=b(ue.current,x);return oe.current=e,ie(e),ue.current}return oe.current="",ie(""),null!==ue.current&&n(null),null}let r=e;const t=x??(T?Math.max(h(w??1),h(l??0)):void 0);T&&(r=function(e,r,t){const n=(e-t)/r;return t+Math.round(n+1e-9*Math.sign(e))*r}(r,w??1,l??0)),null!=l&&r<l&&(r=l),null!=g&&r>g&&(r=g),null!=t&&(r=Number(r.toFixed(t)));const i=b(r,x);return oe.current=i,ie(i),r===e&&r===ue.current||n(r),r},De=/* @__PURE__ */m("input",{ref:le,id:B,"data-number-input":"",name:K,type:"text",inputMode:0===x?"numeric":"decimal",value:!ge&&L?L(t):ne,disabled:N,readOnly:j,placeholder:D,step:w,role:"spinbutton","aria-valuenow":t??void 0,"aria-valuemin":l,"aria-valuemax":g,"aria-valuetext":null==t?D||void 0:`${b(t,x)}${X&&_?_:""}`,"aria-describedby":[A,q?G:void 0].filter(Boolean).join(" ")||void 0,"data-appearance":X?"bare":void 0,...re,autoComplete:X?"off":void 0,spellCheck:!X&&void 0,"aria-invalid":E||void 0,"aria-label":I,"aria-labelledby":R,onChange:e=>(e=>{if(j)return;const r=_&&e.trimEnd().endsWith(_)?e.trimEnd().slice(0,-_.length).trimEnd():e;if(""!==r&&!/^-?\d*[.,]?\d*$/.test(r))return;if(ie(e),!V)return;const t=ee(e);(null!==t||$)&&n(t)})(e.target.value),onKeyDown:e=>{if("Enter"===e.key&&!se)return ce.current=Ee(),void Ne();const r=w??1,t=k??10*r,n="ArrowUp"===e.key?e.shiftKey?t:r:"ArrowDown"===e.key?-(e.shiftKey?t:r):"PageUp"===e.key?10*r:"PageDown"===e.key?10*-r:null;null===n||se||(e.preventDefault(),he(n))},onFocus:()=>{ce.current=ue.current,xe(!0),je.current=!0,S?.()},onMouseUp:X?e=>{je.current&&(je.current=!1,e.preventDefault())}:void 0,onBlur:()=>{xe(!1),je.current=!1,Ee(),P?.()},className:X?["block min-w-0 m-0 rounded-(--radius-control) border-0 p-0 text-center tabular-nums","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",ge?"bg-surface":"bg-transparent",se?"cursor-default":"cursor-text",O].filter(Boolean).join(" "):r({invalid:E,size:C,readOnly:j,auto:q,className:[F?"pl-[max(var(--space-24),calc(var(--space-control-x-sm)+var(--rosh-number-prefix-width)+var(--space-icon-gap-sm)))]":"",pe?M?"pr-10":"pr-6":de?M?"pr-24":"pr-16":M?"pr-10":"","text-left tabular-nums",O].filter(Boolean).join(" ")})}),Ce=q?/* @__PURE__ */m("span",{id:G,hidden:!0,children:te.settingView.auto}):null;if(X||!F&&!M&&!de)return Ce?/* @__PURE__ */f(v,{children:[De,Ce]}):De;const Fe=ee(ne);/* @__PURE__ */
|
|
2
|
+
return f("div",{className:"relative","data-number-box":"",style:F?{"--rosh-number-prefix-width":`${fe}px`}:void 0,children:[F&&/* @__PURE__ */m("span",{ref:me,className:"pointer-events-none absolute left-(--space-control-x-sm) top-1/2 -translate-y-1/2 whitespace-nowrap text-sm text-ink-faint",children:F}),De,Ce,M&&/* @__PURE__ */m("span",{className:`pointer-events-none absolute ${pe?"right-6":de?"right-16":"right-3"} top-1/2 -translate-y-1/2 text-xs text-ink-faint`,children:M}),de&&(()=>{const e=/* @__PURE__ */m(y,{dir:-1,compact:pe,label:te.number.decrease,disabled:se||null!=l&&null!=Fe&&Fe<=l,onStep:e=>be.current(-(e?k??10*(w??1):w??1))}),r=/* @__PURE__ */m(y,{dir:1,compact:pe,label:te.number.increase,disabled:se||null!=g&&null!=Fe&&Fe>=g,onStep:e=>be.current(e?k??10*(w??1):w??1)});/* @__PURE__ */
|
|
3
3
|
return f("span",pe?{"data-steppers":"compact",className:"absolute inset-y-px right-px flex w-4 flex-col overflow-hidden rounded-r-(--radius-control)",children:[r,e]}:{className:"absolute right-1 top-1/2 flex -translate-y-1/2 items-center gap-0.5",children:[e,r]})})()]})});export{g as InputNumber_default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{useOverlayTarget as e,usePopupAnchor as r,usePanelPosition as i,OverlayLayerProvider as t}from"./chunk-3DVNXNTF.js";import{useDiscardGuard as l}from"./chunk-YOXR3VKO.js";import{dialogA11y as a}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as o}from"./chunk-7QSDPSXP.js";import{useFocusTrap as n,useScrollLock as s}from"./chunk-CDAJKLGL.js";import{Icon as d}from"./chunk-7V32O5NF.js";import{Z_LAYERS as c}from"./chunk-62LW225J.js";import{useHydrated as m}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as u}from"./chunk-TWVUQUUD.js";import{useShellStrings as p}from"./chunk-5YP7MFPK.js";import{useRef as f,useId as h,useState as x,useEffect as v}from"react";import{createPortal as b}from"react-dom";import{jsxs as y,Fragment as g,jsx as k}from"react/jsx-runtime";var N={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-4xl","2xl":"max-w-6xl"};function j({open:j,onClose:w,title:C,description:D,role:V="dialog",children:W,footer:F,blocking:L=!1,size:P="md",aside:T=!1,dirty:J=!1,initialFocus:K,"aria-label":O,"aria-labelledby":U,"aria-describedby":X,className:Y=""}){const $=f(null),z=h(),A=h(),G=!L,I=h(),Q=p().dialog,S=e(m()),[B,H]=x(null),M=l({open:j,dirty:J,onClose:w,title:C,layer:B}),R=f(null),Z=r(j&&null!==S,R),q=i(Z,$);if(o(j),n($,j&&null!==S,K),s(j),v(()=>{if(j)return u(()=>(L||M(),!0),()=>$.current)},[j,L,M]),!j||!S)return null;/* @__PURE__ */
|
|
2
|
+
return y(g,{children:[/* @__PURE__ */k("span",{ref:R,hidden:!0,"data-popup-anchor":""}),b(
|
|
3
|
+
/* @__PURE__ */k(t,{value:B,children:/* @__PURE__ */y("div",{ref:H,className:"fixed inset-0"+(T?" pointer-events-none opacity-0":""),style:{zIndex:c.overlay},role:"presentation","data-overlay-layer":"","data-aside":T?"":void 0,children:[
|
|
4
|
+
/* @__PURE__ */k("div",{className:"fixed inset-0 bg-black/30","aria-hidden":"true"}),
|
|
5
|
+
/* @__PURE__ */k("div",{className:Z?"fixed inset-0":"fixed inset-0 flex items-center justify-center p-4",onClick:L?void 0:e=>{e.target===e.currentTarget&&M()},children:/* @__PURE__ */y("div",{ref:$,"data-popup-panel":"",style:Z?{left:q?.left??0,top:q?.top??0,visibility:q?void 0:"hidden"}:void 0,...a({role:V,modal:!0,titleId:C?I:void 0,labelledBy:U,label:O}),"aria-describedby":X??(D?A:W?z:void 0),className:`${Z?"absolute max-h-[calc(100%-2rem)] w-[calc(100%-2rem)]":"relative max-h-full w-full"} ${N[P]} overflow-y-auto overscroll-contain rounded-(--radius-card) bg-white p-6 shadow-xl ${Y}`.trim(),children:[C&&/* @__PURE__ */k("h2",{id:I,className:(G?"pr-8 ":"")+"text-base font-semibold text-gray-900",children:C}),D&&/* @__PURE__ */k("p",{id:A,className:((C?"mt-1":G?"pr-8":"")+" text-sm text-gray-500").trim(),children:D}),W&&/* @__PURE__ */k("div",{id:z,className:"mt-2 text-sm text-gray-600",children:W}),F&&/* @__PURE__ */k("div",{className:"mt-6 flex flex-wrap justify-end gap-3",children:F}),G&&/* @__PURE__ */k("button",{type:"button",onClick:M,"aria-label":Q.close,className:"absolute right-3 top-3 rounded-(--radius-control) p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */k(d,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})]})})]})}),S)]})}export{j as Dialog};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Sparkline as e}from"./chunk-CKCDGSTC.js";import{STATUS_VARS as t,resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as r,useShellLocale as n}from"./chunk-
|
|
1
|
+
import{Sparkline as e}from"./chunk-CKCDGSTC.js";import{STATUS_VARS as t,resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as r,useShellLocale as n}from"./chunk-5YP7MFPK.js";import{formatPlain as l}from"./chunk-C3QOHMR6.js";import{jsxs as s,jsx as o}from"react/jsx-runtime";var d={up:{glyph:"▲",word:"trendUp"},down:{glyph:"▼",word:"trendDown"},flat:{glyph:"■",word:"trendFlat"}};function i({label:i,value:m,unit:c,delta:h,deltaTone:p,trend:u,trendTone:g,footnote:x,className:f}){const y=r().charts,w=n(),N=null==h?null:h>0?"up":h<0?"down":"flat",b=p?t[p]:void 0,k=g?t[g]:a(0);/* @__PURE__ */
|
|
2
2
|
return s("div",{className:`flex flex-col gap-0.5 rounded-lg border border-gray-200 bg-white p-4 ${f??""}`,children:[
|
|
3
3
|
/* @__PURE__ */o("span",{className:"text-xs font-medium uppercase tracking-wide text-gray-500",children:i}),
|
|
4
4
|
/* @__PURE__ */s("span",{className:"flex items-baseline gap-2",children:[
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{buildQuerySections as e,buildEmptySections as t,flattenRows as r,DEFAULT_MAGNIFIER as n,stepIndex as a,nextGroupIndex as s,SEE_ALL_ICON as l,resultTypeKey as o}from"./chunk-WGRS6QBT.js";import{useDismissPopupsOnOpen as i}from"./chunk-7QSDPSXP.js";import{SpinnerRing as c,LoadingSpinner as d}from"./chunk-R2VKEMZH.js";import{Z_LAYERS as u}from"./chunk-62LW225J.js";import{useShellStrings as p}from"./chunk-
|
|
1
|
+
import{buildQuerySections as e,buildEmptySections as t,flattenRows as r,DEFAULT_MAGNIFIER as n,stepIndex as a,nextGroupIndex as s,SEE_ALL_ICON as l,resultTypeKey as o}from"./chunk-WGRS6QBT.js";import{useDismissPopupsOnOpen as i}from"./chunk-7QSDPSXP.js";import{SpinnerRing as c,LoadingSpinner as d}from"./chunk-R2VKEMZH.js";import{Z_LAYERS as u}from"./chunk-62LW225J.js";import{useShellStrings as p}from"./chunk-5YP7MFPK.js";import{glassStyle as m}from"./chunk-5FYDNH4Y.js";import{useState as h,useRef as f,useEffect as y,useMemo as g,useId as x,useCallback as b}from"react";import{createPortal as k}from"react-dom";import{jsxs as v,jsx as w}from"react/jsx-runtime";function N(e){if(Array.isArray(e))return{results:e,truncatedTypes:[]};if(e&&"object"==typeof e&&Array.isArray(e.results)){const{results:t,truncatedTypes:r}=e;return{results:t,truncatedTypes:Array.isArray(r)?r:[]}}return{results:[],truncatedTypes:[]}}var A=[];function L(e,t,r){const[n,a]=h([]),[s,l]=h(A),[o,i]=h(!1),[c,d]=h("none"),u=f(function(){let e=0,t=null;const r=()=>{e+=1,t?.abort(),t=null};return{begin:()=>{r();const n=e,a=new AbortController;return t=a,{signal:a.signal,isCurrent:()=>n===e}},cancel:r}}());y(()=>{const n=u.current;if(e.length<r||!t||0===t.length)return n.cancel(),a(e=>0===e.length?e:[]),l(A),d("none"),void i(!1);i(!0);const s=setTimeout(async()=>{const r=n.begin(),s=await async function(e,t,r){const n=await Promise.all(e.map(async e=>{try{return{failed:!1,...N(await e(t,{signal:r}))}}catch(e){const t=r.aborted||function(e){if(!e||"object"!=typeof e)return!1;const{name:t,code:r}=e;return"AbortError"===t||"CanceledError"===t||"ERR_CANCELED"===r}(e);return{failed:!t,results:[],truncatedTypes:[]}}}));return{results:n.flatMap(e=>e.results),truncatedTypes:Array.from(new Set(n.flatMap(e=>e.truncatedTypes))),failed:n.filter(e=>e.failed).length}}(t,e,r.signal);r.isCurrent()&&(a(s.results),l(s.truncatedTypes),d(0===s.failed?"none":s.failed>=t.length?"all":"some"),i(!1))},250);return()=>{clearTimeout(s),n.cancel()}},[e,t,r]);return{results:n,truncatedTypes:s,loading:o,failure:c,reset:b(()=>{u.current.cancel(),a(e=>0===e.length?e:[]),l(A),d("none"),i(!1)},[])}}var C=(e,t)=>`${e}-opt-${t}`;function E(e,t){if("seeAll"===e.kind)return l;if("action"===e.kind)return e.icon??n;if(e.icon)return e.icon;const r=t?.[o(e.result)];return r||n}function T({sections:e,activeIdx:t,listId:r,label:n,typeIcons:a,groupCount:s,groupLabel:l,onHover:o,onPick:i}){let c=0;/* @__PURE__ */
|
|
2
2
|
return w("div",{id:r,role:"listbox","aria-label":n,className:"py-1",children:e.map(e=>/* @__PURE__ */v("div",{role:"group","aria-label":l(e.title,e.count,!!e.truncated),children:[
|
|
3
3
|
/* @__PURE__ */v("div",{"aria-hidden":"true",className:"flex items-center justify-between px-4 pt-2 pb-1 text-2xs font-semibold uppercase tracking-wide text-ink-faintest",children:[
|
|
4
4
|
/* @__PURE__ */w("span",{children:e.title}),
|
|
@@ -6,22 +6,22 @@ return w("div",{id:r,role:"listbox","aria-label":n,className:"py-1",children:e.m
|
|
|
6
6
|
return v("div",{id:C(r,n),role:"option","aria-selected":s,className:"flex items-center gap-3 w-full px-4 py-3 text-left cursor-pointer transition-colors "+(s?"bg-blue-50":"hover:bg-gray-50"),onMouseDown:e=>e.preventDefault(),onClick:()=>i(e),onMouseEnter:()=>o(n),children:[
|
|
7
7
|
/* @__PURE__ */w("svg",{className:"h-4 w-4 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:/* @__PURE__ */w("path",{strokeLinecap:"round",strokeLinejoin:"round",d:E(e,a)})}),
|
|
8
8
|
/* @__PURE__ */v("div",{className:"flex-1 min-w-0",children:[
|
|
9
|
-
/* @__PURE__ */w("p",{className:"text-sm font-medium truncate "+(u?"text-blue-600":"text-gray-900"),children:e.label}),d&&/* @__PURE__ */w("p",{className:"text-xs text-gray-400 truncate",children:d})]}),l&&/* @__PURE__ */w("span",{className:"shrink-0 rounded-full bg-gray-100 px-2 py-0.5 text-3xs font-medium text-ink-faint",children:l})]},e.key)})]},e.key))})}var j="react-os-shell:open-global-search";function D(){"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(j))}function I({providers:l,typeIcons:o,typeLabels:N,listRoutes:A,placeholder:E,quickActions:D,onSelect:I,recent:K,onRecord:
|
|
10
|
-
/* @__PURE__ */v("div",{"data-global-search":"",className:"fixed inset-0 flex items-start justify-center pt-[15vh]",style:{zIndex:u.overlay},onClick:()=>
|
|
9
|
+
/* @__PURE__ */w("p",{className:"text-sm font-medium truncate "+(u?"text-blue-600":"text-gray-900"),children:e.label}),d&&/* @__PURE__ */w("p",{className:"text-xs text-gray-400 truncate",children:d})]}),l&&/* @__PURE__ */w("span",{className:"shrink-0 rounded-full bg-gray-100 px-2 py-0.5 text-3xs font-medium text-ink-faint",children:l})]},e.key)})]},e.key))})}var j="react-os-shell:open-global-search";function D(){"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(j))}function I({providers:l,typeIcons:o,typeLabels:N,listRoutes:A,placeholder:E,quickActions:D,onSelect:I,recent:K,onRecord:P,favorites:M,hotkey:R=!0}={}){const S=p().search,$=E??S.placeholder,[B,F]=h(!1),[H,W]=h(""),[z,Y]=h(0),G=f(null),{results:Q,truncatedTypes:V,loading:q,failure:J,reset:U}=L(H,l,2);y(()=>{const e=e=>{R&&!e.defaultPrevented&&(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),F(e=>!e)),"Escape"===e.key&&B&&F(!1)},t=()=>F(!0);return window.addEventListener("keydown",e),window.addEventListener(j,t),()=>{window.removeEventListener("keydown",e),window.removeEventListener(j,t)}},[B,R]),i(B);const[X,Z]=h(!1);B!==X&&(Z(B),B&&(W(""),Y(0),U())),y(()=>{B?setTimeout(()=>G.current?.focus(),50):W("")},[B]),y(()=>{Y(0)},[Q]);const _=H.length>=2,O=g(()=>_?e(Q,D,H,S.actions,{truncatedTypes:V,listRoutes:A,typeLabels:N,seeAllLabel:S.seeAll}):t({recent:K,favorites:M,actions:D,typeLabels:N},S),[_,Q,V,A,N,D,H,K,M,S]),ee=g(()=>r(O),[O]),te=Math.min(z,Math.max(ee.length-1,0)),re=x(),ne=ee.length>0;y(()=>{B&&0!==ee.length&&document.getElementById(C(re,te))?.scrollIntoView?.({block:"nearest"})},[B,te,ee.length,re]);const ae=b(e=>{F(!1),"action"!==e.kind?("result"!==e.kind&&"recent"!==e.kind||P?.(e.result),I?.(e.result)):e.action.onSelect()},[I,P]);return B?k(
|
|
10
|
+
/* @__PURE__ */v("div",{"data-global-search":"",className:"fixed inset-0 flex items-start justify-center pt-[15vh]",style:{zIndex:u.overlay},onClick:()=>F(!1),children:[
|
|
11
11
|
/* @__PURE__ */w("div",{"data-global-search-backdrop":"",className:"absolute inset-0 bg-black/50 backdrop-blur-sm"}),
|
|
12
12
|
/* @__PURE__ */v("div",{className:"relative z-10 w-full max-w-xl rounded-(--radius-popup) overflow-hidden",onClick:e=>e.stopPropagation(),style:m(),children:[
|
|
13
13
|
/* @__PURE__ */v("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-gray-200",children:[
|
|
14
14
|
/* @__PURE__ */w("svg",{className:"h-5 w-5 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */w("path",{strokeLinecap:"round",strokeLinejoin:"round",d:n})}),
|
|
15
|
-
/* @__PURE__ */w("input",{ref:G,type:"text",value:
|
|
16
|
-
/* @__PURE__ */w("kbd",{className:"hidden sm:inline-flex items-center rounded border border-line-strong px-2 py-0.5 text-2xs font-medium text-ink-faintest",children:
|
|
17
|
-
/* @__PURE__ */v("div",{className:"max-h-[50vh] overflow-y-auto",children:[
|
|
15
|
+
/* @__PURE__ */w("input",{ref:G,type:"text",value:H,onChange:e=>{W(e.target.value),Y(0)},onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),Y(a(te,1,ee.length))):"ArrowUp"===e.key?(e.preventDefault(),Y(a(te,-1,ee.length))):"Tab"===e.key&&ee.length>0?(e.preventDefault(),Y(s(O.map(e=>e.rows.length),te,e.shiftKey?-1:1))):"Enter"===e.key&&ee[te]&&ae(ee[te])},placeholder:$,role:"combobox","aria-expanded":ne,"aria-controls":ne?re:void 0,"aria-activedescendant":ne?C(re,te):void 0,"aria-autocomplete":"list",className:"flex-1 text-sm bg-transparent border-0 rosh-focus-ring placeholder-gray-400"}),q&&/* @__PURE__ */w("span",{"data-global-search-spinner":"",role:"status","aria-label":S.searching,className:"flex shrink-0",children:/* @__PURE__ */w(c,{className:"h-4 w-4",ink:"text-ink-faint"})}),
|
|
16
|
+
/* @__PURE__ */w("kbd",{className:"hidden sm:inline-flex items-center rounded border border-line-strong px-2 py-0.5 text-2xs font-medium text-ink-faintest",children:S.escBadge})]}),
|
|
17
|
+
/* @__PURE__ */v("div",{className:"max-h-[50vh] overflow-y-auto",children:[q&&0===ee.length&&/* @__PURE__ */w(d,{size:"sm",padding:"py-6",label:S.searching}),!q&&"all"===J&&_&&/* @__PURE__ */w("div",{role:"alert",className:"px-4 py-3 text-center text-sm text-red-600",children:S.searchFailed}),!q&&_&&0===ee.length&&"all"!==J&&/* @__PURE__ */w("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:S.noResults}),ne&&/* @__PURE__ */w(T,{sections:O,activeIdx:te,listId:re,label:S.listLabel,typeIcons:o,groupCount:S.groupCount,groupLabel:S.groupLabel,onHover:Y,onPick:ae}),!q&&"some"===J&&_&&/* @__PURE__ */w("div",{role:"status",className:"px-4 py-2 text-xs text-amber-600",children:S.partialFailure}),!q&&!_&&0===ee.length&&/* @__PURE__ */w("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:S.minChars(2)})]}),
|
|
18
18
|
/* @__PURE__ */v("div",{className:"flex items-center justify-between px-4 py-2 border-t border-line-subtle bg-surface-sunken text-2xs text-ink-faintest",children:[
|
|
19
19
|
/* @__PURE__ */v("div",{className:"flex items-center gap-3",children:[
|
|
20
20
|
/* @__PURE__ */v("span",{className:"flex items-center gap-1",children:[
|
|
21
21
|
/* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:"↑"}),
|
|
22
|
-
/* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:"↓"}),` ${
|
|
22
|
+
/* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:"↓"}),` ${S.navigate}`]}),
|
|
23
23
|
/* @__PURE__ */v("span",{className:"flex items-center gap-1",children:[
|
|
24
|
-
/* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:
|
|
25
|
-
/* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:
|
|
24
|
+
/* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:S.enterKey}),` ${S.open}`]}),O.length>1&&/* @__PURE__ */v("span",{className:"flex items-center gap-1",children:[
|
|
25
|
+
/* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:S.tabKey}),` ${S.nextGroup}`]})]}),
|
|
26
26
|
/* @__PURE__ */v("span",{className:"flex items-center gap-1",children:[
|
|
27
|
-
/* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:
|
|
27
|
+
/* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:S.escKey}),` ${S.close}`]})]})]})]}),document.body):null}export{I as GlobalSearch,D as openGlobalSearch};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{LIGHTBOX_PICTURE_FIT as e,ZoomableImage as t}from"./chunk-CGUMJZUB.js";import{isVideoUrl as r,mediaFileName as n}from"./chunk-VEGZVUHE.js";import{dialogA11y as o}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as a}from"./chunk-7QSDPSXP.js";import{useFocusTrap as l,useScrollLock as i}from"./chunk-CDAJKLGL.js";import{Button_default as c}from"./chunk-7DI3VQCF.js";import{buttonClasses as s}from"./chunk-UQYNPYF4.js";import{Icon as m}from"./chunk-7V32O5NF.js";import{Z_LAYERS as u}from"./chunk-62LW225J.js";import{useHydrated as d}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as f}from"./chunk-TWVUQUUD.js";import{useShellStrings as h}from"./chunk-5YP7MFPK.js";import{useRef as p,useState as x,useCallback as b,useEffect as k}from"react";import{createPortal as g}from"react-dom";import{jsx as v,jsxs as w,Fragment as N}from"react/jsx-runtime";var y=/\.(pdf|docx?|xlsx?|pptx?|csv|txt|zip|rar|7z|dwg|dxf|stp|step|igs|iges)(?:[?#]|$)/i;function j(e){return e.kind?e.kind:r(e.url)?"video":y.test(e.url)?"file":"image"}var C="flex items-center justify-center rounded-full bg-black/60 text-on-accent hover:bg-black/80 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",F=e=>e.stopPropagation();function U({images:r,startIndex:y=0,onClose:U,onIndexChange:D,onOpenFile:L}){const P=h().lightbox,V=d(),$=p(null),z=p(null),[A,I]=x(y),E=r.length,G=V&&E>0,J=b(e=>{if(E<2)return;const t=((A+e)%E+E)%E;I(t),D?.(t)},[A,E,D]);if(a(G),l($,G,z),i(G),k(()=>{if(G)return f(()=>(U(),!0),()=>$.current)},[G,U]),k(()=>{if(!G)return;const e=e=>{"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||e.target?.closest?.("video")||(e.preventDefault(),J("ArrowRight"===e.key?1:-1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[G,J]),!G)return null;const Q=r[Math.min(A,E-1)],W=j(Q),Y=Q.caption||n(Q.url);let M;return M="video"===W?/* @__PURE__ */v("video",{src:Q.url,controls:!0,playsInline:!0,"aria-label":Y,onClick:F,className:`${e} rounded-lg bg-black`}):"file"===W?/* @__PURE__ */w("div",{onClick:F,className:"flex max-w-[calc(100vw-144px)] flex-col items-center gap-3 rounded-lg bg-surface px-10 py-8 text-center text-ink-faint",children:[
|
|
2
|
+
/* @__PURE__ */v(m,{name:"document","aria-hidden":"true",className:"h-10 w-10"}),
|
|
3
|
+
/* @__PURE__ */v("span",{className:"max-w-[60ch] break-all text-sm font-medium text-ink",children:Y}),L?/* @__PURE__ */v(c,{size:"sm",onClick:()=>L(Q),children:P.openFile}):/* @__PURE__ */v("a",{href:Q.url,target:"_blank",rel:"noopener noreferrer",className:s({size:"sm"}),children:P.openFile})]}):/* @__PURE__ */v(t,{src:Q.url,alt:Y,className:`${e} object-contain`,frameClassName:"rounded-lg"}),g(
|
|
4
|
+
/* @__PURE__ */w("div",{ref:$,...o({role:"dialog",modal:!0,label:P.label}),"data-lightbox-backdrop":"",className:"fixed inset-0 flex items-center justify-center bg-black/80",style:{zIndex:u.overlay},onClick:U,children:[M,
|
|
5
|
+
/* @__PURE__ */w("div",{className:"absolute right-4 top-4 flex items-center gap-2",onClick:F,children:[
|
|
6
|
+
/* @__PURE__ */v("span",{className:"rounded bg-black/60 px-2 py-1 text-xs text-on-accent tabular-nums",children:P.counter(A+1,E)}),
|
|
7
|
+
/* @__PURE__ */v("button",{ref:z,type:"button",onClick:U,"aria-label":P.close,className:`${C} h-8 w-8`,children:/* @__PURE__ */v(m,{name:"close","aria-hidden":"true",className:"h-4 w-4"})})]}),E>1&&/* @__PURE__ */w(N,{children:[
|
|
8
|
+
/* @__PURE__ */v("button",{type:"button",onClick:e=>{F(e),J(-1)},"aria-label":P.previous,className:`${C} absolute left-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(m,{name:"chevron-left","aria-hidden":"true",className:"h-5 w-5"})}),
|
|
9
|
+
/* @__PURE__ */v("button",{type:"button",onClick:e=>{F(e),J(1)},"aria-label":P.next,className:`${C} absolute right-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(m,{name:"chevron-right","aria-hidden":"true",className:"h-5 w-5"})})]}),
|
|
10
|
+
/* @__PURE__ */w("div",{className:"absolute inset-x-18 bottom-4 flex items-center justify-center gap-3",onClick:F,children:[
|
|
11
|
+
/* @__PURE__ */v("span",{className:"min-w-0 break-words text-center text-sm text-on-accent/85",children:Y}),"file"!==W&&/* @__PURE__ */v("a",{href:Q.url,target:"_blank",rel:"noopener noreferrer",className:"flex-none text-xs font-medium text-on-accent/70 underline decoration-on-accent/30 underline-offset-2 hover:text-on-accent",children:P.openOriginal})]})]}),document.body)}export{U as ImageLightbox,j as lightboxKind};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{ImageFocusPoint as e}from"./chunk-VZ52KKNA.js";import{Segmented as a}from"./chunk-JQBVSPF5.js";import{FormField as i}from"./chunk-6KBDNYRW.js";import{isVideoUrl as t,mediaPromptLine as o,mediaFileName as r,FilenameBadge as n,BusyOverlay as l,UploadGlyph as s,dropzoneClass as c,zoneFocusClass as d}from"./chunk-VEGZVUHE.js";import{TransferProgress as u}from"./chunk-AHITTM6W.js";import{useFileIntake as m,FileIntakeAlert as h}from"./chunk-ZKBGUDNB.js";import{Icon as p}from"./chunk-7V32O5NF.js";import{useShellStrings as b}from"./chunk-5YP7MFPK.js";import{useState as g,useRef as v,useEffect as f,useId as y}from"react";import{jsxs as k,jsx as N,Fragment as j}from"react/jsx-runtime";var x=["flex h-8 items-center justify-center rounded-(--radius-control) text-(--status-on-solid)","not-disabled:hover:bg-white/10 disabled:cursor-not-allowed disabled:opacity-60","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]"].join(" ");function w({value:w,onChange:L,onPick:F,onFile:R,label:U,hint:C,error:P,required:B,className:K,accept:O="image/*",maxSizeBytes:V,fit:$="cover",height:z=112,placeholder:H,cta:q,acceptHint:A,showFilename:I=!0,allowReplace:S=!0,allowRemove:W=!0,replaceLabel:Z,removeLabel:D,busy:E=!1,busyLabel:G,choosingLabel:M,pickFailedLabel:T,progress:Y,disabled:_=!1,kind:J,onKindChange:Q,focus:X,onFocusChange:ee,focusLabel:ae}){const ie=b().media,te=q??ie.cta,oe=J??(/video/.test(O)&&!/image/.test(O)?"video":"image"),re="string"==typeof D&&D?D:ie.remove,[ne,le]=g(!1),[se,ce]=g(!1),de=v(!0);f(()=>()=>{de.current=!1},[]);const ue=E||ne,me=ne&&!E?M??ie.choosing:G??ie.uploading,he=P??(se?T??ie.pickFailed:void 0),pe=e=>{if(!F)return;ce(!1);const a=F(e);a&&"function"==typeof a.then&&(le(!0),a.then(e=>{de.current&&(le(!1),"string"==typeof e&&e&&L(e))},()=>{de.current&&(le(!1),ce(!0))}))},be=y(),ge=v(null),[ve,fe]=g(null);f(()=>()=>{ge.current&&URL.revokeObjectURL(ge.current)},[]);const ye=_||ue,ke=!!w&&(t(w,O)||w===ve),Ne=H??o(O,ie),je=Z??(ke||"video"===oe?ie.changeVideo:ie.changeImage),xe=e=>{F?pe(e):R?R(e):(e=>{ge.current&&URL.revokeObjectURL(ge.current);const a=URL.createObjectURL(e);ge.current=a,fe(e.type.startsWith("video/")?a:null),L(a)})(e)},we=m({accept:O,maxSizeBytes:V,acceptHint:A,multiple:!1,disabled:ye,onAccept:([e])=>xe(e)}),{dragOver:Le}=we,Fe=()=>{ye||(F?pe():we.open())},Re=w?r(w):"",Ue=!ke&&!!ee,Ce=_||!S&&!W?null:/* @__PURE__ */k("div",{"data-media-bar":"",className:["absolute inset-x-0 bottom-0 flex items-center gap-1 p-1 text-(--status-on-solid)","opacity-0 transition-opacity duration-(--motion-fast)","group-hover/media:opacity-100 group-focus-within/media:opacity-100 [@media(hover:none)]:opacity-100"].join(" "),style:{background:"var(--rosh-media-scrim-button)"},children:[S&&/* @__PURE__ */k("button",{id:Ue?void 0:be,type:"button","aria-labelledby":`${be}-change`,onClick:()=>Fe(),disabled:ue,className:`min-w-0 flex-1 gap-1 px-2 text-sm font-medium ${x}`,children:[
|
|
2
|
+
/* @__PURE__ */N(p,{name:"swap","aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
|
|
3
|
+
/* @__PURE__ */N("span",{id:`${be}-change`,className:"truncate",children:je})]}),W&&/* @__PURE__ */N("button",{type:"button","aria-label":re,onClick:()=>{ge.current&&(URL.revokeObjectURL(ge.current),ge.current=null),fe(null),L("")},disabled:ue,className:`ml-auto w-8 shrink-0 ${x}`,children:/* @__PURE__ */N(p,{name:"trash","aria-hidden":"true",className:"h-4 w-4"})})]}),Pe=/* @__PURE__ */k("div",{...we.zoneProps,"data-media-frame":"",className:["group/media relative overflow-hidden rounded-(--radius-control) border transition-colors",Ue?"":"bg-gray-100",Le?"border-blue-500":"border-line"].join(" "),style:Ue?void 0:{height:z},children:[Ue?
|
|
4
|
+
/* @__PURE__ */N(e,{value:X??"",onChange:e=>ee?.(e),label:ae??ie.focus,image:w,hint:null,id:be,disabled:ye,className:"[&_[data-image-focus-picture]]:rounded-none [&_[data-image-focus-picture]]:border-0"}):ke?/* @__PURE__ */N("video",{src:w??void 0,muted:!0,playsInline:!0,preload:"metadata","aria-label":Re||void 0,className:"h-full w-full",style:{objectFit:$}}):/* @__PURE__ */N("img",{src:w??void 0,alt:Re,className:"h-full w-full",style:{objectFit:$,objectPosition:X||void 0}}),I&&w&&/* @__PURE__ */N(n,{children:Re}),Ce,ue&&/* @__PURE__ */N(l,{label:me,progress:Y,rounded:"rounded-md"})]}),Be=/* @__PURE__ */N("button",{type:"button",id:be,onClick:()=>Fe(),disabled:ye,"aria-label":"string"==typeof Ne?Ne:ie.upload,"aria-busy":ue||void 0,"aria-invalid":!!he||void 0,"aria-required":B||void 0,"aria-describedby":he?`${be}-error`:C?`${be}-hint`:void 0,...we.zoneProps,className:c(Le,ye,d(ye)),style:{minHeight:z},children:ue?/* @__PURE__ */N(u,{state:"busy",verb:me,pct:Y}):/* @__PURE__ */k(j,{children:[
|
|
5
|
+
/* @__PURE__ */N("span",{className:"text-ink-faintest",children:/* @__PURE__ */N(s,{})}),
|
|
6
|
+
/* @__PURE__ */N("span",{className:"px-3 text-xs text-ink-faint",children:Ne}),
|
|
7
|
+
/* @__PURE__ */N("span",{className:"text-sm font-medium text-blue-600",children:te}),A&&/* @__PURE__ */N("span",{className:"text-xs text-ink-faintest",children:A})]})});/* @__PURE__ */
|
|
8
|
+
return k(i,{label:U,htmlFor:be,hint:C,error:he,required:B,className:K,children:[Q&&/* @__PURE__ */N("div",{"data-media-kind":"",className:"mb-2",children:/* @__PURE__ */N(a,{value:oe,onChange:e=>Q(e),options:[{value:"image",label:ie.image,icon:/* @__PURE__ */N(p,{name:"image","aria-hidden":"true",className:"h-4 w-4"}),disabled:ye},{value:"video",label:ie.video,icon:/* @__PURE__ */N(p,{name:"play","aria-hidden":"true",className:"h-4 w-4"}),disabled:ye}],block:!0,size:"md",label:"string"==typeof U&&U?U:ie.upload})}),w?Pe:Be,!F&&/* @__PURE__ */N("input",{...we.inputProps}),
|
|
9
|
+
/* @__PURE__ */N(h,{rejections:we.rejections})]})}export{w as MediaUploadField};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-7V32O5NF.js";import{SpinnerRing as t}from"./chunk-R2VKEMZH.js";import{useState as a,useId as r,Children as s,isValidElement as i}from"react";import{jsx as n,jsxs as l}from"react/jsx-runtime";function c({summary:t,busy:c=!1,open:o,onOpenChange:d,label:m="Steps",className:u="",children:p}){const[f,h]=a(null),g=r(),x=o??f??c;return 1===s.toArray(p).filter(i).length?/* @__PURE__ */n("div",{className:`text-xs text-gray-500 ${u}`.trim(),children:/* @__PURE__ */n("ol",{"aria-label":m,children:p})}):/* @__PURE__ */l("div",{className:`text-xs text-gray-500 ${u}`.trim(),children:[
|
|
2
2
|
/* @__PURE__ */l("button",{type:"button",onClick:()=>{h(!x),d?.(!x)},"aria-expanded":x,"aria-controls":x?g:void 0,className:"flex w-full items-center gap-2 rounded text-left hover:text-gray-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-blue-600",children:[
|
|
3
3
|
/* @__PURE__ */n(e,{name:"chevron-right",size:12,className:"shrink-0 motion-safe:transition-transform "+(x?"rotate-90":"")}),
|
|
4
4
|
/* @__PURE__ */n("span",{"aria-live":"polite",className:"min-w-0 flex-1 truncate",children:t})]}),x&&/* @__PURE__ */n("ol",{id:g,"aria-label":m,className:"mt-2 ml-2 space-y-2 border-l border-gray-200 pl-3",children:p})]})}var o={pending:"text-gray-400",active:"text-gray-800",complete:"text-gray-600",failed:"text-red-600",stopped:"text-gray-500",waiting:"text-amber-700",skipped:"text-gray-400"},d={pending:"Pending",active:"In progress",complete:"Done",failed:"Failed",stopped:"Stopped",waiting:"Waiting for you",skipped:"Skipped"};function m({status:a}){switch(a){case"active":/* @__PURE__ */
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{CartesianPlot as t}from"./chunk-3VR5BOD4.js";import{binValues as o}from"./chunk-2JWPNR2U.js";import{ChartTooltip as r}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as e,useShellLocale as i}from"./chunk-5YP7MFPK.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 v=e().charts,w=i(),A=d??(t=>Number.isInteger(t)?m(t,w):n(t,1,w)),L=x??(t=>m(t,w)),M=g??v.countAxis,N=k??v.distribution,P=h??o(c??[],s),R=a(0,b,f),C=P.map(t=>A(t.from)),F=P.map(t=>t.count);/* @__PURE__ */
|
|
2
|
+
return l(t,{labels:C,values:F,height:u,width:p,bandPadding:0,xTickAnchor:"start",formatValue:L,yAxisLabel:M,className:y,emptyLabel:j,ariaLabel:v.histogram(N,P.length,(c??[]).length),tooltip:t=>/* @__PURE__ */l(r,{title:`${A(P[t].from)} – ${A(P[t].to)}`,rows:[{key:"count",label:v.observations,color:R,value:L(P[t].count)}]}),children:({x:t,y:o,bottom:r,active:a})=>/* @__PURE__ */l("g",{children:P.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:R,fillOpacity:null===a||a===i?.85:.42},i))})})}export{c as HistogramChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useShellLocale as e}from"./chunk-
|
|
1
|
+
import{useShellLocale as e}from"./chunk-5YP7MFPK.js";import{formatPlain as t}from"./chunk-C3QOHMR6.js";import{useState as r,useEffect as n,Children as i}from"react";import{jsxs as l,jsx as a}from"react/jsx-runtime";var s={xs:24,sm:32,md:40,lg:56},o={online:"bg-green-500",offline:"bg-gray-400",busy:"bg-red-500",away:"bg-amber-500"};function m(e){if(!e)return"?";const t=e.trim().split(/\s+/).filter(Boolean);if(0===t.length)return"?";return((t[0][0]??"")+(t.length>1?t[t.length-1][0]:"")).toUpperCase()||"?"}function c({src:e,name:t,size:i="md",status:c,className:u=""}){const h=s[i],f=Math.max(8,Math.round(.28*h)),[d,g]=r(!1);n(()=>{g(!1)},[e]);const y=Boolean(e)&&!d;
|
|
2
2
|
/* @__PURE__ */
|
|
3
3
|
return l("span",{className:`relative inline-flex shrink-0 ${u}`.trim(),style:{width:h,height:h},...t?{role:"img","aria-label":t}:{"aria-hidden":!0},children:[y?/* @__PURE__ */a("img",{src:e,alt:"",onError:()=>g(!0),className:"h-full w-full rounded-full object-cover"}):/* @__PURE__ */a("span",{className:"flex h-full w-full items-center justify-center rounded-full bg-gray-100 font-medium text-gray-600",style:{fontSize:Math.round(.4*h)},children:m(t)}),c&&/* @__PURE__ */a("span",{className:`absolute bottom-0 right-0 rounded-full ring-2 ring-white ${o[c]}`,style:{width:f,height:f}})]})}function u({children:r,max:n,size:o="md",className:m=""}){const c=i.toArray(r),u=n?c.slice(0,n):c,h=n?c.length-u.length:0,f=s[o],d=Math.round(.3*f),g=e();/* @__PURE__ */
|
|
4
4
|
return l("div",{className:`flex items-center ${m}`.trim(),children:[u.map((e,t)=>/* @__PURE__ */a("span",{className:"rounded-full ring-2 ring-white",style:{marginLeft:0===t?0:-d},children:e},t)),h>0&&/* @__PURE__ */l("span",{className:"flex items-center justify-center rounded-full bg-gray-200 font-medium text-gray-600 ring-2 ring-white",style:{width:f,height:f,marginLeft:-d,fontSize:Math.round(.36*f)},children:["+",t(h,g)]})]})}export{c as Avatar,u as AvatarGroup};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{SidebarBarContext as e,SidebarSheetContext as l}from"./chunk-QWK6DRSN.js";import{readStoredWidth as r,ResizeHandle as t}from"./chunk-
|
|
2
|
-
/* @__PURE__ */f("div",{className:`flex h-full flex-col ${
|
|
3
|
-
/* @__PURE__ */p(t,{side:m,width:
|
|
1
|
+
import{SidebarBarContext as e,SidebarSheetContext as l}from"./chunk-QWK6DRSN.js";import{readStoredWidth as r,ResizeHandle as t}from"./chunk-JG26ICX6.js";import{useIsPhone as a}from"./chunk-UGTRSRIW.js";import{Icon as n}from"./chunk-7V32O5NF.js";import{useBrowserState as o}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-5YP7MFPK.js";import{useState as s,useRef as c,useReducer as d,useMemo as h,Fragment as u,useEffect as m}from"react";import{jsxs as f,jsx as p}from"react/jsx-runtime";var b=(e,l,r)=>Math.min(Math.max(e,l),r);function x({sidebar:e,sidebarTop:l,sidebarBottom:n,children:u,side:m="left",storageKey:x,defaultWidth:N=256,minWidth:w=180,maxWidth:k=480,className:y="",sidebarClassName:C=("right"===m?"border-l border-gray-200 bg-gray-50":"border-r border-gray-200 bg-gray-50"),contentClassName:P="bg-white"}){const j="right"===m,z=i().sidebar,O=a(),W=function(){const[e,l]=s(!1),r=c(null),t=c(/* @__PURE__ */new Map),[,a]=d(e=>e+1,0),n=h(()=>({report(e,l,r){const n={label:l,el:r};return t.current.set(e,n),a(),()=>{t.current.get(e)===n&&(t.current.delete(e),a())}}}),[]);return{api:n,open:e,setOpen:l,current:()=>[...t.current.values()].sort((e,l)=>e.el&&l.el&&e.el.compareDocumentPosition(l.el)&Node.DOCUMENT_POSITION_PRECEDING?1:-1).map(e=>e.label()),trigger:r}}(),[D,I]=o(()=>(x?r(x,w,k):null)??b(N,w,k),b(N,w,k)),E=null!=l||null!=n,K=/* @__PURE__ */f("div",{className:"relative flex h-full shrink-0 flex-col",style:{width:D},children:[
|
|
2
|
+
/* @__PURE__ */f("div",{className:`flex h-full flex-col ${E?"overflow-hidden":"overflow-y-auto"} ${C}`,children:[null!=l&&/* @__PURE__ */p("div",{className:"flex shrink-0 flex-col gap-2 px-2 pt-3 pb-2",children:l}),E?/* @__PURE__ */p("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e}):e,null!=n&&/* @__PURE__ */p("div",{className:"mt-auto flex shrink-0 flex-col gap-2 border-t border-gray-200 px-2 py-3",children:n})]}),
|
|
3
|
+
/* @__PURE__ */p(t,{side:m,width:D,onResize:I,min:w,max:k,defaultWidth:b(N,w,k),storageKey:x,hint:z.resize})]}),M=/* @__PURE__ */p("div",{className:`flex min-w-0 flex-1 flex-col ${P}`,children:u});/* @__PURE__ */
|
|
4
4
|
return f("div",O?{className:`relative flex h-full w-full flex-col overflow-hidden ${y}`,children:[
|
|
5
|
-
/* @__PURE__ */p(g,{phone:W,top:l,fallback:
|
|
6
|
-
/* @__PURE__ */p(v,{phone:W,bottom:n,label:
|
|
5
|
+
/* @__PURE__ */p(g,{phone:W,top:l,fallback:z.sections}),M,
|
|
6
|
+
/* @__PURE__ */p(v,{phone:W,bottom:n,label:z.sections,closeLabel:z.closeSections,children:e})]}:{className:`flex h-full w-full overflow-hidden ${y}`,children:[j?null:K,M,j?K:null]})}function g({phone:l,top:r,fallback:t}){const a=l.current();/* @__PURE__ */
|
|
7
7
|
return f("div",{"data-sidebar-section-bar":!0,className:"flex h-11 shrink-0 items-center gap-2 border-b border-gray-200 bg-white px-3",children:[
|
|
8
8
|
/* @__PURE__ */f("button",{ref:l.trigger,type:"button","aria-haspopup":"dialog","aria-expanded":l.open,onClick:()=>l.setOpen(!0),className:"flex h-8 min-w-0 flex-1 items-center gap-1 text-left text-sm font-semibold text-gray-900",children:[
|
|
9
9
|
/* @__PURE__ */p("span",{className:"min-w-0 truncate",children:0===a.length?t:a.map((e,l)=>/* @__PURE__ */f(u,{children:[l>0&&" · ",e]},l))}),
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{fromDateKey as e,toMonthKey as t,toDateKey as r,fromMonthKey as a}from"./chunk-2HMNOLKX.js";import{calendarNames as n,firstDayOfWeek as o}from"./chunk-Y3JW2GW5.js";import{Icon as l}from"./chunk-
|
|
2
|
-
return m("div",{className:
|
|
1
|
+
import{fromDateKey as e,toMonthKey as t,toDateKey as r,fromMonthKey as a}from"./chunk-2HMNOLKX.js";import{calendarNames as n,firstDayOfWeek as o}from"./chunk-Y3JW2GW5.js";import{Icon as l}from"./chunk-7V32O5NF.js";import{useBrowserValue as i}from"./chunk-D65T4H6J.js";import{useShellStrings as s,useShellLocale as c}from"./chunk-5YP7MFPK.js";import{useMemo as g,useState as u,useRef as d,useEffect as h}from"react";import{jsxs as m,jsx as f,Fragment as b}from"react/jsx-runtime";var y="grid grid-cols-[repeat(7,minmax(0,40px))] sm:grid-cols-[repeat(7,minmax(0,32px))] justify-center gap-1";var v=()=>r(/* @__PURE__ */new Date);var p=(e,t)=>new Date(e.getFullYear(),e.getMonth(),e.getDate()+t),x=(e,t)=>{const r=new Date(e.getFullYear(),e.getMonth()+t,1),a=new Date(r.getFullYear(),r.getMonth()+1,0).getDate();return new Date(r.getFullYear(),r.getMonth(),Math.min(e.getDate(),a))};function w({value:w,endValue:M,mode:D="single",onSelect:N,min:Y,max:k,month:F,defaultMonth:j,onMonthChange:A,weekStartsOn:C,quickJump:P=!0,markedDates:S,readOnly:K=!1,"aria-label":q,className:O=""}){const W=g(()=>new Set(S??[]),[S]),H=e(w),J=i(v,null),$=e(J),E=s().calendar,L=c(),U=n(L),V=i(()=>o(L),0),B=C??V,G=()=>{if(!$)return null;const e=t($);return Y&&e<Y.slice(0,7)?Y.slice(0,7):k&&e>k.slice(0,7)?k.slice(0,7):e},[I,R]=u(()=>j||(H?t(H):G())),T=F??I??G(),X=null===T?null:function(e,t){return a(e)??t}(T,$),[z,Q]=u(()=>w??J),Z=d(null),_=d(!1),[ee,te]=u("days"),re=g(()=>X?function(e,t){const r=new Date(e.getFullYear(),e.getMonth(),1),a=(r.getDay()-t+7)%7,n=new Date(r.getFullYear(),r.getMonth(),1-a);return Array.from({length:42},(e,t)=>new Date(n.getFullYear(),n.getMonth(),n.getDate()+t))}(X,B):[],[T,B]),ae=e=>!!Y&&e<Y||!!k&&e>k,ne=z??J,oe=re.some(e=>r(e)===ne),le=X?re.find(e=>e.getMonth()===X.getMonth())??re[0]:null,ie=oe&&ne?ne:le?r(le):"";if(h(()=>{_.current&&(_.current=!1,Z.current?.querySelector('[data-active="true"]')?.focus())},[ie,T]),!X)/* @__PURE__ */
|
|
2
|
+
return m("div",{className:O,"aria-hidden":"true","data-calendar-pending":"",children:[
|
|
3
3
|
/* @__PURE__ */f("div",{className:"mb-2 h-6"}),
|
|
4
|
-
/* @__PURE__ */f("div",{className:"space-y-1",children:Array.from({length:7},(e,t)=>/* @__PURE__ */f("div",0===t?{className:"py-1 text-xs",children:" "}:{className:y,children:/* @__PURE__ */f("span",{className:"aspect-square"})},t))})]});const se=e=>"years"===ee?new Date(
|
|
5
|
-
return m("div",{className:
|
|
4
|
+
/* @__PURE__ */f("div",{className:"space-y-1",children:Array.from({length:7},(e,t)=>/* @__PURE__ */f("div",0===t?{className:"py-1 text-xs",children:" "}:{className:y,children:/* @__PURE__ */f("span",{className:"aspect-square"})},t))})]});const se=e=>"years"===ee?new Date(X.getFullYear()+12*e,X.getMonth(),1):"months"===ee?new Date(X.getFullYear()+e,X.getMonth(),1):x(X,e),ce=e=>{const r=t(e);void 0===F&&R(r),A?.(r)},ge=q??U.monthYear(X.getFullYear(),X.getMonth());/* @__PURE__ */
|
|
5
|
+
return m("div",{className:O,children:[
|
|
6
6
|
/* @__PURE__ */m("div",{className:"mb-2 flex items-center justify-between px-1",children:[
|
|
7
|
-
/* @__PURE__ */f("button",{type:"button","aria-label":"years"===ee?
|
|
8
|
-
/* @__PURE__ */f("div",{"aria-live":"polite",className:"flex items-center gap-1 text-sm font-semibold text-gray-800",children:
|
|
9
|
-
/* @__PURE__ */f("button",{type:"button","aria-label":
|
|
10
|
-
/* @__PURE__ */f("button",{type:"button","aria-label":"years"===ee?
|
|
11
|
-
/* @__PURE__ */m("div",{ref:Z,role:"grid","aria-label":ge,className:"space-y-1","aria-readonly":
|
|
12
|
-
/* @__PURE__ */f("div",{role:"row",className:`${y} text-center text-xs font-medium text-ink-faint`,children:Array.from({length:7},(e,t)=>(t+
|
|
13
|
-
/* @__PURE__ */f("div",{role:"columnheader","aria-label":
|
|
14
|
-
return f("div",{role:"gridcell","aria-selected":n,"aria-label":
|
|
7
|
+
/* @__PURE__ */f("button",{type:"button","aria-label":"years"===ee?E.previousYears:"months"===ee?E.previousYear:E.previousMonth,onClick:()=>ce(se(-1)),className:"rounded-full p-1 text-gray-600 hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */f(l,{name:"chevron-left",className:"h-4 w-4",strokeWidth:"2","aria-hidden":"true"})}),
|
|
8
|
+
/* @__PURE__ */f("div",{"aria-live":"polite",className:"flex items-center gap-1 text-sm font-semibold text-gray-800",children:P?/* @__PURE__ */m(b,{children:["years"!==ee&&/* @__PURE__ */f("button",{type:"button","aria-label":E.chooseMonth(U.months[X.getMonth()]),onClick:()=>te(e=>"months"===e?"days":"months"),className:"rounded-md px-2 py-0.5 transition-colors hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:U.months[X.getMonth()]}),
|
|
9
|
+
/* @__PURE__ */f("button",{type:"button","aria-label":E.chooseYear(X.getFullYear()),onClick:()=>te(e=>"years"===e?"days":"years"),className:"rounded-md px-2 py-0.5 transition-colors hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:X.getFullYear()})]}):/* @__PURE__ */f("span",{children:U.monthYear(X.getFullYear(),X.getMonth())})}),
|
|
10
|
+
/* @__PURE__ */f("button",{type:"button","aria-label":"years"===ee?E.nextYears:"months"===ee?E.nextYear:E.nextMonth,onClick:()=>ce(se(1)),className:"rounded-full p-1 text-gray-600 hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */f(l,{name:"chevron-right",className:"h-4 w-4",strokeWidth:"2","aria-hidden":"true"})})]}),"months"===ee&&/* @__PURE__ */f("div",{role:"group","aria-label":E.monthPanel,className:"grid grid-cols-3 gap-1 text-center text-sm",children:U.monthsShort.map((e,t)=>/* @__PURE__ */f("button",{type:"button","aria-pressed":t===X.getMonth(),onClick:()=>{ce(new Date(X.getFullYear(),t,1)),te("days")},className:["rounded-md py-4 transition-colors rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",t===X.getMonth()?"bg-blue-600 font-semibold text-white":$&&t===$.getMonth()&&X.getFullYear()===$.getFullYear()?"font-medium text-blue-600 hover:bg-gray-100":"text-gray-700 hover:bg-gray-100"].join(" "),children:e},e))}),"years"===ee&&/* @__PURE__ */f("div",{role:"group","aria-label":E.yearPanel,className:"grid grid-cols-3 gap-1 text-center text-sm",children:Array.from({length:12},(e,t)=>{return r=X.getFullYear(),12*Math.floor(r/12)+t;var r}).map(e=>/* @__PURE__ */f("button",{type:"button","aria-pressed":e===X.getFullYear(),onClick:()=>{ce(new Date(e,X.getMonth(),1)),te("months")},className:["rounded-md py-4 transition-colors rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",e===X.getFullYear()?"bg-blue-600 font-semibold text-white":e===$?.getFullYear()?"font-medium text-blue-600 hover:bg-gray-100":"text-gray-700 hover:bg-gray-100"].join(" "),children:e},e))}),
|
|
11
|
+
/* @__PURE__ */m("div",{ref:Z,role:"grid","aria-label":ge,className:"space-y-1","aria-readonly":K||void 0,onKeyDown:a=>{const n=e(ie)??$??X,o={ArrowLeft:()=>p(n,-1),ArrowRight:()=>p(n,1),ArrowUp:()=>p(n,-7),ArrowDown:()=>p(n,7),Home:()=>p(n,-(n.getDay()-B+7)%7),End:()=>p(n,6-(n.getDay()-B+7)%7),PageUp:()=>x(n,a.shiftKey?-12:-1),PageDown:()=>x(n,a.shiftKey?12:1)};if(o[a.key])return a.preventDefault(),l=o[a.key](),_.current=!0,Q(r(l)),void(t(l)!==T&&ce(l));var l;"Enter"!==a.key&&" "!==a.key||(a.preventDefault(),K||ae(ie)||N(ie))},hidden:"days"!==ee,children:[
|
|
12
|
+
/* @__PURE__ */f("div",{role:"row",className:`${y} text-center text-xs font-medium text-ink-faint`,children:Array.from({length:7},(e,t)=>(t+B)%7).map(e=>
|
|
13
|
+
/* @__PURE__ */f("div",{role:"columnheader","aria-label":U.weekdays[e],className:"py-1",children:/* @__PURE__ */f("abbr",{title:U.weekdays[e],className:"no-underline",children:U.weekdaysShort[e]})},e))}),Array.from({length:6},(e,t)=>/* @__PURE__ */f("div",{role:"row",className:`${y} text-center text-sm`,children:re.slice(7*t,7*t+7).map(e=>{const t=r(e),a=e.getMonth()!==X.getMonth(),n=t===w||"range"===D&&t===M,o=(e=>!("range"!==D||!w||!M)&&e>w&&e<M)(t),l=ae(t),i=U.longDate(e.getFullYear(),e.getMonth(),e.getDate()),s=e=>["relative w-full aspect-square rounded-md transition-colors",e?"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"",l?"cursor-not-allowed text-gray-300":n?"bg-accent-fill font-semibold text-on-accent":o?"bg-accent-tint-strong text-blue-800":a?"text-ink-faint"+(e?" hover:bg-gray-100":""):"text-ink"+(e?" hover:bg-gray-100":""),t!==J||n?"":"font-semibold text-blue-600"].filter(Boolean).join(" "),c=W.has(t)&&/* @__PURE__ */f("span",{"data-marked":"","aria-hidden":"true",className:"absolute bottom-1 left-1/2 h-1 w-1 -translate-x-1/2 rounded-full "+(n?"bg-surface":a?"bg-gray-400":"bg-blue-500")});/* @__PURE__ */
|
|
14
|
+
return f("div",{role:"gridcell","aria-selected":n,"aria-label":K?i:void 0,children:K?/* @__PURE__ */m("span",{"aria-hidden":"true",className:`grid place-items-center ${s(!1)}`,children:[e.getDate(),c]}):/* @__PURE__ */m("button",{type:"button","data-active":t===ie,tabIndex:t===ie?0:-1,disabled:l,"aria-label":i,"aria-current":t===J?"date":void 0,onClick:()=>{Q(t),N(t)},className:s(!0),children:[e.getDate(),c]})},t)})},t))]})]})}export{w as Calendar};
|
|
@@ -0,0 +1,13 @@
|
|
|
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 i}from"./chunk-HJBR73GS.js";import{END_ACTIONS_PAD as a,InputEndActionSlot as s,InputEndActionButton as c}from"./chunk-LGTYPLJM.js";import{INPUT_BASE_ON as u,INPUT_BASE as d}from"./chunk-AYZY3YNC.js";import{Button_default as h}from"./chunk-7DI3VQCF.js";import{Icon as p}from"./chunk-7V32O5NF.js";import{LoadingSpinner as m}from"./chunk-R2VKEMZH.js";import{Tooltip as f}from"./chunk-QQ2LDC6C.js";import{onOverlayOpen as b}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as g}from"./chunk-62LW225J.js";import{useDropdownPosition as v,MENU_MAX_HEIGHT as w}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as y}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as x}from"./chunk-TWVUQUUD.js";import{useShellStrings as k}from"./chunk-5YP7MFPK.js";import{GLASS_DIVIDER as j,glassStyle as $}from"./chunk-5FYDNH4Y.js";import{useState as N,useId as D,useRef as C,useMemo as S,useEffect as F}from"react";import{createPortal as M}from"react-dom";import{jsxs as W,jsx as L}from"react/jsx-runtime";function R(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}}var E=["right-2","right-8","right-16"],T=[8,32,64];function z(z){const{options:A,placeholder:O,emptyOptionLabel:Y,className:H="",disabled:B,id:I,filter:J=!1,allowFreeText:U=!1,freeTextOption:G,onSearchChange:P,loading:Q=!1,error:V,onRetry:K,rightAdornment:Z,endAction:X,renderOption:q,clearable:_=!0,"aria-label":ee,"aria-labelledby":te,"aria-describedby":ne}=z,re=!0===z.multiple,le=z.multiple?z.value:z.value?[z.value]:[],oe=z.multiple?"":z.value,ie=e=>{z.multiple?z.onChange(e):z.onChange(e[0]??"")},ae=le.length>0,se=J&&ae&&!B,ce=re||J,ue=null!=G,de=U||ue,[he,pe]=N(!1),[me,fe]=N(-1),be=D(),ge=I??`${be}-input`,ve=`${be}-listbox`,we=e=>`${be}-opt-${e}`,[ye,xe]=N(""),ke=k(),je=Y??ke.select.none,$e=e=>{xe(e),fe(-1),P?.(e)},Ne=C(null),De=C(null),Ce=C(null),Se=C(null),Fe=C(he);Fe.current=he;const Me=C(!1),We=e=>{Fe.current&&(Fe.current=!1,e&&U&&!ue&&et&&(re?le.includes(et)||ie([...le,et]):et!==oe&&ie([et])),pe(!1),$e(""))},Le=(e,t)=>{if(!e.disabled){if(re)return ie(le.includes(e.value)?le.filter(t=>t!==e.value):[...le,e.value]),void(e===tt?$e(""):fe(t));ie([e.value]),We(!1)}},[Re,Ee]=N(null);y(()=>{if(!Z||he)return void Ee(null);const e=Se.current?.offsetWidth??0;Ee(e?e+T[Be]+6:null)});const Te=v(De,he,ce?{popupRef:Ce}:{matchTriggerWidth:!0}),ze=S(()=>t(A),[A]),Ae=le.join("\0"),Oe=S(()=>{const e=[],t=/* @__PURE__ */new Set;for(const n of ze)le.includes(n.value)&&!t.has(n.value)&&(t.add(n.value),e.push(n.label));if(de)for(const n of le)t.has(n)||e.push(n);return e},[ze,Ae,de]),Ye=Oe.join(", "),He=_&&ae&&!B,Be=(He?1:0)+(X?1:0),[Ie,Je]=N(null),Ue=C(null),Ge=C(""),Pe=C(()=>{});Pe.current=()=>{const e=De.current,t=Ue.current;if(!re||!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}|${Oe.join("\0")}`;if(o===Ge.current)return;Ge.current=o;let i=null;r>0&&Oe.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,i=R(Oe,e=>(t.textContent=e,t.getBoundingClientRect().width<=r)),t.textContent=""),Je(e=>e?.shown===i?.shown&&e?.cut===i?.cut?e:i)},y(()=>{Pe.current()}),F(()=>{const e=De.current;if(!re||!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Pe.current());return t.observe(e),()=>t.disconnect()},[re]);const Qe=Oe.length,Ve=!re||!Ie||Ie.shown>=Qe?Ye:0===Ie.shown?ke.select.selectedCount(Qe):`${Oe.slice(0,Ie.shown).join(", ")} +${Qe-Ie.shown}`,Ke=re&&null!==Ie&&(Ie.shown<Qe||Ie.cut),Ze=he&&ae&&ce;F(()=>{if(!he)return;const e=e=>{const t=e.target;Ne.current?.contains(t)||Ce.current?.contains(t)||We(!0)};document.addEventListener("mousedown",e);const t=b(()=>We(!0));return()=>{document.removeEventListener("mousedown",e),t()}},[he,U,ye,Ae,z.onChange]),F(()=>{if(he)return x(e=>!("Escape"!==e.key||!Fe.current)&&(We(!1),De.current?.blur(),!0),()=>Ce.current)},[he]);const Xe=S(()=>{const e=/* @__PURE__ */new Set;return n(A,t=>!e.has(t.value)&&(e.add(t.value),!0))},[A]),qe=S(()=>{if(P)return Xe;const e=ye.trim().toLowerCase();return e?n(Xe,t=>r(t,e)):Xe},[Xe,ye,P]),_e=S(()=>t(qe),[qe]),et=ye.trim(),tt=S(()=>ue&&et?ze.some(e=>e.label===et)||le.includes(et)?null:{value:et,label:et}:null,[ue,et,ze,Ae]),nt=S(()=>tt?[..._e,tt]:_e,[_e,tt]);/* @__PURE__ */
|
|
2
|
+
return W("div",{ref:Ne,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&(Ne.current?.contains(t)||Ce.current?.contains(t))||Me.current||document.activeElement!==De.current&&We(!0)},children:[(rt=/* @__PURE__ */L("input",{id:ge,ref:De,type:"text",autoComplete:"off",role:"combobox","aria-expanded":he,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-controls":he?ve:void 0,"aria-activedescendant":he&&me>=0&&me<nt.length?we(me):void 0,"aria-label":te?void 0:ee,"aria-labelledby":te,"aria-describedby":ne,value:he?ye:Ve,onChange:e=>{$e(e.target.value),pe(!0)},onFocus:()=>{B||($e(""),pe(!0))},onKeyDown:t=>{if("ArrowDown"===t.key||"ArrowUp"===t.key){if(B)return;if(t.preventDefault(),!he)return void pe(!0);if(0===nt.length)return;const n="ArrowDown"===t.key?1:-1;return void fe(t=>e(nt,t,n))}"Enter"===t.key?(t.preventDefault(),he&&me>=0&&me<nt.length?Le(nt[me],me):1!==_e.length||_e[0].disabled?U&&!ue&&et&&(re?(le.includes(et)||ie([...le,et]),$e("")):(ie([et]),We(!1),De.current?.blur())):Le(_e[0],0)):"Escape"===t.key?(We(!1),De.current?.blur()):"Tab"===t.key&&We(!0)},placeholder:Ze?Ve:O||je,className:`${se?u:d} ${H} ${a[Be]}${B?"bg-surface-sunken text-ink-faintest cursor-not-allowed":""} truncate${Ze?" rosh-field-shows-choice":""}`,style:Re?{paddingRight:Re}:void 0,disabled:B}),re?/* @__PURE__ */L(f,{content:!he&&Ke?Ye:null,className:"block",children:rt}):rt),re&&
|
|
3
|
+
/* @__PURE__ */L("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */L("span",{ref:Ue,className:"whitespace-pre"})}),Be>0&&
|
|
4
|
+
/* @__PURE__ */W(s,{children:[He&&
|
|
5
|
+
/* @__PURE__ */L("span",{onMouseDown:e=>e.preventDefault(),className:"flex opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100",children:/* @__PURE__ */L(c,{action:{label:ke.select.clear,icon:/* @__PURE__ */L(p,{name:"close"}),onClick:()=>{ie([]),We(!1)}}})}),X&&/* @__PURE__ */L("span",{onMouseDown:e=>e.preventDefault(),className:"flex",children:/* @__PURE__ */L(c,{action:X})})]}),Z&&!he&&/* @__PURE__ */L("div",{ref:Se,className:`absolute top-1/2 -translate-y-1/2 ${E[Be]} flex items-center gap-1 flex-nowrap justify-end pointer-events-none`,children:Z}),he&&M(
|
|
6
|
+
/* @__PURE__ */W("div",{ref:Ce,onMouseDownCapture:()=>{Me.current=!0,setTimeout(()=>{Me.current=!1},0)},className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:g.popup,left:Te?.left,right:Te?.right,top:Te?.top,bottom:Te?.bottom,minWidth:Te?.minWidth,width:Te?.width,...ce&&{maxWidth:Te?.maxWidth},visibility:Te?void 0:"hidden",...$()},children:[re&&ae&&_&&!B&&
|
|
7
|
+
/* @__PURE__ */L("button",{type:"button",tabIndex:-1,onMouseDown:e=>{e.preventDefault(),ie([])},className:`block w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm text-gray-600 hover:bg-row-hover border-b ${j}`,children:ke.select.clearAll}),Q?
|
|
8
|
+
/* @__PURE__ */L(m,{size:"sm",padding:"py-2",label:ke.search.searching}):V?/* @__PURE__ */W("div",{role:"alert",className:"flex items-center gap-2 px-3 py-2 text-sm text-red-600",children:[
|
|
9
|
+
/* @__PURE__ */L("span",{className:"min-w-0 flex-1",children:V}),K&&/* @__PURE__ */L(h,{variant:"link",size:"sm",onMouseDown:e=>e.preventDefault(),onClick:K,className:"shrink-0",children:ke.list.retry})]}):null,
|
|
10
|
+
/* @__PURE__ */W("div",{id:ve,role:nt.length?"listbox":void 0,"aria-labelledby":nt.length?te??(ee?void 0:ge):void 0,"aria-label":nt.length&&!te?ee:void 0,"aria-multiselectable":!(!nt.length||!re)||void 0,className:"overflow-y-auto",style:{maxHeight:Te?.maxHeight??w},children:[0===nt.length?Q||V?null:/* @__PURE__ */L("p",{className:"px-3 py-3 text-sm text-ink-faintest text-center",children:ke.select.noMatches}):0===_e.length?null:l(qe,(e,t)=>{const n=le.includes(e.value);/* @__PURE__ */
|
|
11
|
+
return W("button",{id:we(t),type:"button",role:"option","aria-selected":n,"aria-disabled":e.disabled||void 0,tabIndex:-1,onMouseDown:n=>{(e.disabled||re)&&n.preventDefault(),Le(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===me?"bg-gray-100":n?"bg-blue-50/50":""}`),children:[re&&/* @__PURE__ */L(o,{selected:n}),
|
|
12
|
+
/* @__PURE__ */L("span",{className:`min-w-0 ${ce?"flex-auto":"flex-1"} truncate`,children:q?q(e,{selected:n,active:t===me}):e.label}),e.sublabel&&/* @__PURE__ */L(i,{grows:ce,children:e.sublabel})]},e.value)},be),tt&&G&&
|
|
13
|
+
/* @__PURE__ */L("button",{id:we(_e.length),type:"button",role:"option","aria-selected":!1,tabIndex:-1,onMouseDown:e=>{re&&e.preventDefault(),Le(tt,_e.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-ink hover:bg-row-hover ${_e.length?`border-t ${j}`:""} ${me===_e.length?"bg-gray-100":""}`,children:/* @__PURE__ */L("span",{className:"min-w-0 flex-1 truncate",children:G(tt.value)})},`${be}-typed`)]})]}),document.body)]});var rt}export{z as SearchableSelect,R as fitChoice};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{swallowPress as e,describedByWith as i,OffWithReason as r}from"./chunk-XWFLIGDQ.js";import{Icon as a}from"./chunk-
|
|
1
|
+
import{swallowPress as e,describedByWith as i,OffWithReason as r}from"./chunk-XWFLIGDQ.js";import{Icon as a}from"./chunk-7V32O5NF.js";import{OneLineLabel as o}from"./chunk-CJH2BGXY.js";import{Tooltip as s}from"./chunk-QQ2LDC6C.js";import{useShellStrings as n}from"./chunk-5YP7MFPK.js";import{useId as l,Fragment as d}from"react";import{jsx as t,jsxs as c}from"react/jsx-runtime";function b({items:b,onChange:h,label:m,className:u="","aria-labelledby":f,"aria-describedby":p}){const w=n().displayChips,g=l();/* @__PURE__ */
|
|
2
2
|
return t("div",{role:"group","aria-label":f?void 0:m,"aria-labelledby":f,"aria-describedby":p,className:`flex flex-wrap gap-2 ${u}`.trim(),children:b.map((n,l)=>{const b=`${g}-${l}-state`,m=`${g}-${l}-reason`,u=Boolean(n.disabled)&&null!=n.disabledReason&&""!==n.disabledReason,f=/* @__PURE__ */c("button",{type:"button","aria-pressed":n.shown,disabled:!(!n.disabled||u)||void 0,"aria-disabled":!!u||void 0,"aria-describedby":i(b,u?m:void 0),onClick:u?e:()=>h(n.id,!n.shown),className:"inline-flex h-6 max-w-full shrink-0 items-center gap-1 whitespace-nowrap rounded-full border pl-2 pr-3 text-xs font-medium transition-colors rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)] disabled:cursor-not-allowed disabled:opacity-60 aria-disabled:cursor-not-allowed aria-disabled:opacity-60 "+(n.shown?"border-blue-200 bg-accent-tint text-blue-700 hover:bg-blue-100":"border-line bg-surface text-ink-faint hover:bg-row-hover hover:text-ink-strongest"),children:[
|
|
3
3
|
/* @__PURE__ */t(a,{name:n.shown?"eye":"eye-off",className:"h-4 w-4 shrink-0",strokeWidth:"1.75"}),
|
|
4
4
|
/* @__PURE__ */t(o,{children:n.label})]}),p=/* @__PURE__ */t("span",{id:b,className:"sr-only",children:n.shown?w.shown:w.hidden});/* @__PURE__ */
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import{useShellStrings as e}from"./chunk-
|
|
1
|
+
import{useShellStrings as e}from"./chunk-5YP7MFPK.js";import{jsxs as t,jsx as a,Fragment as l}from"react/jsx-runtime";var n=e=>"number"==typeof e?e:parseInt(String(e??""))||0;function s({items:s,getVolume:i,getInstructionVolume:r,getActualVolume:c,qtyField:m="instruction",showNewIndicator:d=!1,getInstructionQty:u=e=>e.quantity,getActualQty:h=e=>e.actual_qty,isFilled:o,isNew:g=e=>Boolean(e._isNew),className:x,style:f}){const p=e().containers,y=o?s.filter(o):s,N=e=>n(u(e)),b=e=>n(h(e)),w=y.some(e=>null!=h(e)&&b(e)>0),v=e=>w?N(e):"actual"===m?h(e)??u(e)??0:u(e)??0,M=y.reduce((e,t)=>e+n(v(t)),0),$=y.filter(e=>g(e)).length,k=y.filter(e=>g(e)).reduce((e,t)=>e+n(v(t)),0),j=y.reduce((e,t)=>e+N(t),0),I=y.reduce((e,t)=>e+b(t),0),V=e=>i?.(e)??0,q=r??(e=>V(e)*N(e)),A=c??(e=>V(e)*b(e)),F=y.reduce((e,t)=>e+q(t),0),P=y.reduce((e,t)=>e+A(t),0),Q=w?Math.max(F,P):"actual"===m&&P||F,_=Q<=34.65?"20ft":"40ft",B="20ft"===_?33:67,K=Q>0?Math.max(1,Math.ceil(Q/B)):0,S=K*B,Y=Q>0&&Q>=.95*S&&Q<=1.1*S;if(0===y.length)return null;const z=(e,t)=>B>0?Math.max(0,Math.min((e-t*B)/B*100,100)):0;/* @__PURE__ */
|
|
2
2
|
return t("div",{className:`mt-2 px-1 space-y-2 ${x??""}`.trim(),style:f,children:[
|
|
3
3
|
/* @__PURE__ */t("div",{className:"flex items-center justify-between text-xs text-gray-500",children:[
|
|
4
4
|
/* @__PURE__ */t("span",{children:[`${p.items(y.length)} · ${p.pieces(M)}`,w&&j!==I&&/* @__PURE__ */a("span",{className:"ml-1 text-gray-400",children:p.split(j,I)})]}),d&&$>0&&/* @__PURE__ */t("span",{className:"flex items-center gap-1 text-green-600",children:[
|
|
5
|
-
/* @__PURE__ */a("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500"}),p.added($,k)]})]}),
|
|
5
|
+
/* @__PURE__ */a("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500"}),p.added($,k)]})]}),Q>0?/* @__PURE__ */t("div",{className:"space-y-2",children:[Array.from({length:K}).map((e,l)=>{const n=z(F,l),s=z(P,l),i=w,r=Math.max(n,s),c=Math.min(n,s),m=n>=s,d=i?m?"bg-blue-500":"bg-green-500":"bg-blue-500",u=i?m?"bg-green-500":"bg-blue-500":"";/* @__PURE__ */
|
|
6
6
|
return t("div",{className:"flex items-center gap-2",children:[
|
|
7
7
|
/* @__PURE__ */a("span",{className:"text-2xs text-ink-faintest w-8 shrink-0",children:_}),
|
|
8
8
|
/* @__PURE__ */t("div",{className:"relative flex-1 h-4 bg-gray-100 rounded-full overflow-hidden border border-gray-200",children:[
|
|
9
9
|
/* @__PURE__ */a("div",{className:`absolute inset-y-0 left-0 ${d} transition-all`,style:{width:`${r}%`}}),i&&c>0&&/* @__PURE__ */a("div",{className:`absolute inset-y-0 left-0 ${u} transition-all`,style:{width:`${c}%`}})]}),
|
|
10
|
-
/* @__PURE__ */a("span",{className:"text-2xs text-ink-faint w-16 text-right",children:i?p.fill(Math.min(
|
|
10
|
+
/* @__PURE__ */a("span",{className:"text-2xs text-ink-faint w-16 text-right",children:i?p.fill(Math.min(P-l*B,B),B):p.fill(Math.min(F-l*B,B),B)})]},`bar-${l}`)}),
|
|
11
11
|
/* @__PURE__ */t("div",{className:"flex items-center justify-between text-xs pt-0.5",children:[
|
|
12
12
|
/* @__PURE__ */t("span",{className:"text-gray-500 inline-flex items-center gap-1",children:[p.total,w?/* @__PURE__ */t(l,{children:[
|
|
13
13
|
/* @__PURE__ */t("span",{className:"inline-flex items-center gap-1 text-blue-700",children:[
|
|
14
|
-
/* @__PURE__ */a("span",{className:"inline-block w-2 h-2 rounded-full bg-blue-500"}),p.instructed(
|
|
14
|
+
/* @__PURE__ */a("span",{className:"inline-block w-2 h-2 rounded-full bg-blue-500"}),p.instructed(F)]}),
|
|
15
15
|
/* @__PURE__ */a("span",{className:"text-gray-400",children:"/"}),
|
|
16
16
|
/* @__PURE__ */t("span",{className:"inline-flex items-center gap-1 text-green-700",children:[
|
|
17
|
-
/* @__PURE__ */a("span",{className:"inline-block w-2 h-2 rounded-full bg-green-500"}),p.loaded(
|
|
18
|
-
/* @__PURE__ */t("span",{className:"font-medium "+(
|
|
17
|
+
/* @__PURE__ */a("span",{className:"inline-block w-2 h-2 rounded-full bg-green-500"}),p.loaded(P)]})]}):/* @__PURE__ */a("b",{className:"text-gray-700",children:p.volume(Q)})]}),
|
|
18
|
+
/* @__PURE__ */t("span",{className:"font-medium "+(Y?"text-green-600":"text-gray-500"),children:[Y&&"✓ ",K," × ",_]})]})]}):/* @__PURE__ */a("div",{className:"text-xs text-gray-400",children:p.noVolume})]})}export{s as ContainerFillChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Card as e}from"./chunk-
|
|
1
|
+
import{Card as e}from"./chunk-WEEQDPU3.js";import{Select_default as l}from"./chunk-ESWR7YNY.js";import{FormField as a}from"./chunk-6KBDNYRW.js";import{Checkbox_default as r}from"./chunk-CGZBDI6C.js";import{Banner as i}from"./chunk-IIKPM3F4.js";import{Input_default as c}from"./chunk-LGTYPLJM.js";import{Button_default as s}from"./chunk-7DI3VQCF.js";import{useState as d}from"react";import{jsx as n,jsxs as t}from"react/jsx-runtime";var h=[{name:"Mechanical keyboard",qty:1,price:129},{name:"USB-C cable (2m)",qty:2,price:12},{name:"Laptop stand",qty:1,price:48}];function m(){const[m,o]=d(!0),[p,u]=d("us"),y=h.reduce((e,l)=>e+l.qty*l.price,0),g=y+9;/* @__PURE__ */
|
|
2
2
|
return n("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */t("div",{className:"mx-auto max-w-5xl space-y-5",children:[
|
|
3
3
|
/* @__PURE__ */n("h1",{className:"text-xl font-semibold text-gray-900",children:"Checkout"}),
|
|
4
4
|
/* @__PURE__ */t("div",{className:"grid grid-cols-1 gap-5 lg:grid-cols-3",children:[
|