@six-vallees/ui-react 0.5.0 → 0.7.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 +11 -15
- package/dist/actions/button-group.d.ts +21 -0
- package/dist/actions/button-group.js +8 -0
- package/dist/actions/button-group.js.map +1 -0
- package/dist/actions/context-menu.d.ts +48 -0
- package/dist/actions/context-menu.js +38 -0
- package/dist/actions/context-menu.js.map +1 -0
- package/dist/actions/dropdown-menu.d.ts +49 -0
- package/dist/actions/dropdown-menu.js +38 -0
- package/dist/actions/dropdown-menu.js.map +1 -0
- package/dist/actions/icon-button.d.ts +34 -0
- package/dist/actions/icon-button.js +10 -0
- package/dist/actions/icon-button.js.map +1 -0
- package/dist/actions/link.d.ts +23 -0
- package/dist/actions/link.js +8 -0
- package/dist/actions/link.js.map +1 -0
- package/dist/actions/menu-styles.d.ts +25 -0
- package/dist/actions/menu-styles.js +23 -0
- package/dist/actions/menu-styles.js.map +1 -0
- package/dist/avatar/avatar.d.ts +30 -0
- package/dist/avatar/avatar.js +11 -0
- package/dist/avatar/avatar.js.map +1 -0
- package/dist/badge/badge.d.ts +32 -0
- package/dist/badge/badge.js +10 -0
- package/dist/badge/badge.js.map +1 -0
- package/dist/button/button.d.ts +7 -4
- package/dist/button/button.js +1 -1
- package/dist/card/card.d.ts +11 -3
- package/dist/card/card.js +1 -1
- package/dist/charts/bar-chart.d.ts +50 -11
- package/dist/charts/bar-chart.js +7 -2
- package/dist/charts/benchmark-table.d.ts +47 -0
- package/dist/charts/benchmark-table.js +10 -0
- package/dist/charts/benchmark-table.js.map +1 -0
- package/dist/charts/delta.d.ts +23 -0
- package/dist/charts/delta.js +8 -0
- package/dist/charts/delta.js.map +1 -0
- package/dist/charts/dot-matrix.d.ts +38 -0
- package/dist/charts/dot-matrix.js +13 -0
- package/dist/charts/dot-matrix.js.map +1 -0
- package/dist/charts/heatmap.d.ts +33 -0
- package/dist/charts/heatmap.js +13 -0
- package/dist/charts/heatmap.js.map +1 -0
- package/dist/charts/lib/scale.d.ts +17 -0
- package/dist/charts/lib/scale.js +15 -0
- package/dist/charts/lib/scale.js.map +1 -0
- package/dist/charts/lib/series.d.ts +76 -44
- package/dist/charts/lib/series.js +25 -11
- package/dist/charts/lib/use-chart.d.ts +48 -0
- package/dist/charts/lib/use-chart.js +16 -0
- package/dist/charts/lib/use-chart.js.map +1 -0
- package/dist/charts/line-chart.d.ts +52 -19
- package/dist/charts/line-chart.js +11 -2
- package/dist/charts/meter.d.ts +30 -0
- package/dist/charts/meter.js +12 -0
- package/dist/charts/meter.js.map +1 -0
- package/dist/charts/primitives/chart-frame.d.ts +25 -0
- package/dist/charts/primitives/chart-frame.js +8 -0
- package/dist/charts/primitives/chart-frame.js.map +1 -0
- package/dist/charts/primitives/chart-grid.d.ts +29 -0
- package/dist/charts/primitives/chart-grid.js +9 -0
- package/dist/charts/primitives/chart-grid.js.map +1 -0
- package/dist/charts/primitives/chart-legend.d.ts +23 -0
- package/dist/charts/primitives/chart-legend.js +9 -0
- package/dist/charts/primitives/chart-legend.js.map +1 -0
- package/dist/charts/primitives/chart-tooltip.d.ts +31 -0
- package/dist/charts/primitives/chart-tooltip.js +9 -0
- package/dist/charts/primitives/chart-tooltip.js.map +1 -0
- package/dist/charts/rank-list.d.ts +29 -0
- package/dist/charts/rank-list.js +12 -0
- package/dist/charts/rank-list.js.map +1 -0
- package/dist/charts/ring.d.ts +25 -24
- package/dist/charts/ring.js +4 -2
- package/dist/charts/scatter-chart.d.ts +42 -0
- package/dist/charts/scatter-chart.js +14 -0
- package/dist/charts/scatter-chart.js.map +1 -0
- package/dist/charts/segmented-bar.d.ts +16 -11
- package/dist/charts/segmented-bar.js +6 -2
- package/dist/charts/sparkline.d.ts +32 -0
- package/dist/charts/sparkline.js +10 -0
- package/dist/charts/sparkline.js.map +1 -0
- package/dist/charts/stat.d.ts +13 -7
- package/dist/charts/stat.js +2 -1
- package/dist/chunk-24T7KWXQ.js +84 -0
- package/dist/chunk-24T7KWXQ.js.map +1 -0
- package/dist/chunk-2NJFAPRG.js +40 -0
- package/dist/chunk-2NJFAPRG.js.map +1 -0
- package/dist/chunk-3PHVZB3A.js +73 -0
- package/dist/chunk-3PHVZB3A.js.map +1 -0
- package/dist/chunk-5EGRSN37.js +102 -0
- package/dist/chunk-5EGRSN37.js.map +1 -0
- package/dist/chunk-7FRDEE43.js +35 -0
- package/dist/chunk-7FRDEE43.js.map +1 -0
- package/dist/chunk-7YKHLP4S.js +43 -0
- package/dist/chunk-7YKHLP4S.js.map +1 -0
- package/dist/{chunk-7GXL7U5X.js → chunk-A65X3XYB.js} +4 -3
- package/dist/chunk-A65X3XYB.js.map +1 -0
- package/dist/chunk-AGKLGZSW.js +74 -0
- package/dist/chunk-AGKLGZSW.js.map +1 -0
- package/dist/chunk-AQHYE6EF.js +109 -0
- package/dist/chunk-AQHYE6EF.js.map +1 -0
- package/dist/chunk-AWVTRQZJ.js +117 -0
- package/dist/chunk-AWVTRQZJ.js.map +1 -0
- package/dist/chunk-BDQUFQE7.js +30 -0
- package/dist/chunk-BDQUFQE7.js.map +1 -0
- package/dist/chunk-BJKQSXX4.js +54 -0
- package/dist/chunk-BJKQSXX4.js.map +1 -0
- package/dist/chunk-BKSKRGK7.js +81 -0
- package/dist/chunk-BKSKRGK7.js.map +1 -0
- package/dist/chunk-BVNDNRPW.js +44 -0
- package/dist/chunk-BVNDNRPW.js.map +1 -0
- package/dist/chunk-CN6QNKYV.js +24 -0
- package/dist/chunk-CN6QNKYV.js.map +1 -0
- package/dist/chunk-DD6QBBV2.js +119 -0
- package/dist/chunk-DD6QBBV2.js.map +1 -0
- package/dist/chunk-DHPFIP7P.js +50 -0
- package/dist/chunk-DHPFIP7P.js.map +1 -0
- package/dist/chunk-DRJWJ7KG.js +109 -0
- package/dist/chunk-DRJWJ7KG.js.map +1 -0
- package/dist/chunk-DUJEWU5O.js +72 -0
- package/dist/chunk-DUJEWU5O.js.map +1 -0
- package/dist/chunk-EKQQBSFF.js +79 -0
- package/dist/chunk-EKQQBSFF.js.map +1 -0
- package/dist/chunk-EM5UHI3U.js +39 -0
- package/dist/chunk-EM5UHI3U.js.map +1 -0
- package/dist/chunk-ENL5WNFM.js +101 -0
- package/dist/chunk-ENL5WNFM.js.map +1 -0
- package/dist/chunk-EVKFEIM2.js +37 -0
- package/dist/chunk-EVKFEIM2.js.map +1 -0
- package/dist/chunk-EXEJG4IG.js +101 -0
- package/dist/chunk-EXEJG4IG.js.map +1 -0
- package/dist/chunk-FSVKQPMR.js +45 -0
- package/dist/chunk-FSVKQPMR.js.map +1 -0
- package/dist/chunk-GASC427L.js +34 -0
- package/dist/chunk-GASC427L.js.map +1 -0
- package/dist/chunk-GGQ6GQ75.js +24 -0
- package/dist/chunk-GGQ6GQ75.js.map +1 -0
- package/dist/chunk-GHXR4PCK.js +147 -0
- package/dist/chunk-GHXR4PCK.js.map +1 -0
- package/dist/chunk-HC3SNY5O.js +52 -0
- package/dist/chunk-HC3SNY5O.js.map +1 -0
- package/dist/chunk-HJ7ICELB.js +76 -0
- package/dist/chunk-HJ7ICELB.js.map +1 -0
- package/dist/chunk-I355QWHH.js +40 -0
- package/dist/chunk-I355QWHH.js.map +1 -0
- package/dist/chunk-I6D5E5ZD.js +34 -0
- package/dist/chunk-I6D5E5ZD.js.map +1 -0
- package/dist/chunk-IBY25I76.js +49 -0
- package/dist/chunk-IBY25I76.js.map +1 -0
- package/dist/chunk-IGOTX5DA.js +19 -0
- package/dist/chunk-IGOTX5DA.js.map +1 -0
- package/dist/chunk-JI4UZW6G.js +39 -0
- package/dist/chunk-JI4UZW6G.js.map +1 -0
- package/dist/chunk-JZNXMBZ6.js +93 -0
- package/dist/chunk-JZNXMBZ6.js.map +1 -0
- package/dist/chunk-LAATHRKX.js +39 -0
- package/dist/chunk-LAATHRKX.js.map +1 -0
- package/dist/chunk-LL5GBPQN.js +64 -0
- package/dist/chunk-LL5GBPQN.js.map +1 -0
- package/dist/chunk-ML3IXSZV.js +78 -0
- package/dist/chunk-ML3IXSZV.js.map +1 -0
- package/dist/chunk-MNECWWTU.js +62 -0
- package/dist/chunk-MNECWWTU.js.map +1 -0
- package/dist/chunk-MPYL4ED3.js +171 -0
- package/dist/chunk-MPYL4ED3.js.map +1 -0
- package/dist/chunk-MS7ZK2O6.js +65 -0
- package/dist/chunk-MS7ZK2O6.js.map +1 -0
- package/dist/chunk-MZVQ32JU.js +29 -0
- package/dist/chunk-MZVQ32JU.js.map +1 -0
- package/dist/chunk-NC4IUB2C.js +33 -0
- package/dist/chunk-NC4IUB2C.js.map +1 -0
- package/dist/chunk-NCAHIMIB.js +96 -0
- package/dist/chunk-NCAHIMIB.js.map +1 -0
- package/dist/chunk-NJVKZ5DE.js +114 -0
- package/dist/chunk-NJVKZ5DE.js.map +1 -0
- package/dist/chunk-OGSHLSI2.js +22 -0
- package/dist/chunk-OGSHLSI2.js.map +1 -0
- package/dist/chunk-OIAZH5EU.js +36 -0
- package/dist/chunk-OIAZH5EU.js.map +1 -0
- package/dist/chunk-P22B7HQS.js +45 -0
- package/dist/chunk-P22B7HQS.js.map +1 -0
- package/dist/chunk-P2CWISVU.js +35 -0
- package/dist/chunk-P2CWISVU.js.map +1 -0
- package/dist/chunk-P4G5WFHH.js +18 -0
- package/dist/chunk-P4G5WFHH.js.map +1 -0
- package/dist/chunk-QNIIWNSR.js +78 -0
- package/dist/chunk-QNIIWNSR.js.map +1 -0
- package/dist/chunk-R23U2FRV.js +23 -0
- package/dist/chunk-R23U2FRV.js.map +1 -0
- package/dist/chunk-RB6DUG3M.js +9 -0
- package/dist/chunk-RB6DUG3M.js.map +1 -0
- package/dist/chunk-RKG72NSW.js +26 -0
- package/dist/chunk-RKG72NSW.js.map +1 -0
- package/dist/chunk-SAVUGRDZ.js +31 -0
- package/dist/chunk-SAVUGRDZ.js.map +1 -0
- package/dist/chunk-SEMDDFFB.js +37 -0
- package/dist/chunk-SEMDDFFB.js.map +1 -0
- package/dist/chunk-SNTRWOF6.js +90 -0
- package/dist/chunk-SNTRWOF6.js.map +1 -0
- package/dist/chunk-SOWWBAOB.js +36 -0
- package/dist/chunk-SOWWBAOB.js.map +1 -0
- package/dist/chunk-SYGAPDKX.js +45 -0
- package/dist/chunk-SYGAPDKX.js.map +1 -0
- package/dist/chunk-TBZIUIP2.js +87 -0
- package/dist/chunk-TBZIUIP2.js.map +1 -0
- package/dist/chunk-TD2NGENS.js +43 -0
- package/dist/chunk-TD2NGENS.js.map +1 -0
- package/dist/chunk-TH6WBEEL.js +58 -0
- package/dist/chunk-TH6WBEEL.js.map +1 -0
- package/dist/chunk-TUY3ZMDE.js +42 -0
- package/dist/chunk-TUY3ZMDE.js.map +1 -0
- package/dist/chunk-U4G72DSG.js +67 -0
- package/dist/chunk-U4G72DSG.js.map +1 -0
- package/dist/chunk-UG5TRIRZ.js +42 -0
- package/dist/chunk-UG5TRIRZ.js.map +1 -0
- package/dist/chunk-UOJZEP6N.js +39 -0
- package/dist/chunk-UOJZEP6N.js.map +1 -0
- package/dist/chunk-V5QWZ3LA.js +77 -0
- package/dist/chunk-V5QWZ3LA.js.map +1 -0
- package/dist/chunk-VDKJLIEZ.js +291 -0
- package/dist/chunk-VDKJLIEZ.js.map +1 -0
- package/dist/chunk-W2NESPKL.js +100 -0
- package/dist/chunk-W2NESPKL.js.map +1 -0
- package/dist/chunk-W3RIYQPO.js +37 -0
- package/dist/chunk-W3RIYQPO.js.map +1 -0
- package/dist/chunk-WO33CSUW.js +52 -0
- package/dist/chunk-WO33CSUW.js.map +1 -0
- package/dist/chunk-WSTHL6H7.js +33 -0
- package/dist/chunk-WSTHL6H7.js.map +1 -0
- package/dist/chunk-WZONN76V.js +55 -0
- package/dist/chunk-WZONN76V.js.map +1 -0
- package/dist/chunk-XGFM7GVN.js +39 -0
- package/dist/chunk-XGFM7GVN.js.map +1 -0
- package/dist/chunk-XSYY67X3.js +142 -0
- package/dist/chunk-XSYY67X3.js.map +1 -0
- package/dist/chunk-YFKM4ZLH.js +111 -0
- package/dist/chunk-YFKM4ZLH.js.map +1 -0
- package/dist/chunk-YM2TZ5UT.js +42 -0
- package/dist/chunk-YM2TZ5UT.js.map +1 -0
- package/dist/chunk-YP766ABA.js +268 -0
- package/dist/chunk-YP766ABA.js.map +1 -0
- package/dist/chunk-YT2PR4LF.js +38 -0
- package/dist/chunk-YT2PR4LF.js.map +1 -0
- package/dist/chunk-ZI4AJKES.js +29 -0
- package/dist/chunk-ZI4AJKES.js.map +1 -0
- package/dist/chunk-ZXVCMTM2.js +57 -0
- package/dist/chunk-ZXVCMTM2.js.map +1 -0
- package/dist/data-display/code-block.d.ts +26 -0
- package/dist/data-display/code-block.js +9 -0
- package/dist/data-display/code-block.js.map +1 -0
- package/dist/data-display/separator.d.ts +11 -0
- package/dist/data-display/separator.js +9 -0
- package/dist/data-display/separator.js.map +1 -0
- package/dist/data-display/stepper.d.ts +27 -0
- package/dist/data-display/stepper.js +8 -0
- package/dist/data-display/stepper.js.map +1 -0
- package/dist/data-display/table.d.ts +43 -0
- package/dist/data-display/table.js +24 -0
- package/dist/data-display/table.js.map +1 -0
- package/dist/data-display/tag.d.ts +27 -0
- package/dist/data-display/tag.js +10 -0
- package/dist/data-display/tag.js.map +1 -0
- package/dist/data-display/timeline.d.ts +24 -0
- package/dist/data-display/timeline.js +10 -0
- package/dist/data-display/timeline.js.map +1 -0
- package/dist/disclosure/accordion.d.ts +18 -0
- package/dist/disclosure/accordion.js +15 -0
- package/dist/disclosure/accordion.js.map +1 -0
- package/dist/disclosure/collapsible.d.ts +14 -0
- package/dist/disclosure/collapsible.js +13 -0
- package/dist/disclosure/collapsible.js.map +1 -0
- package/dist/disclosure/dialog.d.ts +43 -0
- package/dist/disclosure/dialog.js +27 -0
- package/dist/disclosure/dialog.js.map +1 -0
- package/dist/disclosure/hover-card.d.ts +21 -0
- package/dist/disclosure/hover-card.js +13 -0
- package/dist/disclosure/hover-card.js.map +1 -0
- package/dist/dots/dots.d.ts +41 -0
- package/dist/dots/dots.js +8 -0
- package/dist/dots/dots.js.map +1 -0
- package/dist/feedback/alert.d.ts +27 -0
- package/dist/feedback/alert.js +13 -0
- package/dist/feedback/alert.js.map +1 -0
- package/dist/feedback/empty-state.d.ts +28 -0
- package/dist/feedback/empty-state.js +8 -0
- package/dist/feedback/empty-state.js.map +1 -0
- package/dist/feedback/progress.d.ts +19 -0
- package/dist/feedback/progress.js +9 -0
- package/dist/feedback/progress.js.map +1 -0
- package/dist/feedback/skeleton.d.ts +16 -0
- package/dist/feedback/skeleton.js +8 -0
- package/dist/feedback/skeleton.js.map +1 -0
- package/dist/feedback/spinner.d.ts +19 -0
- package/dist/feedback/spinner.js +8 -0
- package/dist/feedback/spinner.js.map +1 -0
- package/dist/feedback/toast.d.ts +35 -0
- package/dist/feedback/toast.js +22 -0
- package/dist/feedback/toast.js.map +1 -0
- package/dist/feedback/tone.d.ts +20 -0
- package/dist/feedback/tone.js +11 -0
- package/dist/feedback/tone.js.map +1 -0
- package/dist/index.d.ts +97 -4
- package/dist/index.js +617 -25
- package/dist/input/chat-composer.d.ts +40 -0
- package/dist/input/chat-composer.js +9 -0
- package/dist/input/chat-composer.js.map +1 -0
- package/dist/input/checkbox.d.ts +15 -0
- package/dist/input/checkbox.js +9 -0
- package/dist/input/checkbox.js.map +1 -0
- package/dist/input/combobox.d.ts +121 -0
- package/dist/input/combobox.js +25 -0
- package/dist/input/combobox.js.map +1 -0
- package/dist/input/field-styles.d.ts +14 -0
- package/dist/input/field-styles.js +9 -0
- package/dist/input/field-styles.js.map +1 -0
- package/dist/input/input.d.ts +17 -0
- package/dist/input/input.js +9 -0
- package/dist/input/input.js.map +1 -0
- package/dist/input/kbd.d.ts +11 -0
- package/dist/input/kbd.js +8 -0
- package/dist/input/kbd.js.map +1 -0
- package/dist/input/label.d.ts +38 -0
- package/dist/input/label.js +11 -0
- package/dist/input/label.js.map +1 -0
- package/dist/input/radio-group.d.ts +15 -0
- package/dist/input/radio-group.js +11 -0
- package/dist/input/radio-group.js.map +1 -0
- package/dist/input/search-field.d.ts +24 -0
- package/dist/input/search-field.js +11 -0
- package/dist/input/search-field.js.map +1 -0
- package/dist/input/select.d.ts +29 -0
- package/dist/input/select.js +25 -0
- package/dist/input/select.js.map +1 -0
- package/dist/input/slider.d.ts +19 -0
- package/dist/input/slider.js +9 -0
- package/dist/input/slider.js.map +1 -0
- package/dist/input/switch.d.ts +15 -0
- package/dist/input/switch.js +9 -0
- package/dist/input/switch.js.map +1 -0
- package/dist/input/textarea.d.ts +9 -0
- package/dist/input/textarea.js +9 -0
- package/dist/input/textarea.js.map +1 -0
- package/dist/logo/cairn-mark.d.ts +24 -0
- package/dist/logo/cairn-mark.js +8 -0
- package/dist/logo/cairn-mark.js.map +1 -0
- package/dist/marketing/carousel-dots.d.ts +22 -0
- package/dist/marketing/carousel-dots.js +8 -0
- package/dist/marketing/carousel-dots.js.map +1 -0
- package/dist/marketing/cta-band.d.ts +24 -0
- package/dist/marketing/cta-band.js +9 -0
- package/dist/marketing/cta-band.js.map +1 -0
- package/dist/marketing/feature-grid.d.ts +30 -0
- package/dist/marketing/feature-grid.js +10 -0
- package/dist/marketing/feature-grid.js.map +1 -0
- package/dist/marketing/footer.d.ts +33 -0
- package/dist/marketing/footer.js +18 -0
- package/dist/marketing/footer.js.map +1 -0
- package/dist/marketing/hero-badge.d.ts +19 -0
- package/dist/marketing/hero-badge.js +8 -0
- package/dist/marketing/hero-badge.js.map +1 -0
- package/dist/marketing/logo-strip.d.ts +28 -0
- package/dist/marketing/logo-strip.js +8 -0
- package/dist/marketing/logo-strip.js.map +1 -0
- package/dist/marketing/pricing-card.d.ts +37 -0
- package/dist/marketing/pricing-card.js +10 -0
- package/dist/marketing/pricing-card.js.map +1 -0
- package/dist/marketing/section-header.d.ts +23 -0
- package/dist/marketing/section-header.js +8 -0
- package/dist/marketing/section-header.js.map +1 -0
- package/dist/navigation/anchor-rail.d.ts +27 -0
- package/dist/navigation/anchor-rail.js +9 -0
- package/dist/navigation/anchor-rail.js.map +1 -0
- package/dist/navigation/breadcrumb.d.ts +33 -0
- package/dist/navigation/breadcrumb.js +20 -0
- package/dist/navigation/breadcrumb.js.map +1 -0
- package/dist/navigation/nav-bar.d.ts +47 -0
- package/dist/navigation/nav-bar.js +21 -0
- package/dist/navigation/nav-bar.js.map +1 -0
- package/dist/navigation/navigation-menu.d.ts +23 -0
- package/dist/navigation/navigation-menu.js +25 -0
- package/dist/navigation/navigation-menu.js.map +1 -0
- package/dist/navigation/pagination.d.ts +31 -0
- package/dist/navigation/pagination.js +20 -0
- package/dist/navigation/pagination.js.map +1 -0
- package/dist/navigation/side-nav.d.ts +31 -0
- package/dist/navigation/side-nav.js +13 -0
- package/dist/navigation/side-nav.js.map +1 -0
- package/dist/overlay/alert-dialog.d.ts +42 -0
- package/dist/overlay/alert-dialog.js +23 -0
- package/dist/overlay/alert-dialog.js.map +1 -0
- package/dist/overlay/popover.d.ts +41 -0
- package/dist/overlay/popover.js +17 -0
- package/dist/overlay/popover.js.map +1 -0
- package/dist/overlay/sheet.d.ts +47 -0
- package/dist/overlay/sheet.js +29 -0
- package/dist/overlay/sheet.js.map +1 -0
- package/dist/overlay/tooltip.d.ts +31 -0
- package/dist/overlay/tooltip.js +15 -0
- package/dist/overlay/tooltip.js.map +1 -0
- package/dist/tabs/tabs.d.ts +24 -0
- package/dist/tabs/tabs.js +15 -0
- package/dist/tabs/tabs.js.map +1 -0
- package/dist/tabs/toggle-group.d.ts +19 -0
- package/dist/tabs/toggle-group.js +11 -0
- package/dist/tabs/toggle-group.js.map +1 -0
- package/package.json +25 -7
- package/dist/chunk-7GXL7U5X.js.map +0 -1
- package/dist/chunk-BWYWI4BC.js +0 -43
- package/dist/chunk-BWYWI4BC.js.map +0 -1
- package/dist/chunk-CZ3JB37A.js +0 -72
- package/dist/chunk-CZ3JB37A.js.map +0 -1
- package/dist/chunk-G2XJK244.js +0 -96
- package/dist/chunk-G2XJK244.js.map +0 -1
- package/dist/chunk-OWIUMX76.js +0 -91
- package/dist/chunk-OWIUMX76.js.map +0 -1
- package/dist/chunk-S4HVXD6Z.js +0 -92
- package/dist/chunk-S4HVXD6Z.js.map +0 -1
- package/dist/chunk-XGYKA3GE.js +0 -30
- package/dist/chunk-XGYKA3GE.js.map +0 -1
- package/dist/chunk-YX6MSLUB.js +0 -98
- package/dist/chunk-YX6MSLUB.js.map +0 -1
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
cn
|
|
5
|
+
} from "./chunk-DXRY7AS4.js";
|
|
6
|
+
|
|
7
|
+
// src/navigation/navigation-menu.tsx
|
|
8
|
+
import * as React from "react";
|
|
9
|
+
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
10
|
+
import { CaretDown } from "@phosphor-icons/react";
|
|
11
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
var FOCUS = "outline-hidden focus-visible:outline-solid focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-focus";
|
|
13
|
+
var NavigationMenu = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
14
|
+
NavigationMenuPrimitive.Root,
|
|
15
|
+
{
|
|
16
|
+
ref,
|
|
17
|
+
className: cn("relative z-10 flex items-stretch", className),
|
|
18
|
+
...props,
|
|
19
|
+
children: [
|
|
20
|
+
children,
|
|
21
|
+
/* @__PURE__ */ jsx(NavigationMenuViewport, {})
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
));
|
|
25
|
+
NavigationMenu.displayName = "NavigationMenu";
|
|
26
|
+
var NavigationMenuList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(NavigationMenuPrimitive.List, { ref, className: cn("flex items-stretch", className), ...props }));
|
|
27
|
+
NavigationMenuList.displayName = "NavigationMenuList";
|
|
28
|
+
var NavigationMenuItem = NavigationMenuPrimitive.Item;
|
|
29
|
+
var navigationMenuTriggerStyle = () => cn(
|
|
30
|
+
"group/nav inline-flex h-12 items-center gap-2 border-r border-outline px-4 sv-label-lg whitespace-nowrap text-on-surface",
|
|
31
|
+
"transition-colors duration-(--sv-sys-motion-duration-fast) ease-standard hover:bg-surface-subtle active:bg-surface-muted",
|
|
32
|
+
"data-[state=open]:bg-surface-subtle data-[active]:bg-surface-muted",
|
|
33
|
+
"disabled:pointer-events-none disabled:opacity-40",
|
|
34
|
+
FOCUS
|
|
35
|
+
);
|
|
36
|
+
var NavigationMenuTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(NavigationMenuPrimitive.Trigger, { ref, className: cn(navigationMenuTriggerStyle(), className), ...props, children: [
|
|
37
|
+
children,
|
|
38
|
+
/* @__PURE__ */ jsx(
|
|
39
|
+
CaretDown,
|
|
40
|
+
{
|
|
41
|
+
size: 14,
|
|
42
|
+
"aria-hidden": true,
|
|
43
|
+
className: "transition-transform duration-(--sv-sys-motion-duration-base) ease-standard group-data-[state=open]/nav:rotate-180 motion-reduce:transition-none"
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
] }));
|
|
47
|
+
NavigationMenuTrigger.displayName = "NavigationMenuTrigger";
|
|
48
|
+
var NavigationMenuContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
49
|
+
NavigationMenuPrimitive.Content,
|
|
50
|
+
{
|
|
51
|
+
ref,
|
|
52
|
+
className: cn(
|
|
53
|
+
"left-0 top-0 w-full p-inset-sm md:absolute md:w-auto",
|
|
54
|
+
className
|
|
55
|
+
),
|
|
56
|
+
...props
|
|
57
|
+
}
|
|
58
|
+
));
|
|
59
|
+
NavigationMenuContent.displayName = "NavigationMenuContent";
|
|
60
|
+
var NavigationMenuViewport = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "absolute left-0 top-full flex justify-start", children: /* @__PURE__ */ jsx(
|
|
61
|
+
NavigationMenuPrimitive.Viewport,
|
|
62
|
+
{
|
|
63
|
+
ref,
|
|
64
|
+
className: cn(
|
|
65
|
+
"relative h-(--radix-navigation-menu-viewport-height) w-full origin-top overflow-hidden md:w-(--radix-navigation-menu-viewport-width)",
|
|
66
|
+
"border border-outline bg-surface text-on-surface shadow-nav",
|
|
67
|
+
className
|
|
68
|
+
),
|
|
69
|
+
...props
|
|
70
|
+
}
|
|
71
|
+
) }));
|
|
72
|
+
NavigationMenuViewport.displayName = "NavigationMenuViewport";
|
|
73
|
+
var NavigationMenuLink = React.forwardRef(({ className, description, children, asChild, ...props }, ref) => {
|
|
74
|
+
if (asChild) {
|
|
75
|
+
return /* @__PURE__ */ jsx(NavigationMenuPrimitive.Link, { ref, asChild: true, className, ...props, children });
|
|
76
|
+
}
|
|
77
|
+
return /* @__PURE__ */ jsxs(
|
|
78
|
+
NavigationMenuPrimitive.Link,
|
|
79
|
+
{
|
|
80
|
+
ref,
|
|
81
|
+
className: cn(
|
|
82
|
+
"flex flex-col gap-1 p-inset-sm text-on-surface transition-colors duration-(--sv-sys-motion-duration-fast) ease-standard",
|
|
83
|
+
"hover:bg-surface-subtle active:bg-surface-muted data-[active]:bg-surface-muted",
|
|
84
|
+
FOCUS,
|
|
85
|
+
className
|
|
86
|
+
),
|
|
87
|
+
...props,
|
|
88
|
+
children: [
|
|
89
|
+
/* @__PURE__ */ jsx("span", { className: "sv-label-lg", children }),
|
|
90
|
+
description ? /* @__PURE__ */ jsx("span", { className: "sv-body-sm text-on-surface-variant", children: description }) : null
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
});
|
|
95
|
+
NavigationMenuLink.displayName = "NavigationMenuLink";
|
|
96
|
+
var NavigationMenuIndicator = NavigationMenuPrimitive.Indicator;
|
|
97
|
+
|
|
98
|
+
export {
|
|
99
|
+
NavigationMenu,
|
|
100
|
+
NavigationMenuList,
|
|
101
|
+
NavigationMenuItem,
|
|
102
|
+
navigationMenuTriggerStyle,
|
|
103
|
+
NavigationMenuTrigger,
|
|
104
|
+
NavigationMenuContent,
|
|
105
|
+
NavigationMenuViewport,
|
|
106
|
+
NavigationMenuLink,
|
|
107
|
+
NavigationMenuIndicator
|
|
108
|
+
};
|
|
109
|
+
//# sourceMappingURL=chunk-AQHYE6EF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/navigation/navigation-menu.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';\nimport { CaretDown } from '@phosphor-icons/react';\nimport { cn } from '@/lib/utils';\n\n/**\n * Cairn NavigationMenu: the mega-menu, on Radix NavigationMenu. Radix owns what a hand-rolled\n * hover menu always gets wrong: the trigger is a real disclosure button (`aria-expanded`), the\n * panel is reachable by keyboard and closes on Escape, pointer intent is debounced so crossing\n * a neighbouring trigger does not flash its panel, and one shared viewport holds every panel.\n *\n * Triggers are cells (`h-12`, hairline between, paper hover, the open trigger holds the hover\n * fill), so the menu sits in a `NavBar` row without a seam. Panels appear instantly, flush\n * under the row, and the viewport takes each panel's size at once (no slide,\n * no resize animation). The caret turns on open: an affordance, not decoration.\n *\n * Overlay surface: square, hairline and the light four-layer `nav` shadow.\n */\n\nconst FOCUS =\n 'outline-hidden focus-visible:outline-solid focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-focus';\n\nexport const NavigationMenu = React.forwardRef<\n React.ComponentRef<typeof NavigationMenuPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Root\n ref={ref}\n className={cn('relative z-10 flex items-stretch', className)}\n {...props}\n >\n {children}\n <NavigationMenuViewport />\n </NavigationMenuPrimitive.Root>\n));\nNavigationMenu.displayName = 'NavigationMenu';\n\nexport const NavigationMenuList = React.forwardRef<\n React.ComponentRef<typeof NavigationMenuPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.List ref={ref} className={cn('flex items-stretch', className)} {...props} />\n));\nNavigationMenuList.displayName = 'NavigationMenuList';\n\nexport const NavigationMenuItem = NavigationMenuPrimitive.Item;\n\n/** The cell look, exported for a plain link that sits in the same row as the triggers. */\nexport const navigationMenuTriggerStyle = () =>\n cn(\n 'group/nav inline-flex h-12 items-center gap-2 border-r border-outline px-4 sv-label-lg whitespace-nowrap text-on-surface',\n 'transition-colors duration-(--sv-sys-motion-duration-fast) ease-standard hover:bg-surface-subtle active:bg-surface-muted',\n 'data-[state=open]:bg-surface-subtle data-[active]:bg-surface-muted',\n 'disabled:pointer-events-none disabled:opacity-40',\n FOCUS\n );\n\nexport const NavigationMenuTrigger = React.forwardRef<\n React.ComponentRef<typeof NavigationMenuPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Trigger ref={ref} className={cn(navigationMenuTriggerStyle(), className)} {...props}>\n {children}\n <CaretDown\n size={14}\n aria-hidden\n className=\"transition-transform duration-(--sv-sys-motion-duration-base) ease-standard group-data-[state=open]/nav:rotate-180 motion-reduce:transition-none\"\n />\n </NavigationMenuPrimitive.Trigger>\n));\nNavigationMenuTrigger.displayName = 'NavigationMenuTrigger';\n\nexport const NavigationMenuContent = React.forwardRef<\n React.ComponentRef<typeof NavigationMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Content\n ref={ref}\n className={cn(\n 'left-0 top-0 w-full p-inset-sm md:absolute md:w-auto',\n className\n )}\n {...props}\n />\n));\nNavigationMenuContent.displayName = 'NavigationMenuContent';\n\nexport const NavigationMenuViewport = React.forwardRef<\n React.ComponentRef<typeof NavigationMenuPrimitive.Viewport>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>\n>(({ className, ...props }, ref) => (\n <div className=\"absolute left-0 top-full flex justify-start\">\n <NavigationMenuPrimitive.Viewport\n ref={ref}\n className={cn(\n 'relative h-(--radix-navigation-menu-viewport-height) w-full origin-top overflow-hidden md:w-(--radix-navigation-menu-viewport-width)',\n 'border border-outline bg-surface text-on-surface shadow-nav',\n className\n )}\n {...props}\n />\n </div>\n));\nNavigationMenuViewport.displayName = 'NavigationMenuViewport';\n\nexport interface NavigationMenuLinkProps\n extends React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Link> {\n /** Supporting line under the link's label. */\n description?: React.ReactNode;\n}\n\n/**\n * A link inside a panel: a row that takes the hover fill, with an optional description in the\n * variant tone. Pass `asChild` to wrap a framework link; `active` marks the current page.\n */\nexport const NavigationMenuLink = React.forwardRef<\n React.ComponentRef<typeof NavigationMenuPrimitive.Link>,\n NavigationMenuLinkProps\n>(({ className, description, children, asChild, ...props }, ref) => {\n if (asChild) {\n return <NavigationMenuPrimitive.Link ref={ref} asChild className={className} {...props}>{children}</NavigationMenuPrimitive.Link>;\n }\n return (\n <NavigationMenuPrimitive.Link\n ref={ref}\n className={cn(\n 'flex flex-col gap-1 p-inset-sm text-on-surface transition-colors duration-(--sv-sys-motion-duration-fast) ease-standard',\n 'hover:bg-surface-subtle active:bg-surface-muted data-[active]:bg-surface-muted',\n FOCUS,\n className\n )}\n {...props}\n >\n <span className=\"sv-label-lg\">{children}</span>\n {description ? <span className=\"sv-body-sm text-on-surface-variant\">{description}</span> : null}\n </NavigationMenuPrimitive.Link>\n );\n});\nNavigationMenuLink.displayName = 'NavigationMenuLink';\n\nexport const NavigationMenuIndicator = NavigationMenuPrimitive.Indicator;\n\n"],"mappings":";;;;;AAEA,YAAY,WAAW;AACvB,YAAY,6BAA6B;AACzC,SAAS,iBAAiB;AAwBxB,SAME,KANF;AAPF,IAAM,QACJ;AAEK,IAAM,iBAAuB,iBAGlC,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QACpC;AAAA,EAAyB;AAAA,EAAxB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,oCAAoC,SAAS;AAAA,IAC1D,GAAG;AAAA,IAEH;AAAA;AAAA,MACD,oBAAC,0BAAuB;AAAA;AAAA;AAC1B,CACD;AACD,eAAe,cAAc;AAEtB,IAAM,qBAA2B,iBAGtC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,oBAAyB,8BAAxB,EAA6B,KAAU,WAAW,GAAG,sBAAsB,SAAS,GAAI,GAAG,OAAO,CACpG;AACD,mBAAmB,cAAc;AAE1B,IAAM,qBAA6C;AAGnD,IAAM,6BAA6B,MACxC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEK,IAAM,wBAA8B,iBAGzC,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QACpC,qBAAyB,iCAAxB,EAAgC,KAAU,WAAW,GAAG,2BAA2B,GAAG,SAAS,GAAI,GAAG,OACpG;AAAA;AAAA,EACD;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN,eAAW;AAAA,MACX,WAAU;AAAA;AAAA,EACZ;AAAA,GACF,CACD;AACD,sBAAsB,cAAc;AAE7B,IAAM,wBAA8B,iBAGzC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAyB;AAAA,EAAxB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,sBAAsB,cAAc;AAE7B,IAAM,yBAA+B,iBAG1C,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,oBAAC,SAAI,WAAU,+CACb;AAAA,EAAyB;AAAA,EAAxB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,GACF,CACD;AACD,uBAAuB,cAAc;AAY9B,IAAM,qBAA2B,iBAGtC,CAAC,EAAE,WAAW,aAAa,UAAU,SAAS,GAAG,MAAM,GAAG,QAAQ;AAClE,MAAI,SAAS;AACX,WAAO,oBAAyB,8BAAxB,EAA6B,KAAU,SAAO,MAAC,WAAuB,GAAG,OAAQ,UAAS;AAAA,EACpG;AACA,SACE;AAAA,IAAyB;AAAA,IAAxB;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEJ;AAAA,4BAAC,UAAK,WAAU,eAAe,UAAS;AAAA,QACvC,cAAc,oBAAC,UAAK,WAAU,sCAAsC,uBAAY,IAAU;AAAA;AAAA;AAAA,EAC7F;AAEJ,CAAC;AACD,mBAAmB,cAAc;AAE1B,IAAM,0BAAkD;","names":[]}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
MENU_CONTENT,
|
|
5
|
+
MENU_DANGER,
|
|
6
|
+
MENU_INDICATOR,
|
|
7
|
+
MENU_INSET,
|
|
8
|
+
MENU_ITEM,
|
|
9
|
+
MENU_LABEL,
|
|
10
|
+
MENU_SEPARATOR,
|
|
11
|
+
MENU_SHORTCUT
|
|
12
|
+
} from "./chunk-R23U2FRV.js";
|
|
13
|
+
import {
|
|
14
|
+
cn
|
|
15
|
+
} from "./chunk-DXRY7AS4.js";
|
|
16
|
+
|
|
17
|
+
// src/actions/context-menu.tsx
|
|
18
|
+
import * as React from "react";
|
|
19
|
+
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
20
|
+
import { Check, CaretRight, Circle } from "@phosphor-icons/react";
|
|
21
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
22
|
+
var ContextMenu = ContextMenuPrimitive.Root;
|
|
23
|
+
var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
|
|
24
|
+
var ContextMenuGroup = ContextMenuPrimitive.Group;
|
|
25
|
+
var ContextMenuPortal = ContextMenuPrimitive.Portal;
|
|
26
|
+
var ContextMenuSub = ContextMenuPrimitive.Sub;
|
|
27
|
+
var ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
|
|
28
|
+
var ContextMenuContent = React.forwardRef(({ className, collisionPadding = 12, container, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { container: container ?? void 0, children: /* @__PURE__ */ jsx(
|
|
29
|
+
ContextMenuPrimitive.Content,
|
|
30
|
+
{
|
|
31
|
+
ref,
|
|
32
|
+
collisionPadding,
|
|
33
|
+
className: cn(MENU_CONTENT, "max-h-(--radix-context-menu-content-available-height) origin-(--radix-context-menu-content-transform-origin)", className),
|
|
34
|
+
...props
|
|
35
|
+
}
|
|
36
|
+
) }));
|
|
37
|
+
ContextMenuContent.displayName = "ContextMenuContent";
|
|
38
|
+
var ContextMenuItem = React.forwardRef(({ className, inset, variant = "default", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
39
|
+
ContextMenuPrimitive.Item,
|
|
40
|
+
{
|
|
41
|
+
ref,
|
|
42
|
+
className: cn(
|
|
43
|
+
MENU_ITEM,
|
|
44
|
+
inset && MENU_INSET,
|
|
45
|
+
variant === "danger" && MENU_DANGER,
|
|
46
|
+
className
|
|
47
|
+
),
|
|
48
|
+
...props
|
|
49
|
+
}
|
|
50
|
+
));
|
|
51
|
+
ContextMenuItem.displayName = "ContextMenuItem";
|
|
52
|
+
var ContextMenuCheckboxItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(ContextMenuPrimitive.CheckboxItem, { ref, className: cn(MENU_ITEM, MENU_INSET, className), ...props, children: [
|
|
53
|
+
/* @__PURE__ */ jsx("span", { className: MENU_INDICATOR, children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { size: 14, weight: "bold", "aria-hidden": true }) }) }),
|
|
54
|
+
children
|
|
55
|
+
] }));
|
|
56
|
+
ContextMenuCheckboxItem.displayName = "ContextMenuCheckboxItem";
|
|
57
|
+
var ContextMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(ContextMenuPrimitive.RadioItem, { ref, className: cn(MENU_ITEM, MENU_INSET, className), ...props, children: [
|
|
58
|
+
/* @__PURE__ */ jsx("span", { className: MENU_INDICATOR, children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { size: 8, weight: "fill", "aria-hidden": true }) }) }),
|
|
59
|
+
children
|
|
60
|
+
] }));
|
|
61
|
+
ContextMenuRadioItem.displayName = "ContextMenuRadioItem";
|
|
62
|
+
var ContextMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
63
|
+
ContextMenuPrimitive.Label,
|
|
64
|
+
{
|
|
65
|
+
ref,
|
|
66
|
+
className: cn(MENU_LABEL, inset && MENU_INSET, className),
|
|
67
|
+
...props
|
|
68
|
+
}
|
|
69
|
+
));
|
|
70
|
+
ContextMenuLabel.displayName = "ContextMenuLabel";
|
|
71
|
+
var ContextMenuSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.Separator, { ref, className: cn(MENU_SEPARATOR, className), ...props }));
|
|
72
|
+
ContextMenuSeparator.displayName = "ContextMenuSeparator";
|
|
73
|
+
function ContextMenuShortcut({ className, ...props }) {
|
|
74
|
+
return /* @__PURE__ */ jsx("span", { className: cn(MENU_SHORTCUT, className), ...props });
|
|
75
|
+
}
|
|
76
|
+
var ContextMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
77
|
+
ContextMenuPrimitive.SubTrigger,
|
|
78
|
+
{
|
|
79
|
+
ref,
|
|
80
|
+
className: cn(MENU_ITEM, "data-[state=open]:bg-surface-subtle", inset && MENU_INSET, className),
|
|
81
|
+
...props,
|
|
82
|
+
children: [
|
|
83
|
+
children,
|
|
84
|
+
/* @__PURE__ */ jsx(CaretRight, { size: 16, "aria-hidden": true, className: "ml-auto" })
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
));
|
|
88
|
+
ContextMenuSubTrigger.displayName = "ContextMenuSubTrigger";
|
|
89
|
+
var ContextMenuSubContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
90
|
+
ContextMenuPrimitive.SubContent,
|
|
91
|
+
{
|
|
92
|
+
ref,
|
|
93
|
+
className: cn(MENU_CONTENT, "origin-(--radix-context-menu-content-transform-origin)", className),
|
|
94
|
+
...props
|
|
95
|
+
}
|
|
96
|
+
) }));
|
|
97
|
+
ContextMenuSubContent.displayName = "ContextMenuSubContent";
|
|
98
|
+
ContextMenuShortcut.displayName = "ContextMenuShortcut";
|
|
99
|
+
|
|
100
|
+
export {
|
|
101
|
+
ContextMenu,
|
|
102
|
+
ContextMenuTrigger,
|
|
103
|
+
ContextMenuGroup,
|
|
104
|
+
ContextMenuPortal,
|
|
105
|
+
ContextMenuSub,
|
|
106
|
+
ContextMenuRadioGroup,
|
|
107
|
+
ContextMenuContent,
|
|
108
|
+
ContextMenuItem,
|
|
109
|
+
ContextMenuCheckboxItem,
|
|
110
|
+
ContextMenuRadioItem,
|
|
111
|
+
ContextMenuLabel,
|
|
112
|
+
ContextMenuSeparator,
|
|
113
|
+
ContextMenuShortcut,
|
|
114
|
+
ContextMenuSubTrigger,
|
|
115
|
+
ContextMenuSubContent
|
|
116
|
+
};
|
|
117
|
+
//# sourceMappingURL=chunk-AWVTRQZJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/actions/context-menu.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as ContextMenuPrimitive from '@radix-ui/react-context-menu';\nimport { Check, CaretRight, Circle } from '@phosphor-icons/react';\nimport { cn } from '@/lib/utils';\nimport {\n MENU_CONTENT,\n MENU_ITEM,\n MENU_INSET,\n MENU_INDICATOR,\n MENU_LABEL,\n MENU_SEPARATOR,\n MENU_SHORTCUT,\n MENU_DANGER,\n} from './menu-styles';\n\n/**\n * Cairn ContextMenu, on Radix ContextMenu: the same panel, items and indicators as\n * `DropdownMenu`, opened by right click or long press on the trigger area, and by the context\n * menu key or Shift+F10 from the keyboard. Radix places it at the pointer and handles focus,\n * typeahead, submenus and dismissal.\n *\n * A context menu is a shortcut, never the only path to an action: whatever it offers must also\n * be reachable from a visible control, because a right click is invisible until you know it\n * exists.\n */\n\n\nexport const ContextMenu = ContextMenuPrimitive.Root;\nexport const ContextMenuTrigger = ContextMenuPrimitive.Trigger;\nexport const ContextMenuGroup = ContextMenuPrimitive.Group;\nexport const ContextMenuPortal = ContextMenuPrimitive.Portal;\nexport const ContextMenuSub = ContextMenuPrimitive.Sub;\nexport const ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;\n\nexport interface ContextMenuContentProps\n extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content> {\n /** Where the portal mounts. Defaults to `document.body`. See `PopoverContent`. */\n container?: HTMLElement | null;\n}\n\nexport const ContextMenuContent = React.forwardRef<\n React.ComponentRef<typeof ContextMenuPrimitive.Content>,\n ContextMenuContentProps\n>(({ className, collisionPadding = 12, container, ...props }, ref) => (\n <ContextMenuPrimitive.Portal container={container ?? undefined}>\n <ContextMenuPrimitive.Content\n ref={ref}\n collisionPadding={collisionPadding}\n className={cn(MENU_CONTENT, 'max-h-(--radix-context-menu-content-available-height) origin-(--radix-context-menu-content-transform-origin)', className)}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n));\nContextMenuContent.displayName = 'ContextMenuContent';\n\nexport interface ContextMenuItemProps\n extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> {\n /** Indent to align with items that carry an indicator. */\n inset?: boolean;\n /** A destructive action: error container on highlight, text stays ink. */\n variant?: 'default' | 'danger';\n}\n\nexport const ContextMenuItem = React.forwardRef<\n React.ComponentRef<typeof ContextMenuPrimitive.Item>,\n ContextMenuItemProps\n>(({ className, inset, variant = 'default', ...props }, ref) => (\n <ContextMenuPrimitive.Item\n ref={ref}\n className={cn(\n MENU_ITEM,\n inset && MENU_INSET,\n variant === 'danger' && MENU_DANGER,\n className\n )}\n {...props}\n />\n));\nContextMenuItem.displayName = 'ContextMenuItem';\n\nexport const ContextMenuCheckboxItem = React.forwardRef<\n React.ComponentRef<typeof ContextMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem>\n>(({ className, children, ...props }, ref) => (\n <ContextMenuPrimitive.CheckboxItem ref={ref} className={cn(MENU_ITEM, MENU_INSET, className)} {...props}>\n <span className={MENU_INDICATOR}>\n <ContextMenuPrimitive.ItemIndicator>\n <Check size={14} weight=\"bold\" aria-hidden />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n));\nContextMenuCheckboxItem.displayName = 'ContextMenuCheckboxItem';\n\nexport const ContextMenuRadioItem = React.forwardRef<\n React.ComponentRef<typeof ContextMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <ContextMenuPrimitive.RadioItem ref={ref} className={cn(MENU_ITEM, MENU_INSET, className)} {...props}>\n <span className={MENU_INDICATOR}>\n <ContextMenuPrimitive.ItemIndicator>\n <Circle size={8} weight=\"fill\" aria-hidden />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n));\nContextMenuRadioItem.displayName = 'ContextMenuRadioItem';\n\nexport const ContextMenuLabel = React.forwardRef<\n React.ComponentRef<typeof ContextMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.Label\n ref={ref}\n className={cn(MENU_LABEL, inset && MENU_INSET, className)}\n {...props}\n />\n));\nContextMenuLabel.displayName = 'ContextMenuLabel';\n\nexport const ContextMenuSeparator = React.forwardRef<\n React.ComponentRef<typeof ContextMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Separator ref={ref} className={cn(MENU_SEPARATOR, className)} {...props} />\n));\nContextMenuSeparator.displayName = 'ContextMenuSeparator';\n\n/** A keyboard hint at the end of a row. Text from the consumer; tabular figures, no second family. */\nexport function ContextMenuShortcut({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) {\n return <span className={cn(MENU_SHORTCUT, className)} {...props} />;\n}\n\nexport const ContextMenuSubTrigger = React.forwardRef<\n React.ComponentRef<typeof ContextMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> & { inset?: boolean }\n>(({ className, inset, children, ...props }, ref) => (\n <ContextMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(MENU_ITEM, 'data-[state=open]:bg-surface-subtle', inset && MENU_INSET, className)}\n {...props}\n >\n {children}\n <CaretRight size={16} aria-hidden className=\"ml-auto\" />\n </ContextMenuPrimitive.SubTrigger>\n));\nContextMenuSubTrigger.displayName = 'ContextMenuSubTrigger';\n\nexport const ContextMenuSubContent = React.forwardRef<\n React.ComponentRef<typeof ContextMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.SubContent\n ref={ref}\n className={cn(MENU_CONTENT, 'origin-(--radix-context-menu-content-transform-origin)', className)}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n));\nContextMenuSubContent.displayName = 'ContextMenuSubContent';\n\nContextMenuShortcut.displayName = 'ContextMenuShortcut';\n"],"mappings":";;;;;;;;;;;;;;;AAEA,YAAY,WAAW;AACvB,YAAY,0BAA0B;AACtC,SAAS,OAAO,YAAY,cAAc;AA2CtC,cAuCF,YAvCE;AAlBG,IAAM,cAAmC;AACzC,IAAM,qBAA0C;AAChD,IAAM,mBAAwC;AAC9C,IAAM,oBAAyC;AAC/C,IAAM,iBAAsC;AAC5C,IAAM,wBAA6C;AAQnD,IAAM,qBAA2B,iBAGtC,CAAC,EAAE,WAAW,mBAAmB,IAAI,WAAW,GAAG,MAAM,GAAG,QAC5D,oBAAsB,6BAArB,EAA4B,WAAW,aAAa,QACnD;AAAA,EAAsB;AAAA,EAArB;AAAA,IACC;AAAA,IACA;AAAA,IACA,WAAW,GAAG,cAAc,gHAAgH,SAAS;AAAA,IACpJ,GAAG;AAAA;AACN,GACF,CACD;AACD,mBAAmB,cAAc;AAU1B,IAAM,kBAAwB,iBAGnC,CAAC,EAAE,WAAW,OAAO,UAAU,WAAW,GAAG,MAAM,GAAG,QACtD;AAAA,EAAsB;AAAA,EAArB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA,SAAS;AAAA,MACT,YAAY,YAAY;AAAA,MACxB;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,gBAAgB,cAAc;AAEvB,IAAM,0BAAgC,iBAG3C,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QACpC,qBAAsB,mCAArB,EAAkC,KAAU,WAAW,GAAG,WAAW,YAAY,SAAS,GAAI,GAAG,OAChG;AAAA,sBAAC,UAAK,WAAW,gBACf,8BAAsB,oCAArB,EACC,8BAAC,SAAM,MAAM,IAAI,QAAO,QAAO,eAAW,MAAC,GAC7C,GACF;AAAA,EACC;AAAA,GACH,CACD;AACD,wBAAwB,cAAc;AAE/B,IAAM,uBAA6B,iBAGxC,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QACpC,qBAAsB,gCAArB,EAA+B,KAAU,WAAW,GAAG,WAAW,YAAY,SAAS,GAAI,GAAG,OAC7F;AAAA,sBAAC,UAAK,WAAW,gBACf,8BAAsB,oCAArB,EACC,8BAAC,UAAO,MAAM,GAAG,QAAO,QAAO,eAAW,MAAC,GAC7C,GACF;AAAA,EACC;AAAA,GACH,CACD;AACD,qBAAqB,cAAc;AAE5B,IAAM,mBAAyB,iBAGpC,CAAC,EAAE,WAAW,OAAO,GAAG,MAAM,GAAG,QACjC;AAAA,EAAsB;AAAA,EAArB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,YAAY,SAAS,YAAY,SAAS;AAAA,IACvD,GAAG;AAAA;AACN,CACD;AACD,iBAAiB,cAAc;AAExB,IAAM,uBAA6B,iBAGxC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,oBAAsB,gCAArB,EAA+B,KAAU,WAAW,GAAG,gBAAgB,SAAS,GAAI,GAAG,OAAO,CAChG;AACD,qBAAqB,cAAc;AAG5B,SAAS,oBAAoB,EAAE,WAAW,GAAG,MAAM,GAA0C;AAClG,SAAO,oBAAC,UAAK,WAAW,GAAG,eAAe,SAAS,GAAI,GAAG,OAAO;AACnE;AAEO,IAAM,wBAA8B,iBAGzC,CAAC,EAAE,WAAW,OAAO,UAAU,GAAG,MAAM,GAAG,QAC3C;AAAA,EAAsB;AAAA,EAArB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,WAAW,uCAAuC,SAAS,YAAY,SAAS;AAAA,IAC7F,GAAG;AAAA,IAEH;AAAA;AAAA,MACD,oBAAC,cAAW,MAAM,IAAI,eAAW,MAAC,WAAU,WAAU;AAAA;AAAA;AACxD,CACD;AACD,sBAAsB,cAAc;AAE7B,IAAM,wBAA8B,iBAGzC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,oBAAsB,6BAArB,EACC;AAAA,EAAsB;AAAA,EAArB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,cAAc,0DAA0D,SAAS;AAAA,IAC9F,GAAG;AAAA;AACN,GACF,CACD;AACD,sBAAsB,cAAc;AAEpC,oBAAoB,cAAc;","names":[]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// src/feedback/tone.tsx
|
|
2
|
+
import { CheckCircle, Info, Warning, WarningCircle, Bell } from "@phosphor-icons/react";
|
|
3
|
+
var TONE_CONTAINER = {
|
|
4
|
+
neutral: "bg-surface-subtle text-on-surface",
|
|
5
|
+
info: "bg-info-container text-on-info-container",
|
|
6
|
+
success: "bg-success-container text-on-success-container",
|
|
7
|
+
warning: "bg-warning-container text-on-warning-container",
|
|
8
|
+
error: "bg-error-container text-on-error-container"
|
|
9
|
+
};
|
|
10
|
+
var TONE_SCOPE = {
|
|
11
|
+
neutral: "",
|
|
12
|
+
info: "[--sv-sys-color-on-surface:var(--sv-sys-color-on-info-container)] [--sv-sys-color-focus:var(--sv-sys-color-on-info-container)]",
|
|
13
|
+
success: "[--sv-sys-color-on-surface:var(--sv-sys-color-on-success-container)] [--sv-sys-color-focus:var(--sv-sys-color-on-success-container)]",
|
|
14
|
+
warning: "[--sv-sys-color-on-surface:var(--sv-sys-color-on-warning-container)] [--sv-sys-color-focus:var(--sv-sys-color-on-warning-container)]",
|
|
15
|
+
error: "[--sv-sys-color-on-surface:var(--sv-sys-color-on-error-container)] [--sv-sys-color-focus:var(--sv-sys-color-on-error-container)]"
|
|
16
|
+
};
|
|
17
|
+
var TONE_ICON = {
|
|
18
|
+
neutral: Bell,
|
|
19
|
+
info: Info,
|
|
20
|
+
success: CheckCircle,
|
|
21
|
+
warning: Warning,
|
|
22
|
+
error: WarningCircle
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export {
|
|
26
|
+
TONE_CONTAINER,
|
|
27
|
+
TONE_SCOPE,
|
|
28
|
+
TONE_ICON
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=chunk-BDQUFQE7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/feedback/tone.tsx"],"sourcesContent":["import { CheckCircle, Info, Warning, WarningCircle, Bell } from '@phosphor-icons/react';\nimport type { Icon as PhosphorIcon } from '@phosphor-icons/react';\n\n/**\n * The message tones shared by `Alert` and `Toast`. Hue means something only here (AGENTS.md\n * rule 4), and always as a `-container` fill with its paired `on-*-container` ink, never as\n * coloured text on the page. Meaning never rests on the colour: each tone carries its own\n * Phosphor glyph, so the message reads in greyscale too.\n */\nexport type Tone = 'neutral' | 'info' | 'success' | 'warning' | 'error';\n\nexport const TONE_CONTAINER: Record<Tone, string> = {\n neutral: 'bg-surface-subtle text-on-surface',\n info: 'bg-info-container text-on-info-container',\n success: 'bg-success-container text-on-success-container',\n warning: 'bg-warning-container text-on-warning-container',\n error: 'bg-error-container text-on-error-container',\n};\n\n/**\n * Ink scope for what a consumer drops INSIDE a status container (an Alert action). The\n * containers keep their light tint in every theme, so a child that reads the theme ink (a\n * secondary Button: `text-on-surface`, the `focus` outline) would turn cream on a pale fill in\n * dark and black (1.11:1). Inside the fill, the container's own ink stands in for both.\n */\nexport const TONE_SCOPE: Record<Tone, string> = {\n neutral: '',\n info: '[--sv-sys-color-on-surface:var(--sv-sys-color-on-info-container)] [--sv-sys-color-focus:var(--sv-sys-color-on-info-container)]',\n success: '[--sv-sys-color-on-surface:var(--sv-sys-color-on-success-container)] [--sv-sys-color-focus:var(--sv-sys-color-on-success-container)]',\n warning: '[--sv-sys-color-on-surface:var(--sv-sys-color-on-warning-container)] [--sv-sys-color-focus:var(--sv-sys-color-on-warning-container)]',\n error: '[--sv-sys-color-on-surface:var(--sv-sys-color-on-error-container)] [--sv-sys-color-focus:var(--sv-sys-color-on-error-container)]',\n};\n\nexport const TONE_ICON: Record<Tone, PhosphorIcon> = {\n neutral: Bell,\n info: Info,\n success: CheckCircle,\n warning: Warning,\n error: WarningCircle,\n};\n"],"mappings":";AAAA,SAAS,aAAa,MAAM,SAAS,eAAe,YAAY;AAWzD,IAAM,iBAAuC;AAAA,EAClD,SAAS;AAAA,EACT,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AACT;AAQO,IAAM,aAAmC;AAAA,EAC9C,SAAS;AAAA,EACT,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AACT;AAEO,IAAM,YAAwC;AAAA,EACnD,SAAS;AAAA,EACT,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
cn
|
|
5
|
+
} from "./chunk-DXRY7AS4.js";
|
|
6
|
+
|
|
7
|
+
// src/data-display/code-block.tsx
|
|
8
|
+
import * as React from "react";
|
|
9
|
+
import { Check, Copy } from "@phosphor-icons/react";
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
var CodeBlock = React.forwardRef(
|
|
12
|
+
({ className, code, title, copyLabel, copiedLabel, ...props }, ref) => {
|
|
13
|
+
const [copied, setCopied] = React.useState(false);
|
|
14
|
+
React.useEffect(() => {
|
|
15
|
+
if (!copied) return;
|
|
16
|
+
const t = setTimeout(() => setCopied(false), 2e3);
|
|
17
|
+
return () => clearTimeout(t);
|
|
18
|
+
}, [copied]);
|
|
19
|
+
const copy = async () => {
|
|
20
|
+
try {
|
|
21
|
+
await navigator.clipboard.writeText(code);
|
|
22
|
+
setCopied(true);
|
|
23
|
+
} catch {
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
const button = copyLabel ? /* @__PURE__ */ jsx(
|
|
27
|
+
"button",
|
|
28
|
+
{
|
|
29
|
+
type: "button",
|
|
30
|
+
onClick: copy,
|
|
31
|
+
"aria-label": copyLabel,
|
|
32
|
+
className: cn(
|
|
33
|
+
"inline-flex size-8 shrink-0 items-center justify-center text-on-inverse-surface transition-colors duration-(--sv-sys-motion-duration-fast) ease-standard hover:bg-on-inverse-surface/10 active:bg-on-inverse-surface/20",
|
|
34
|
+
"outline-hidden focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-on-inverse-surface"
|
|
35
|
+
),
|
|
36
|
+
children: copied ? /* @__PURE__ */ jsx(Check, { size: 16, "aria-hidden": true }) : /* @__PURE__ */ jsx(Copy, { size: 16, "aria-hidden": true })
|
|
37
|
+
}
|
|
38
|
+
) : null;
|
|
39
|
+
return /* @__PURE__ */ jsxs("div", { ref, className: cn("relative overflow-hidden bg-inverse-surface text-on-inverse-surface", className), ...props, children: [
|
|
40
|
+
title ? /* @__PURE__ */ jsxs("div", { className: "flex h-12 items-center justify-between gap-gap-sm border-b border-on-inverse-surface/15 pl-4 pr-2 sv-label-sm", children: [
|
|
41
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: title }),
|
|
42
|
+
button
|
|
43
|
+
] }) : button ? /* @__PURE__ */ jsx("div", { className: "absolute right-2 top-2", children: button }) : null,
|
|
44
|
+
/* @__PURE__ */ jsx("pre", { className: cn("overflow-x-auto p-inset-md sv-body-sm tabular-nums whitespace-pre", !title && button && "pr-12"), children: /* @__PURE__ */ jsx("code", { children: code }) }),
|
|
45
|
+
copiedLabel ? /* @__PURE__ */ jsx("span", { "aria-live": "polite", className: "sr-only", children: copied ? copiedLabel : "" }) : null
|
|
46
|
+
] });
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
CodeBlock.displayName = "CodeBlock";
|
|
50
|
+
|
|
51
|
+
export {
|
|
52
|
+
CodeBlock
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=chunk-BJKQSXX4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/data-display/code-block.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Check, Copy } from '@phosphor-icons/react';\nimport { cn } from '@/lib/utils';\n\n/**\n * Cairn CodeBlock. Code on the inverse surface: Cairn has one typeface (AGENTS.md rule 6), so a\n * snippet reads as code through its surface and its shape (the ink ground, square, a hairline\n * header), never through a mono family. `tabular-nums` keeps figures in columns and\n * `whitespace-pre` keeps the indentation; long lines scroll inside the block, never wrap.\n *\n * The copy button renders only when the consumer names it (`copyLabel`): no word is baked in.\n * After a copy the glyph turns to a check for two seconds, and `copiedLabel`, if given, is\n * announced through a polite live region. The focus outline uses the inverse ink, since the\n * regular focus colour is the very ink of this surface.\n */\nexport interface CodeBlockProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n /** The code, as text. */\n code: string;\n /** Header label: a file name or a language. */\n title?: React.ReactNode;\n /** Accessible name of the copy button. Omit for no button. */\n copyLabel?: string;\n /** Announced after a copy. */\n copiedLabel?: string;\n}\n\nexport const CodeBlock = React.forwardRef<HTMLDivElement, CodeBlockProps>(\n ({ className, code, title, copyLabel, copiedLabel, ...props }, ref) => {\n const [copied, setCopied] = React.useState(false);\n React.useEffect(() => {\n if (!copied) return;\n const t = setTimeout(() => setCopied(false), 2000);\n return () => clearTimeout(t);\n }, [copied]);\n const copy = async () => {\n try {\n await navigator.clipboard.writeText(code);\n setCopied(true);\n } catch {\n /* clipboard refused: nothing to announce */\n }\n };\n const button = copyLabel ? (\n <button\n type=\"button\"\n onClick={copy}\n aria-label={copyLabel}\n className={cn(\n 'inline-flex size-8 shrink-0 items-center justify-center text-on-inverse-surface transition-colors duration-(--sv-sys-motion-duration-fast) ease-standard hover:bg-on-inverse-surface/10 active:bg-on-inverse-surface/20',\n 'outline-hidden focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-on-inverse-surface'\n )}\n >\n {copied ? <Check size={16} aria-hidden /> : <Copy size={16} aria-hidden />}\n </button>\n ) : null;\n return (\n <div ref={ref} className={cn('relative overflow-hidden bg-inverse-surface text-on-inverse-surface', className)} {...props}>\n {title ? (\n <div className=\"flex h-12 items-center justify-between gap-gap-sm border-b border-on-inverse-surface/15 pl-4 pr-2 sv-label-sm\">\n <span className=\"truncate\">{title}</span>\n {button}\n </div>\n ) : button ? (\n <div className=\"absolute right-2 top-2\">{button}</div>\n ) : null}\n <pre className={cn('overflow-x-auto p-inset-md sv-body-sm tabular-nums whitespace-pre', !title && button && 'pr-12')}>\n <code>{code}</code>\n </pre>\n {copiedLabel ? (\n <span aria-live=\"polite\" className=\"sr-only\">\n {copied ? copiedLabel : ''}\n </span>\n ) : null}\n </div>\n );\n }\n);\nCodeBlock.displayName = 'CodeBlock';\n"],"mappings":";;;;;AAEA,YAAY,WAAW;AACvB,SAAS,OAAO,YAAY;AAmDV,cAMR,YANQ;AA1BX,IAAM,YAAkB;AAAA,EAC7B,CAAC,EAAE,WAAW,MAAM,OAAO,WAAW,aAAa,GAAG,MAAM,GAAG,QAAQ;AACrE,UAAM,CAAC,QAAQ,SAAS,IAAU,eAAS,KAAK;AAChD,IAAM,gBAAU,MAAM;AACpB,UAAI,CAAC,OAAQ;AACb,YAAM,IAAI,WAAW,MAAM,UAAU,KAAK,GAAG,GAAI;AACjD,aAAO,MAAM,aAAa,CAAC;AAAA,IAC7B,GAAG,CAAC,MAAM,CAAC;AACX,UAAM,OAAO,YAAY;AACvB,UAAI;AACF,cAAM,UAAU,UAAU,UAAU,IAAI;AACxC,kBAAU,IAAI;AAAA,MAChB,QAAQ;AAAA,MAER;AAAA,IACF;AACA,UAAM,SAAS,YACb;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,SAAS;AAAA,QACT,cAAY;AAAA,QACZ,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,QAEC,mBAAS,oBAAC,SAAM,MAAM,IAAI,eAAW,MAAC,IAAK,oBAAC,QAAK,MAAM,IAAI,eAAW,MAAC;AAAA;AAAA,IAC1E,IACE;AACJ,WACE,qBAAC,SAAI,KAAU,WAAW,GAAG,uEAAuE,SAAS,GAAI,GAAG,OACjH;AAAA,cACC,qBAAC,SAAI,WAAU,iHACb;AAAA,4BAAC,UAAK,WAAU,YAAY,iBAAM;AAAA,QACjC;AAAA,SACH,IACE,SACF,oBAAC,SAAI,WAAU,0BAA0B,kBAAO,IAC9C;AAAA,MACJ,oBAAC,SAAI,WAAW,GAAG,qEAAqE,CAAC,SAAS,UAAU,OAAO,GACjH,8BAAC,UAAM,gBAAK,GACd;AAAA,MACC,cACC,oBAAC,UAAK,aAAU,UAAS,WAAU,WAChC,mBAAS,cAAc,IAC1B,IACE;AAAA,OACN;AAAA,EAEJ;AACF;AACA,UAAU,cAAc;","names":[]}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
TONE_CONTAINER,
|
|
5
|
+
TONE_ICON
|
|
6
|
+
} from "./chunk-BDQUFQE7.js";
|
|
7
|
+
import {
|
|
8
|
+
cn
|
|
9
|
+
} from "./chunk-DXRY7AS4.js";
|
|
10
|
+
|
|
11
|
+
// src/feedback/toast.tsx
|
|
12
|
+
import * as React from "react";
|
|
13
|
+
import * as ToastPrimitive from "@radix-ui/react-toast";
|
|
14
|
+
import { X } from "@phosphor-icons/react";
|
|
15
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
+
var ToastProvider = ToastPrimitive.Provider;
|
|
17
|
+
var ToastViewport = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
18
|
+
ToastPrimitive.Viewport,
|
|
19
|
+
{
|
|
20
|
+
ref,
|
|
21
|
+
className: cn(
|
|
22
|
+
"fixed bottom-0 right-0 z-[100] m-0 flex max-h-dvh w-full list-none flex-col-reverse gap-gap-sm p-inset-md outline-none sm:max-w-md",
|
|
23
|
+
className
|
|
24
|
+
),
|
|
25
|
+
...props
|
|
26
|
+
}
|
|
27
|
+
));
|
|
28
|
+
ToastViewport.displayName = "ToastViewport";
|
|
29
|
+
var Toast = React.forwardRef(
|
|
30
|
+
({ className, tone = "neutral", icon, closeLabel, children, ...props }, ref) => {
|
|
31
|
+
const Glyph = TONE_ICON[tone];
|
|
32
|
+
const glyph = icon === void 0 ? /* @__PURE__ */ jsx(Glyph, { size: 16, "aria-hidden": true }) : icon;
|
|
33
|
+
return /* @__PURE__ */ jsxs(
|
|
34
|
+
ToastPrimitive.Root,
|
|
35
|
+
{
|
|
36
|
+
ref,
|
|
37
|
+
className: cn(
|
|
38
|
+
"group/toast relative flex w-full items-start gap-gap-sm border border-outline bg-surface p-inset-md pr-12 text-on-surface shadow-overlay",
|
|
39
|
+
"data-[state=open]:animate-sv-slide-y-in data-[state=closed]:animate-sv-fade-out motion-reduce:animate-none",
|
|
40
|
+
"data-[swipe=move]:translate-x-(--radix-toast-swipe-move-x) data-[swipe=cancel]:translate-x-0 data-[swipe=cancel]:transition-transform data-[swipe=end]:animate-sv-fade-out",
|
|
41
|
+
!closeLabel && "pr-4",
|
|
42
|
+
className
|
|
43
|
+
),
|
|
44
|
+
...props,
|
|
45
|
+
children: [
|
|
46
|
+
glyph ? /* @__PURE__ */ jsx("span", { className: cn("inline-flex size-8 shrink-0 items-center justify-center", TONE_CONTAINER[tone]), children: glyph }) : null,
|
|
47
|
+
/* @__PURE__ */ jsx("div", { className: "flex min-h-8 min-w-0 flex-1 flex-col justify-center gap-gap-xs", children }),
|
|
48
|
+
closeLabel ? /* @__PURE__ */ jsx(
|
|
49
|
+
ToastPrimitive.Close,
|
|
50
|
+
{
|
|
51
|
+
"aria-label": closeLabel,
|
|
52
|
+
className: cn(
|
|
53
|
+
"absolute right-3 top-3 inline-flex size-8 items-center justify-center text-on-surface transition-colors duration-(--sv-sys-motion-duration-fast) ease-standard hover:bg-ghost active:bg-ghost-hover",
|
|
54
|
+
"outline-hidden focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus"
|
|
55
|
+
),
|
|
56
|
+
children: /* @__PURE__ */ jsx(X, { size: 16, "aria-hidden": true })
|
|
57
|
+
}
|
|
58
|
+
) : null
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
Toast.displayName = "Toast";
|
|
65
|
+
var ToastTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ToastPrimitive.Title, { ref, className: cn("sv-label-lg", className), ...props }));
|
|
66
|
+
ToastTitle.displayName = "ToastTitle";
|
|
67
|
+
var ToastDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ToastPrimitive.Description, { ref, className: cn("sv-body-md text-on-surface-variant", className), ...props }));
|
|
68
|
+
ToastDescription.displayName = "ToastDescription";
|
|
69
|
+
var ToastAction = ToastPrimitive.Action;
|
|
70
|
+
var ToastClose = ToastPrimitive.Close;
|
|
71
|
+
|
|
72
|
+
export {
|
|
73
|
+
ToastProvider,
|
|
74
|
+
ToastViewport,
|
|
75
|
+
Toast,
|
|
76
|
+
ToastTitle,
|
|
77
|
+
ToastDescription,
|
|
78
|
+
ToastAction,
|
|
79
|
+
ToastClose
|
|
80
|
+
};
|
|
81
|
+
//# sourceMappingURL=chunk-BKSKRGK7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/feedback/toast.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as ToastPrimitive from '@radix-ui/react-toast';\nimport { X } from '@phosphor-icons/react';\nimport { cn } from '@/lib/utils';\nimport { TONE_CONTAINER, TONE_ICON, type Tone } from './tone';\n\n/**\n * Cairn Toast, on Radix Toast: a live region (`status`, or `alert` with `type=\"foreground\"`)\n * announced on arrival, a timer that pauses on hover, focus and window blur, swipe to dismiss,\n * F8 to reach the viewport from the keyboard, Escape to close.\n *\n * The toast is the menu surface (square paper, one hairline, the soft overlay shadow) with the\n * tone in a 32px glyph tile carrying the tone's container pairing (`tone.tsx`): the hue stays\n * on a fill, the words stay ink. It slides 4px in on arrival and fades out.\n *\n * A toast never holds the only path to something: an action in it needs `altText` naming a\n * way to do the same elsewhere (Radix enforces it). Every word is the consumer's, including\n * the close button's name (`closeLabel`; omitted, no button).\n */\nexport const ToastProvider = ToastPrimitive.Provider;\n\nexport const ToastViewport = React.forwardRef<\n React.ComponentRef<typeof ToastPrimitive.Viewport>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitive.Viewport>\n>(({ className, ...props }, ref) => (\n <ToastPrimitive.Viewport\n ref={ref}\n className={cn(\n 'fixed bottom-0 right-0 z-[100] m-0 flex max-h-dvh w-full list-none flex-col-reverse gap-gap-sm p-inset-md outline-none sm:max-w-md',\n className\n )}\n {...props}\n />\n));\nToastViewport.displayName = 'ToastViewport';\n\nexport interface ToastProps extends React.ComponentPropsWithoutRef<typeof ToastPrimitive.Root> {\n tone?: Tone;\n /** Replace the tone's glyph; `null` removes the tile. */\n icon?: React.ReactNode | null;\n /** Accessible name of a close button. Omit for no button. */\n closeLabel?: string;\n}\n\nexport const Toast = React.forwardRef<React.ComponentRef<typeof ToastPrimitive.Root>, ToastProps>(\n ({ className, tone = 'neutral', icon, closeLabel, children, ...props }, ref) => {\n const Glyph = TONE_ICON[tone];\n const glyph = icon === undefined ? <Glyph size={16} aria-hidden /> : icon;\n return (\n <ToastPrimitive.Root\n ref={ref}\n className={cn(\n 'group/toast relative flex w-full items-start gap-gap-sm border border-outline bg-surface p-inset-md pr-12 text-on-surface shadow-overlay',\n 'data-[state=open]:animate-sv-slide-y-in data-[state=closed]:animate-sv-fade-out motion-reduce:animate-none',\n 'data-[swipe=move]:translate-x-(--radix-toast-swipe-move-x) data-[swipe=cancel]:translate-x-0 data-[swipe=cancel]:transition-transform data-[swipe=end]:animate-sv-fade-out',\n !closeLabel && 'pr-4',\n className\n )}\n {...props}\n >\n {glyph ? (\n <span className={cn('inline-flex size-8 shrink-0 items-center justify-center', TONE_CONTAINER[tone])}>\n {glyph}\n </span>\n ) : null}\n <div className=\"flex min-h-8 min-w-0 flex-1 flex-col justify-center gap-gap-xs\">{children}</div>\n {closeLabel ? (\n <ToastPrimitive.Close\n aria-label={closeLabel}\n className={cn(\n 'absolute right-3 top-3 inline-flex size-8 items-center justify-center text-on-surface transition-colors duration-(--sv-sys-motion-duration-fast) ease-standard hover:bg-ghost active:bg-ghost-hover',\n 'outline-hidden focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus'\n )}\n >\n <X size={16} aria-hidden />\n </ToastPrimitive.Close>\n ) : null}\n </ToastPrimitive.Root>\n );\n }\n);\nToast.displayName = 'Toast';\n\nexport const ToastTitle = React.forwardRef<\n React.ComponentRef<typeof ToastPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <ToastPrimitive.Title ref={ref} className={cn('sv-label-lg', className)} {...props} />\n));\nToastTitle.displayName = 'ToastTitle';\n\nexport const ToastDescription = React.forwardRef<\n React.ComponentRef<typeof ToastPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <ToastPrimitive.Description ref={ref} className={cn('sv-body-md text-on-surface-variant', className)} {...props} />\n));\nToastDescription.displayName = 'ToastDescription';\n\n/** An action inside a toast. `altText` is required: it names another way to do the same. */\nexport const ToastAction = ToastPrimitive.Action;\nexport const ToastClose = ToastPrimitive.Close;\n\n"],"mappings":";;;;;;;;;AAEA,YAAY,WAAW;AACvB,YAAY,oBAAoB;AAChC,SAAS,SAAS;AAuBhB,cAwBI,YAxBJ;AANK,IAAM,gBAA+B;AAErC,IAAM,gBAAsB,iBAGjC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAgB;AAAA,EAAf;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,cAAc,cAAc;AAUrB,IAAM,QAAc;AAAA,EACzB,CAAC,EAAE,WAAW,OAAO,WAAW,MAAM,YAAY,UAAU,GAAG,MAAM,GAAG,QAAQ;AAC9E,UAAM,QAAQ,UAAU,IAAI;AAC5B,UAAM,QAAQ,SAAS,SAAY,oBAAC,SAAM,MAAM,IAAI,eAAW,MAAC,IAAK;AACrE,WACE;AAAA,MAAgB;AAAA,MAAf;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,UACA,CAAC,cAAc;AAAA,UACf;AAAA,QACF;AAAA,QACC,GAAG;AAAA,QAEH;AAAA,kBACC,oBAAC,UAAK,WAAW,GAAG,2DAA2D,eAAe,IAAI,CAAC,GAChG,iBACH,IACE;AAAA,UACJ,oBAAC,SAAI,WAAU,kEAAkE,UAAS;AAAA,UACzF,aACC;AAAA,YAAgB;AAAA,YAAf;AAAA,cACC,cAAY;AAAA,cACZ,WAAW;AAAA,gBACT;AAAA,gBACA;AAAA,cACF;AAAA,cAEA,8BAAC,KAAE,MAAM,IAAI,eAAW,MAAC;AAAA;AAAA,UAC3B,IACE;AAAA;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AACA,MAAM,cAAc;AAEb,IAAM,aAAmB,iBAG9B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,oBAAgB,sBAAf,EAAqB,KAAU,WAAW,GAAG,eAAe,SAAS,GAAI,GAAG,OAAO,CACrF;AACD,WAAW,cAAc;AAElB,IAAM,mBAAyB,iBAGpC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,oBAAgB,4BAAf,EAA2B,KAAU,WAAW,GAAG,sCAAsC,SAAS,GAAI,GAAG,OAAO,CAClH;AACD,iBAAiB,cAAc;AAGxB,IAAM,cAA6B;AACnC,IAAM,aAA4B;","names":[]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-DXRY7AS4.js";
|
|
4
|
+
|
|
5
|
+
// src/marketing/logo-strip.tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
var LogoStrip = React.forwardRef(
|
|
9
|
+
({ className, items, duration = "40s", paused = false, cellClassName, style, ...props }, ref) => {
|
|
10
|
+
const cell = cn(
|
|
11
|
+
"flex h-34 w-68 shrink-0 items-center justify-center border-r border-outline p-inset-lg transition-colors duration-(--sv-sys-motion-duration-fast) ease-standard hover:bg-surface-subtle",
|
|
12
|
+
cellClassName
|
|
13
|
+
);
|
|
14
|
+
return /* @__PURE__ */ jsx(
|
|
15
|
+
"div",
|
|
16
|
+
{
|
|
17
|
+
ref,
|
|
18
|
+
className: cn("group/strip relative overflow-hidden border-y border-outline motion-reduce:overflow-x-auto", className),
|
|
19
|
+
style: { ...style, ["--sv-marquee-duration"]: duration },
|
|
20
|
+
...props,
|
|
21
|
+
children: /* @__PURE__ */ jsxs(
|
|
22
|
+
"div",
|
|
23
|
+
{
|
|
24
|
+
className: cn(
|
|
25
|
+
"flex w-max animate-sv-marquee motion-reduce:animate-none",
|
|
26
|
+
"group-hover/strip:[animation-play-state:paused] group-focus-within/strip:[animation-play-state:paused]",
|
|
27
|
+
paused && "[animation-play-state:paused]"
|
|
28
|
+
),
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ jsx("ul", { className: "flex", children: items.map((item, i) => /* @__PURE__ */ jsx("li", { className: cell, children: item }, i)) }),
|
|
31
|
+
/* @__PURE__ */ jsx("ul", { "aria-hidden": true, className: "flex motion-reduce:hidden", inert: true, children: items.map((item, i) => /* @__PURE__ */ jsx("li", { className: cell, children: item }, i)) })
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
)
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
LogoStrip.displayName = "LogoStrip";
|
|
40
|
+
|
|
41
|
+
export {
|
|
42
|
+
LogoStrip
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=chunk-BVNDNRPW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/marketing/logo-strip.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '@/lib/utils';\n\n/**\n * Cairn LogoStrip. A logo marquee: a row of square-edged cells on hairlines (272px wide)\n * sliding continuously, each cell taking the paper hover step over 150ms.\n *\n * The list is rendered twice and the track slides by half its length, so the loop has no seam;\n * the second copy is `aria-hidden` and out of the tab order, so each logo is announced once.\n * Movement that lasts more than five seconds must be stoppable (WCAG 2.2.2): the marquee pauses\n * while hovered or while anything inside has focus, and `paused` stops it outright. Under\n * `prefers-reduced-motion` it does not move at all: the copy is dropped and the strip becomes a\n * row you scroll.\n *\n * Logos are the consumer's (`<img alt>` or an SVG with a title): they carry the names.\n */\nexport interface LogoStripProps extends React.HTMLAttributes<HTMLDivElement> {\n /** One node per logo. */\n items: React.ReactNode[];\n /** Duration of one loop, CSS time. */\n duration?: string;\n /** Stop the movement. */\n paused?: boolean;\n /** Class for each cell. */\n cellClassName?: string;\n}\n\nexport const LogoStrip = React.forwardRef<HTMLDivElement, LogoStripProps>(\n ({ className, items, duration = '40s', paused = false, cellClassName, style, ...props }, ref) => {\n const cell = cn(\n 'flex h-34 w-68 shrink-0 items-center justify-center border-r border-outline p-inset-lg transition-colors duration-(--sv-sys-motion-duration-fast) ease-standard hover:bg-surface-subtle',\n cellClassName\n );\n return (\n <div\n ref={ref}\n className={cn('group/strip relative overflow-hidden border-y border-outline motion-reduce:overflow-x-auto', className)}\n style={{ ...style, ['--sv-marquee-duration' as string]: duration }}\n {...props}\n >\n <div\n className={cn(\n 'flex w-max animate-sv-marquee motion-reduce:animate-none',\n 'group-hover/strip:[animation-play-state:paused] group-focus-within/strip:[animation-play-state:paused]',\n paused && '[animation-play-state:paused]'\n )}\n >\n <ul className=\"flex\">\n {items.map((item, i) => (\n <li key={i} className={cell}>\n {item}\n </li>\n ))}\n </ul>\n <ul aria-hidden className=\"flex motion-reduce:hidden\" inert>\n {items.map((item, i) => (\n <li key={i} className={cell}>\n {item}\n </li>\n ))}\n </ul>\n </div>\n </div>\n );\n }\n);\nLogoStrip.displayName = 'LogoStrip';\n"],"mappings":";;;;;AAAA,YAAY,WAAW;AAwCf,SASM,KATN;AAbD,IAAM,YAAkB;AAAA,EAC7B,CAAC,EAAE,WAAW,OAAO,WAAW,OAAO,SAAS,OAAO,eAAe,OAAO,GAAG,MAAM,GAAG,QAAQ;AAC/F,UAAM,OAAO;AAAA,MACX;AAAA,MACA;AAAA,IACF;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW,GAAG,8FAA8F,SAAS;AAAA,QACrH,OAAO,EAAE,GAAG,OAAO,CAAC,uBAAiC,GAAG,SAAS;AAAA,QAChE,GAAG;AAAA,QAEJ;AAAA,UAAC;AAAA;AAAA,YACC,WAAW;AAAA,cACT;AAAA,cACA;AAAA,cACA,UAAU;AAAA,YACZ;AAAA,YAEA;AAAA,kCAAC,QAAG,WAAU,QACX,gBAAM,IAAI,CAAC,MAAM,MAChB,oBAAC,QAAW,WAAW,MACpB,kBADM,CAET,CACD,GACH;AAAA,cACA,oBAAC,QAAG,eAAW,MAAC,WAAU,6BAA4B,OAAK,MACxD,gBAAM,IAAI,CAAC,MAAM,MAChB,oBAAC,QAAW,WAAW,MACpB,kBADM,CAET,CACD,GACH;AAAA;AAAA;AAAA,QACF;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AACA,UAAU,cAAc;","names":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-DXRY7AS4.js";
|
|
4
|
+
|
|
5
|
+
// src/feedback/spinner.tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
var DOT = { sm: "size-1", md: "size-1.5", lg: "size-2" };
|
|
9
|
+
var GAP = { sm: "gap-0.5", md: "gap-1", lg: "gap-1.5" };
|
|
10
|
+
var Spinner = React.forwardRef(({ className, label, size = "md", ...props }, ref) => /* @__PURE__ */ jsx("span", { ref, role: "status", "aria-label": label, className: cn("inline-flex items-center text-on-surface", GAP[size], className), ...props, children: [0, 1, 2].map((i) => /* @__PURE__ */ jsx(
|
|
11
|
+
"span",
|
|
12
|
+
{
|
|
13
|
+
"aria-hidden": true,
|
|
14
|
+
className: cn("rounded-full bg-current animate-sv-dot-lane motion-reduce:animate-none", DOT[size]),
|
|
15
|
+
style: { animationDelay: `${i * 0.2}s` }
|
|
16
|
+
},
|
|
17
|
+
i
|
|
18
|
+
)) }));
|
|
19
|
+
Spinner.displayName = "Spinner";
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
Spinner
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=chunk-CN6QNKYV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/feedback/spinner.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '@/lib/utils';\n\n/**\n * Cairn Spinner. SV draws dots, not pixels: a row of three round marks lit in\n * turn (`animate-sv-dot-lane`), never a rotating ring. The dots take the current text colour,\n * so the spinner sits on ink or inside a primary button without a variant.\n *\n * `role=\"status\"` with `label` as its name: required, since the dots say nothing, and the\n * consumer's words (no copy is baked in). Reduced motion holds the dots still at full\n * strength; the status and its name remain.\n */\nexport interface SpinnerProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'children'> {\n /** Accessible name. Required. */\n label: string;\n size?: 'sm' | 'md' | 'lg';\n}\n\nconst DOT = { sm: 'size-1', md: 'size-1.5', lg: 'size-2' } as const;\nconst GAP = { sm: 'gap-0.5', md: 'gap-1', lg: 'gap-1.5' } as const;\n\nexport const Spinner = React.forwardRef<HTMLSpanElement, SpinnerProps>(({ className, label, size = 'md', ...props }, ref) => (\n <span ref={ref} role=\"status\" aria-label={label} className={cn('inline-flex items-center text-on-surface', GAP[size], className)} {...props}>\n {[0, 1, 2].map((i) => (\n <span\n key={i}\n aria-hidden\n className={cn('rounded-full bg-current animate-sv-dot-lane motion-reduce:animate-none', DOT[size])}\n style={{ animationDelay: `${i * 0.2}s` }}\n />\n ))}\n </span>\n));\nSpinner.displayName = 'Spinner';\n"],"mappings":";;;;;AAAA,YAAY,WAAW;AAwBjB;AANN,IAAM,MAAM,EAAE,IAAI,UAAU,IAAI,YAAY,IAAI,SAAS;AACzD,IAAM,MAAM,EAAE,IAAI,WAAW,IAAI,SAAS,IAAI,UAAU;AAEjD,IAAM,UAAgB,iBAA0C,CAAC,EAAE,WAAW,OAAO,OAAO,MAAM,GAAG,MAAM,GAAG,QACnH,oBAAC,UAAK,KAAU,MAAK,UAAS,cAAY,OAAO,WAAW,GAAG,4CAA4C,IAAI,IAAI,GAAG,SAAS,GAAI,GAAG,OACnI,WAAC,GAAG,GAAG,CAAC,EAAE,IAAI,CAAC,MACd;AAAA,EAAC;AAAA;AAAA,IAEC,eAAW;AAAA,IACX,WAAW,GAAG,0EAA0E,IAAI,IAAI,CAAC;AAAA,IACjG,OAAO,EAAE,gBAAgB,GAAG,IAAI,GAAG,IAAI;AAAA;AAAA,EAHlC;AAIP,CACD,GACH,CACD;AACD,QAAQ,cAAc;","names":[]}
|