@six-vallees/ui-react 0.6.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 +9 -13
- 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 +1 -1
- package/dist/avatar/avatar.js +1 -1
- package/dist/badge/badge.d.ts +3 -3
- package/dist/badge/badge.js +1 -1
- 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-ULEDFFUJ.js → chunk-7YKHLP4S.js} +1 -1
- 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-RXDJPRH5.js → chunk-EM5UHI3U.js} +2 -2
- 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-WHD5CSTB.js → chunk-HC3SNY5O.js} +5 -5
- 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-WHJ4JVO6.js → chunk-JI4UZW6G.js} +2 -2
- 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-POUL3ZTV.js → chunk-LL5GBPQN.js} +8 -4
- 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-DCKWB3EY.js → chunk-P2CWISVU.js} +2 -2
- 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-R7BM6J75.js → chunk-SNTRWOF6.js} +2 -5
- 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-HHUI32DT.js → chunk-W3RIYQPO.js} +3 -2
- 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-OVF2VS3L.js → chunk-YM2TZ5UT.js} +4 -4
- package/dist/{chunk-OVF2VS3L.js.map → chunk-YM2TZ5UT.js.map} +1 -1
- 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 +78 -4
- package/dist/index.js +527 -41
- 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 +6 -11
- package/dist/input/input.js +2 -1
- 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 +10 -4
- package/dist/input/label.js +1 -1
- 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 +1 -5
- package/dist/input/textarea.js +2 -1
- 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 +3 -3
- package/dist/overlay/alert-dialog.js +1 -1
- package/dist/overlay/popover.d.ts +3 -4
- package/dist/overlay/popover.js +1 -1
- package/dist/overlay/sheet.d.ts +4 -4
- package/dist/overlay/sheet.js +1 -1
- package/dist/overlay/tooltip.d.ts +1 -1
- package/dist/overlay/tooltip.js +1 -1
- package/dist/tabs/tabs.d.ts +1 -1
- package/dist/tabs/tabs.js +1 -1
- package/dist/tabs/toggle-group.js +1 -1
- package/package.json +17 -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-BYZCFI7X.js +0 -32
- package/dist/chunk-BYZCFI7X.js.map +0 -1
- package/dist/chunk-CZ3JB37A.js +0 -72
- package/dist/chunk-CZ3JB37A.js.map +0 -1
- package/dist/chunk-DCKWB3EY.js.map +0 -1
- package/dist/chunk-G2XJK244.js +0 -96
- package/dist/chunk-G2XJK244.js.map +0 -1
- package/dist/chunk-GNHNTI5A.js +0 -30
- package/dist/chunk-GNHNTI5A.js.map +0 -1
- package/dist/chunk-HHUI32DT.js.map +0 -1
- package/dist/chunk-OWIUMX76.js +0 -91
- package/dist/chunk-OWIUMX76.js.map +0 -1
- package/dist/chunk-POUL3ZTV.js.map +0 -1
- package/dist/chunk-R7BM6J75.js.map +0 -1
- package/dist/chunk-RXDJPRH5.js.map +0 -1
- package/dist/chunk-S4HVXD6Z.js +0 -92
- package/dist/chunk-S4HVXD6Z.js.map +0 -1
- package/dist/chunk-ULEDFFUJ.js.map +0 -1
- package/dist/chunk-WHD5CSTB.js.map +0 -1
- package/dist/chunk-WHJ4JVO6.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 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -6,7 +6,7 @@ import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
|
6
6
|
*
|
|
7
7
|
* Not a Dialog with different copy. `alertdialog` is its own role: it is
|
|
8
8
|
* announced as an interruption, it is always modal, and focus lands on the
|
|
9
|
-
* safest control rather than the first one
|
|
9
|
+
* safest control rather than the first one, so an accidental Enter cancels
|
|
10
10
|
* instead of destroying. Radix carries that; a Dialog styled to look urgent
|
|
11
11
|
* carries none of it.
|
|
12
12
|
*
|
|
@@ -15,7 +15,7 @@ import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
|
15
15
|
* one that mattered gets clicked through too.
|
|
16
16
|
*
|
|
17
17
|
* The destructive action is a `danger` Button passed through `asChild`. Danger
|
|
18
|
-
* is a message colour with its own AA-paired ink (rule 4)
|
|
18
|
+
* is a message colour with its own AA-paired ink (rule 4), it is not the
|
|
19
19
|
* signature accent, and `main` must never stand in for it (rule 3).
|
|
20
20
|
*/
|
|
21
21
|
declare const AlertDialog: React.FC<AlertDialogPrimitive.AlertDialogProps>;
|
|
@@ -29,7 +29,7 @@ interface AlertDialogContentProps extends React.ComponentPropsWithoutRef<typeof
|
|
|
29
29
|
* Classes for the scrim.
|
|
30
30
|
*
|
|
31
31
|
* Exists so the scrim can be raised with the panel. Lifting only the content's
|
|
32
|
-
* z-index leaves the dim layer stranded below whatever it was meant to cover
|
|
32
|
+
* z-index leaves the dim layer stranded below whatever it was meant to cover ,
|
|
33
33
|
* the dialog reads as urgent while the page behind it stays bright.
|
|
34
34
|
*/
|
|
35
35
|
overlayClassName?: string;
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* Cairn Popover. Radix, for the positioning
|
|
5
|
+
* Cairn Popover. Radix, for the positioning, which is never as simple as it looks.
|
|
6
6
|
*
|
|
7
7
|
* The hand-rolled version is always the same: absolute coordinates, then a
|
|
8
8
|
* `Math.min/max` to keep the card on screen. It works until the trigger is near
|
|
@@ -16,8 +16,7 @@ import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
|
16
16
|
* `Anchor` is exported because a popover does not always hang off a button: a
|
|
17
17
|
* pin dropped on a page has a position but no trigger element.
|
|
18
18
|
*
|
|
19
|
-
*
|
|
20
|
-
* metric tiles (rule 7). Elevation AND a hairline, deliberately: the shadow
|
|
19
|
+
* Square, elevation AND a hairline, deliberately: the shadow
|
|
21
20
|
* carries the lift on the light theme, the hairline is what separates the surface
|
|
22
21
|
* on the dark one, where a black shadow does nothing.
|
|
23
22
|
*/
|
|
@@ -30,7 +29,7 @@ interface PopoverContentProps extends React.ComponentPropsWithoutRef<typeof Popo
|
|
|
30
29
|
* Where the portal mounts. Defaults to `document.body`.
|
|
31
30
|
*
|
|
32
31
|
* Override it whenever the theme lives on a subtree rather than on the
|
|
33
|
-
* document
|
|
32
|
+
* document, a scoped overlay root, a `data-theme` wrapper, a shadow host.
|
|
34
33
|
* Portalled to the body by default, the panel escapes that subtree and renders
|
|
35
34
|
* with none of its tokens: correct behaviour, no styling, and nothing in the
|
|
36
35
|
* console to say why.
|
package/dist/overlay/popover.js
CHANGED
package/dist/overlay/sheet.d.ts
CHANGED
|
@@ -9,8 +9,8 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
9
9
|
* The prop that matters is `modal`, and the default here is deliberately the
|
|
10
10
|
* opposite of Radix's. A **modal** sheet takes the page hostage: focus is
|
|
11
11
|
* trapped, everything behind it is inert, and the rest of the screen is dimmed.
|
|
12
|
-
* That is right for a form you must finish. It is wrong for a companion panel
|
|
13
|
-
* an inspector, a comment thread, a filter rail
|
|
12
|
+
* That is right for a form you must finish. It is wrong for a companion panel ,
|
|
13
|
+
* an inspector, a comment thread, a filter rail, where the whole point is to
|
|
14
14
|
* keep working in the page while the panel is open. Ship the modal default and
|
|
15
15
|
* every companion panel in the system becomes a trap.
|
|
16
16
|
*
|
|
@@ -20,11 +20,11 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
20
20
|
*
|
|
21
21
|
* A `Title` is not optional. Radix warns when one is missing, and it is right to:
|
|
22
22
|
* a dialog with no accessible name is announced as "dialog", which tells the user
|
|
23
|
-
* nothing. Use `SheetTitle
|
|
23
|
+
* nothing. Use `SheetTitle`, wrap it in `sr-only` if the design has no visible
|
|
24
24
|
* heading, never drop it.
|
|
25
25
|
*/
|
|
26
26
|
declare const sheetVariants: (props?: ({
|
|
27
|
-
side?: "
|
|
27
|
+
side?: "left" | "right" | "bottom" | null | undefined;
|
|
28
28
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
29
29
|
declare const Sheet: React.FC<DialogPrimitive.DialogProps>;
|
|
30
30
|
declare const SheetTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
package/dist/overlay/sheet.js
CHANGED
|
@@ -14,7 +14,7 @@ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
|
14
14
|
*
|
|
15
15
|
* The rule that survives all of it: a tooltip may only ever carry information
|
|
16
16
|
* that is *supplementary*. If the interface does not make sense without it, the
|
|
17
|
-
* text belongs on the surface (rule 4
|
|
17
|
+
* text belongs on the surface (rule 4, meaning never rests on a hover).
|
|
18
18
|
*
|
|
19
19
|
* Inverse surface, not a hue: a tooltip is a small dense mark and the inverse
|
|
20
20
|
* pairing is the one that reads at that size on both themes.
|
package/dist/overlay/tooltip.js
CHANGED
package/dist/tabs/tabs.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
|
6
6
|
*
|
|
7
7
|
* `role="tablist"` on a row of buttons is the most common accessibility lie in a
|
|
8
8
|
* codebase: it announces a tab list to a screen reader and then ships none of
|
|
9
|
-
* the behaviour that word promises
|
|
9
|
+
* the behaviour that word promises, a single tab stop for the whole set, arrow
|
|
10
10
|
* keys to move between tabs, Home/End, and the selected tab bound to its panel
|
|
11
11
|
* by id. Writing the role without the behaviour is worse than writing no role at
|
|
12
12
|
* all, because it tells the user a lie they will act on. Radix has all of it.
|
package/dist/tabs/tabs.js
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@six-vallees/ui-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "Cairn React components
|
|
5
|
+
"description": "Cairn React components, the Six Vallées design system UI, driven by the Cairn tokens.",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -29,17 +29,32 @@
|
|
|
29
29
|
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
+
"@radix-ui/react-accordion": "^1.3.1",
|
|
32
33
|
"@radix-ui/react-alert-dialog": "^1.1.23",
|
|
33
34
|
"@radix-ui/react-avatar": "^1.2.6",
|
|
35
|
+
"@radix-ui/react-checkbox": "^1.4.1",
|
|
36
|
+
"@radix-ui/react-collapsible": "^1.2.1",
|
|
37
|
+
"@radix-ui/react-context-menu": "^2.4.1",
|
|
34
38
|
"@radix-ui/react-dialog": "^1.1.23",
|
|
39
|
+
"@radix-ui/react-dropdown-menu": "^2.2.1",
|
|
40
|
+
"@radix-ui/react-hover-card": "^1.2.1",
|
|
35
41
|
"@radix-ui/react-label": "^2.1.15",
|
|
42
|
+
"@radix-ui/react-navigation-menu": "^1.4.1",
|
|
36
43
|
"@radix-ui/react-popover": "^1.1.23",
|
|
44
|
+
"@radix-ui/react-progress": "^1.2.1",
|
|
45
|
+
"@radix-ui/react-radio-group": "^1.5.1",
|
|
46
|
+
"@radix-ui/react-select": "^2.4.1",
|
|
47
|
+
"@radix-ui/react-separator": "^1.2.0",
|
|
48
|
+
"@radix-ui/react-slider": "^1.6.1",
|
|
37
49
|
"@radix-ui/react-slot": "^1.1.2",
|
|
50
|
+
"@radix-ui/react-switch": "^1.4.1",
|
|
38
51
|
"@radix-ui/react-tabs": "^1.1.21",
|
|
52
|
+
"@radix-ui/react-toast": "^1.3.1",
|
|
39
53
|
"@radix-ui/react-toggle-group": "^1.1.19",
|
|
40
54
|
"@radix-ui/react-tooltip": "^1.2.16",
|
|
41
55
|
"class-variance-authority": "^0.7.1",
|
|
42
56
|
"clsx": "^2.1.1",
|
|
57
|
+
"cmdk": "^1.1.1",
|
|
43
58
|
"tailwind-merge": "^3.0.2"
|
|
44
59
|
},
|
|
45
60
|
"peerDependencies": {
|
|
@@ -47,11 +62,6 @@
|
|
|
47
62
|
"react": ">=18",
|
|
48
63
|
"react-dom": ">=18"
|
|
49
64
|
},
|
|
50
|
-
"peerDependenciesMeta": {
|
|
51
|
-
"@phosphor-icons/react": {
|
|
52
|
-
"optional": true
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
65
|
"devDependencies": {
|
|
56
66
|
"@types/react": "^19.0.0",
|
|
57
67
|
"esbuild-plugin-preserve-directives": "^0.0.11",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/card/card.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cn } from '@/lib/utils';\n\n/**\n * Cairn Card. A surface for grouped content, the `card`-radius container reserved\n * for feature cards and metric tiles (AGENTS.md rule 7). Composed of parts, use as\n * many as the content needs:\n *\n * <Card>\n * <CardHeader>\n * <CardTitle>Title</CardTitle>\n * <CardDescription>Supporting line.</CardDescription>\n * </CardHeader>\n * <CardContent>…</CardContent>\n * <CardFooter>…</CardFooter>\n * </Card>\n *\n * Token-driven through the Tailwind bridge (rounded-card, border-outline, bg-surface,\n * p-inset-*). Neutral ink throughout, hierarchy comes from the type roles and tone,\n * never hue (rule 1). Set `asChild` to render the surface as a link or another element.\n */\n\nexport interface CardProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Render as the child element (e.g. an `<a>`) instead of a `<div>`. */\n asChild?: boolean;\n}\n\nexport const Card = React.forwardRef<HTMLDivElement, CardProps>(\n ({ className, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'div';\n return (\n <Comp\n ref={ref}\n className={cn(\n 'rounded-card border border-outline bg-surface text-on-surface',\n className\n )}\n {...props}\n />\n );\n }\n);\nCard.displayName = 'Card';\n\nexport const CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex flex-col gap-gap-xs px-inset-lg pt-inset-lg pb-inset-md', className)}\n {...props}\n />\n )\n);\nCardHeader.displayName = 'CardHeader';\n\n/** The card's heading. Renders an `<h3>` by default, pass `as` to change the level. */\nexport interface CardTitleProps extends React.HTMLAttributes<HTMLHeadingElement> {\n as?: 'h2' | 'h3' | 'h4';\n}\n\nexport const CardTitle = React.forwardRef<HTMLHeadingElement, CardTitleProps>(\n ({ className, as: Comp = 'h3', ...props }, ref) => (\n <Comp ref={ref} className={cn('sv-title-md text-on-surface', className)} {...props} />\n )\n);\nCardTitle.displayName = 'CardTitle';\n\nexport const CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p ref={ref} className={cn('sv-body-md text-on-surface-variant', className)} {...props} />\n));\nCardDescription.displayName = 'CardDescription';\n\n/** Main body. Top padding comes from the preceding `CardHeader`; add `pt-inset-lg` when used alone. */\nexport const CardContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('px-inset-lg pb-inset-lg', className)} {...props} />\n )\n);\nCardContent.displayName = 'CardContent';\n\nexport const CardFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex items-center gap-gap-sm px-inset-lg pb-inset-lg', className)}\n {...props}\n />\n )\n);\nCardFooter.displayName = 'CardFooter';\n"],"mappings":";;;;;AAAA,YAAY,WAAW;AACvB,SAAS,YAAY;AA+Bf;AAJC,IAAM,OAAa;AAAA,EACxB,CAAC,EAAE,WAAW,UAAU,OAAO,GAAG,MAAM,GAAG,QAAQ;AACjD,UAAM,OAAO,UAAU,OAAO;AAC9B,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,QACC,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AACA,KAAK,cAAc;AAEZ,IAAM,aAAmB;AAAA,EAC9B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW,GAAG,gEAAgE,SAAS;AAAA,MACtF,GAAG;AAAA;AAAA,EACN;AAEJ;AACA,WAAW,cAAc;AAOlB,IAAM,YAAkB;AAAA,EAC7B,CAAC,EAAE,WAAW,IAAI,OAAO,MAAM,GAAG,MAAM,GAAG,QACzC,oBAAC,QAAK,KAAU,WAAW,GAAG,+BAA+B,SAAS,GAAI,GAAG,OAAO;AAExF;AACA,UAAU,cAAc;AAEjB,IAAM,kBAAwB,iBAGnC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,oBAAC,OAAE,KAAU,WAAW,GAAG,sCAAsC,SAAS,GAAI,GAAG,OAAO,CACzF;AACD,gBAAgB,cAAc;AAGvB,IAAM,cAAoB;AAAA,EAC/B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB,oBAAC,SAAI,KAAU,WAAW,GAAG,2BAA2B,SAAS,GAAI,GAAG,OAAO;AAEnF;AACA,YAAY,cAAc;AAEnB,IAAM,aAAmB;AAAA,EAC9B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW,GAAG,wDAAwD,SAAS;AAAA,MAC9E,GAAG;AAAA;AAAA,EACN;AAEJ;AACA,WAAW,cAAc;","names":[]}
|
package/dist/chunk-BWYWI4BC.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cn
|
|
3
|
-
} from "./chunk-DXRY7AS4.js";
|
|
4
|
-
|
|
5
|
-
// src/button/button.tsx
|
|
6
|
-
import * as React from "react";
|
|
7
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
8
|
-
import { cva } from "class-variance-authority";
|
|
9
|
-
import { jsx } from "react/jsx-runtime";
|
|
10
|
-
var buttonVariants = cva(
|
|
11
|
-
// A soft accent halo on hover (a fill-grade ring in `accent-halo`, box-shadow so it never shifts
|
|
12
|
-
// layout and coexists with the focus-visible outline). Disabled buttons can't hover, so no halo.
|
|
13
|
-
"inline-flex items-center justify-center gap-2 leading-none rounded-control font-medium whitespace-nowrap transition-[background-color,border-color,box-shadow] duration-150 outline-none hover:[box-shadow:0_0_0_4px_var(--sv-sys-color-accent-halo)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus disabled:pointer-events-none disabled:opacity-40",
|
|
14
|
-
{
|
|
15
|
-
variants: {
|
|
16
|
-
variant: {
|
|
17
|
-
primary: "bg-primary text-on-primary hover:bg-primary-hover active:bg-primary-active",
|
|
18
|
-
secondary: "border border-outline-strong bg-surface text-on-surface hover:bg-surface-subtle active:bg-surface-muted",
|
|
19
|
-
ghost: "text-on-surface hover:bg-surface-subtle active:bg-surface-muted",
|
|
20
|
-
danger: "bg-danger text-on-danger hover:bg-danger-hover active:bg-danger-active"
|
|
21
|
-
},
|
|
22
|
-
size: {
|
|
23
|
-
sm: "h-9 px-3 text-sm",
|
|
24
|
-
md: "h-11 px-5 text-sm",
|
|
25
|
-
lg: "h-12 px-6 text-base"
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
defaultVariants: { variant: "primary", size: "md" }
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
var Button = React.forwardRef(
|
|
32
|
-
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
33
|
-
const Comp = asChild ? Slot : "button";
|
|
34
|
-
return /* @__PURE__ */ jsx(Comp, { ref, className: cn(buttonVariants({ variant, size }), className), ...props });
|
|
35
|
-
}
|
|
36
|
-
);
|
|
37
|
-
Button.displayName = "Button";
|
|
38
|
-
|
|
39
|
-
export {
|
|
40
|
-
buttonVariants,
|
|
41
|
-
Button
|
|
42
|
-
};
|
|
43
|
-
//# sourceMappingURL=chunk-BWYWI4BC.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/button/button.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '@/lib/utils';\n\n/**\n * Cairn Button. Consumes the design tokens through the Tailwind bridge\n * (bg-primary, rounded-control, …), install the Cairn theme in the target project.\n */\nconst buttonVariants = cva(\n // A soft accent halo on hover (a fill-grade ring in `accent-halo`, box-shadow so it never shifts\n // layout and coexists with the focus-visible outline). Disabled buttons can't hover, so no halo.\n 'inline-flex items-center justify-center gap-2 leading-none rounded-control font-medium whitespace-nowrap transition-[background-color,border-color,box-shadow] duration-150 outline-none hover:[box-shadow:0_0_0_4px_var(--sv-sys-color-accent-halo)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus disabled:pointer-events-none disabled:opacity-40',\n {\n variants: {\n variant: {\n primary: 'bg-primary text-on-primary hover:bg-primary-hover active:bg-primary-active',\n secondary:\n 'border border-outline-strong bg-surface text-on-surface hover:bg-surface-subtle active:bg-surface-muted',\n ghost: 'text-on-surface hover:bg-surface-subtle active:bg-surface-muted',\n danger: 'bg-danger text-on-danger hover:bg-danger-hover active:bg-danger-active',\n },\n size: {\n sm: 'h-9 px-3 text-sm',\n md: 'h-11 px-5 text-sm',\n lg: 'h-12 px-6 text-base',\n },\n },\n defaultVariants: { variant: 'primary', size: 'md' },\n }\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n /** Visual style of the button. */\n variant?: 'primary' | 'secondary' | 'ghost' | 'danger';\n /** Control height and padding. */\n size?: 'sm' | 'md' | 'lg';\n /** Render as the child element (e.g. an `<a>`) instead of a `<button>`. */\n asChild?: boolean;\n}\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button';\n return (\n <Comp ref={ref} className={cn(buttonVariants({ variant, size }), className)} {...props} />\n );\n }\n);\nButton.displayName = 'Button';\n\nexport { buttonVariants };\n"],"mappings":";;;;;AAAA,YAAY,WAAW;AACvB,SAAS,YAAY;AACrB,SAAS,WAA8B;AA6CjC;AAtCN,IAAM,iBAAiB;AAAA;AAAA;AAAA,EAGrB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,WACE;AAAA,QACF,OAAO;AAAA,QACP,QAAQ;AAAA,MACV;AAAA,MACA,MAAM;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACN;AAAA,IACF;AAAA,IACA,iBAAiB,EAAE,SAAS,WAAW,MAAM,KAAK;AAAA,EACpD;AACF;AAaO,IAAM,SAAe;AAAA,EAC1B,CAAC,EAAE,WAAW,SAAS,MAAM,UAAU,OAAO,GAAG,MAAM,GAAG,QAAQ;AAChE,UAAM,OAAO,UAAU,OAAO;AAC9B,WACE,oBAAC,QAAK,KAAU,WAAW,GAAG,eAAe,EAAE,SAAS,KAAK,CAAC,GAAG,SAAS,GAAI,GAAG,OAAO;AAAA,EAE5F;AACF;AACA,OAAO,cAAc;","names":[]}
|
package/dist/chunk-BYZCFI7X.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cn
|
|
3
|
-
} from "./chunk-DXRY7AS4.js";
|
|
4
|
-
|
|
5
|
-
// src/input/input.tsx
|
|
6
|
-
import * as React from "react";
|
|
7
|
-
import { jsx } from "react/jsx-runtime";
|
|
8
|
-
var Input = React.forwardRef(
|
|
9
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
10
|
-
"input",
|
|
11
|
-
{
|
|
12
|
-
ref,
|
|
13
|
-
className: cn(
|
|
14
|
-
"h-11 w-full rounded-field border border-outline-strong bg-surface px-3 sv-body-sm text-on-surface",
|
|
15
|
-
"outline-none placeholder:text-on-surface-variant",
|
|
16
|
-
"focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-focus",
|
|
17
|
-
"disabled:cursor-not-allowed disabled:opacity-40",
|
|
18
|
-
// Figures in a field align column to column: an amount, a reference or a
|
|
19
|
-
// date is read by its digits, and proportional figures make them dance.
|
|
20
|
-
"tabular-nums",
|
|
21
|
-
className
|
|
22
|
-
),
|
|
23
|
-
...props
|
|
24
|
-
}
|
|
25
|
-
)
|
|
26
|
-
);
|
|
27
|
-
Input.displayName = "Input";
|
|
28
|
-
|
|
29
|
-
export {
|
|
30
|
-
Input
|
|
31
|
-
};
|
|
32
|
-
//# sourceMappingURL=chunk-BYZCFI7X.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/input/input.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '@/lib/utils';\n\n/**\n * Cairn Input. A text field, and nothing more.\n *\n * No Radix here on purpose: an `<input>` has no behaviour to borrow. Wrapping a\n * bare element in a primitive would add a dependency and a layer of indirection\n * for a `className`. Radix earns its place where there is focus management,\n * dismissal or ARIA wiring to get right, not here.\n *\n * `field` radius by role (AGENTS.md rule 7), hairline outline in neutral (rule\n * 7 again: border colour is never a hue), and the placeholder sits on\n * `on-surface-variant` so it reads as absent text rather than as entered text.\n * Height matches `Button` at size `md`, so a field and its action align on a row.\n *\n * Pair it with `Label` — a field whose only label is its placeholder loses that\n * label the moment someone types.\n */\nexport type InputProps = React.InputHTMLAttributes<HTMLInputElement>;\n\nexport const Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, ...props }, ref) => (\n <input\n ref={ref}\n className={cn(\n 'h-11 w-full rounded-field border border-outline-strong bg-surface px-3 sv-body-sm text-on-surface',\n 'outline-none placeholder:text-on-surface-variant',\n 'focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-focus',\n 'disabled:cursor-not-allowed disabled:opacity-40',\n // Figures in a field align column to column: an amount, a reference or a\n // date is read by its digits, and proportional figures make them dance.\n 'tabular-nums',\n className\n )}\n {...props}\n />\n )\n);\nInput.displayName = 'Input';\n"],"mappings":";;;;;AAAA,YAAY,WAAW;AAuBnB;AAFG,IAAM,QAAc;AAAA,EACzB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA;AAAA,QAGA;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AACA,MAAM,cAAc;","names":[]}
|
package/dist/chunk-CZ3JB37A.js
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
categorical,
|
|
3
|
-
categoricalNeedsEdge,
|
|
4
|
-
categoricalOn,
|
|
5
|
-
chartToken,
|
|
6
|
-
markEdge,
|
|
7
|
-
sequential,
|
|
8
|
-
sequentialNeedsEdge,
|
|
9
|
-
sequentialOn,
|
|
10
|
-
toneNeedsEdge
|
|
11
|
-
} from "./chunk-G2XJK244.js";
|
|
12
|
-
import {
|
|
13
|
-
cn
|
|
14
|
-
} from "./chunk-DXRY7AS4.js";
|
|
15
|
-
|
|
16
|
-
// src/charts/segmented-bar.tsx
|
|
17
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
18
|
-
function SegmentedBar({ data, height = 40, scale = "mono", showLegend = true, className }) {
|
|
19
|
-
const safe = (v) => Number.isFinite(v) && v > 0 ? v : 0;
|
|
20
|
-
const total = data.reduce((s, d) => s + safe(d.value), 0) || 1;
|
|
21
|
-
const hasActive = data.some((d) => d.active);
|
|
22
|
-
const fill = (d, i) => {
|
|
23
|
-
if (scale === "categorical") return categorical(i);
|
|
24
|
-
if (scale === "sequential") return sequential(i, data.length);
|
|
25
|
-
if (!hasActive) return chartToken.ink;
|
|
26
|
-
return d.active ? chartToken.ink : chartToken.muted;
|
|
27
|
-
};
|
|
28
|
-
const onFill = (d, i) => {
|
|
29
|
-
if (scale === "categorical") return categoricalOn(i);
|
|
30
|
-
if (scale === "sequential") return sequentialOn(i, data.length);
|
|
31
|
-
return "var(--sv-sys-color-on-primary)";
|
|
32
|
-
};
|
|
33
|
-
const edge = (d, i) => {
|
|
34
|
-
if (scale === "categorical") return markEdge(categoricalNeedsEdge(i));
|
|
35
|
-
if (scale === "sequential") return markEdge(sequentialNeedsEdge(i, data.length));
|
|
36
|
-
return markEdge(toneNeedsEdge(!hasActive || d.active ? "ink" : "muted"));
|
|
37
|
-
};
|
|
38
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("w-full", className), children: [
|
|
39
|
-
/* @__PURE__ */ jsx(
|
|
40
|
-
"div",
|
|
41
|
-
{
|
|
42
|
-
className: "flex w-full",
|
|
43
|
-
style: { height, gap: 2 },
|
|
44
|
-
role: "img",
|
|
45
|
-
"aria-label": data.map((d) => `${d.label} ${d.value}`).join(", "),
|
|
46
|
-
children: data.map((d, i) => /* @__PURE__ */ jsx(
|
|
47
|
-
"div",
|
|
48
|
-
{
|
|
49
|
-
className: "flex items-center justify-end px-2 first:rounded-l-control last:rounded-r-control",
|
|
50
|
-
style: {
|
|
51
|
-
width: `${safe(d.value) / total * 100}%`,
|
|
52
|
-
background: fill(d, i),
|
|
53
|
-
boxShadow: edge(d, i)
|
|
54
|
-
},
|
|
55
|
-
children: /* @__PURE__ */ jsx("span", { className: "truncate sv-body-xs font-medium tabular-nums", style: { color: onFill(d, i) }, children: d.value })
|
|
56
|
-
},
|
|
57
|
-
d.label
|
|
58
|
-
))
|
|
59
|
-
}
|
|
60
|
-
),
|
|
61
|
-
showLegend && /* @__PURE__ */ jsx("ul", { className: "mt-3 flex flex-wrap gap-x-4 gap-y-1", children: data.map((d, i) => /* @__PURE__ */ jsxs("li", { className: cn("flex items-center gap-1.5 sv-body-sm", d.active ? "text-on-surface" : "text-on-surface-variant"), children: [
|
|
62
|
-
/* @__PURE__ */ jsx("span", { className: "size-2 shrink-0 rounded-swatch", style: { background: fill(d, i) }, "aria-hidden": "true" }),
|
|
63
|
-
d.label
|
|
64
|
-
] }, d.label)) })
|
|
65
|
-
] });
|
|
66
|
-
}
|
|
67
|
-
SegmentedBar.displayName = "SegmentedBar";
|
|
68
|
-
|
|
69
|
-
export {
|
|
70
|
-
SegmentedBar
|
|
71
|
-
};
|
|
72
|
-
//# sourceMappingURL=chunk-CZ3JB37A.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/charts/segmented-bar.tsx"],"sourcesContent":["import { cn } from '@/lib/utils';\nimport {\n categorical, categoricalOn, categoricalNeedsEdge,\n sequential, sequentialOn, sequentialNeedsEdge,\n toneNeedsEdge, markEdge, chartToken,\n} from './lib/series';\n\nexport interface Segment {\n label: string;\n value: number;\n /** Pull this segment forward (ink) and others recede. */\n active?: boolean;\n}\n\nexport interface SegmentedBarProps {\n data: Segment[];\n /** Bar thickness in px. */\n height?: number;\n /**\n * How segments get colour:\n * - `mono` (default): grayscale, active segment is ink, the rest are muted tints.\n * - `categorical`: the capped unordered palette (≤4 meaningful categories).\n * - `sequential`: single-hue magnitude ramp, in data order.\n */\n scale?: 'mono' | 'categorical' | 'sequential';\n /** Show the label + value row beneath the bar. */\n showLegend?: boolean;\n className?: string;\n}\n\n/**\n * Cairn SegmentedBar, a single horizontal bar split into labelled parts (a share-of-total\n * / stacked bar). Grayscale by default; hue is opt-in via `scale`. Every segment carries a\n * text label + value, so meaning never rests on colour alone (WCAG-safe). Zero-dependency.\n */\nexport function SegmentedBar({ data, height = 40, scale = 'mono', showLegend = true, className }: SegmentedBarProps) {\n // Negative / non-finite segment values would produce invalid or overflowing widths; clamp to 0.\n const safe = (v: number) => (Number.isFinite(v) && v > 0 ? v : 0);\n const total = data.reduce((s, d) => s + safe(d.value), 0) || 1;\n const hasActive = data.some((d) => d.active);\n\n const fill = (d: Segment, i: number): string => {\n if (scale === 'categorical') return categorical(i);\n if (scale === 'sequential') return sequential(i, data.length);\n // mono: ink for the active (or all, when none is active), muted tints otherwise.\n if (!hasActive) return chartToken.ink;\n return d.active ? chartToken.ink : chartToken.muted;\n };\n\n // Accessible foreground paired to each fill, WCAG AA, never a blend mode that guesses.\n const onFill = (d: Segment, i: number): string => {\n if (scale === 'categorical') return categoricalOn(i);\n if (scale === 'sequential') return sequentialOn(i, data.length);\n // mono: white throughout. `muted` is neutral.500 now (it had to darken to carry its own 3:1\n // shape contrast), so it takes white at 4.5:1 — ink on it would be 3.7:1 and fail.\n return 'var(--sv-sys-color-on-primary)';\n };\n\n // A keyline only where the fill cannot carry its own 3:1 shape contrast. Since mono and\n // categorical fills were darkened to clear 3:1 unaided, in practice this fires ONLY on the\n // pale low end of the sequential ramp — every other segment draws no border at all, because\n // boxing every segment turns the bar into a table (rule 9, AGENTS.md).\n const edge = (d: Segment, i: number): string | undefined => {\n if (scale === 'categorical') return markEdge(categoricalNeedsEdge(i));\n if (scale === 'sequential') return markEdge(sequentialNeedsEdge(i, data.length));\n return markEdge(toneNeedsEdge(!hasActive || d.active ? 'ink' : 'muted'));\n };\n\n return (\n <div className={cn('w-full', className)}>\n {/* A thin gap separates adjacent segments, so the keyline is not needed for that job: it\n appears only under a pale fill, which cannot carry the 3:1 shape contrast against the\n surface on its own (AGENTS.md rule 9). */}\n <div\n className=\"flex w-full\"\n style={{ height, gap: 2 }}\n role=\"img\"\n aria-label={data.map((d) => `${d.label} ${d.value}`).join(', ')}\n >\n {data.map((d, i) => (\n <div\n key={d.label}\n className=\"flex items-center justify-end px-2 first:rounded-l-control last:rounded-r-control\"\n style={{\n width: `${(safe(d.value) / total) * 100}%`,\n background: fill(d, i),\n boxShadow: edge(d, i),\n }}\n >\n <span className=\"truncate sv-body-xs font-medium tabular-nums\" style={{ color: onFill(d, i) }}>{d.value}</span>\n </div>\n ))}\n </div>\n {showLegend && (\n <ul className=\"mt-3 flex flex-wrap gap-x-4 gap-y-1\">\n {data.map((d, i) => (\n <li key={d.label} className={cn('flex items-center gap-1.5 sv-body-sm', d.active ? 'text-on-surface' : 'text-on-surface-variant')}>\n <span className=\"size-2 shrink-0 rounded-swatch\" style={{ background: fill(d, i) }} aria-hidden=\"true\" />\n {d.label}\n </li>\n ))}\n </ul>\n )}\n </div>\n );\n}\nSegmentedBar.displayName = 'SegmentedBar';\n"],"mappings":";;;;;;;;;;;;;;;;AAyFY,cAOA,YAPA;AAtDL,SAAS,aAAa,EAAE,MAAM,SAAS,IAAI,QAAQ,QAAQ,aAAa,MAAM,UAAU,GAAsB;AAEnH,QAAM,OAAO,CAAC,MAAe,OAAO,SAAS,CAAC,KAAK,IAAI,IAAI,IAAI;AAC/D,QAAM,QAAQ,KAAK,OAAO,CAAC,GAAG,MAAM,IAAI,KAAK,EAAE,KAAK,GAAG,CAAC,KAAK;AAC7D,QAAM,YAAY,KAAK,KAAK,CAAC,MAAM,EAAE,MAAM;AAE3C,QAAM,OAAO,CAAC,GAAY,MAAsB;AAC9C,QAAI,UAAU,cAAe,QAAO,YAAY,CAAC;AACjD,QAAI,UAAU,aAAc,QAAO,WAAW,GAAG,KAAK,MAAM;AAE5D,QAAI,CAAC,UAAW,QAAO,WAAW;AAClC,WAAO,EAAE,SAAS,WAAW,MAAM,WAAW;AAAA,EAChD;AAGA,QAAM,SAAS,CAAC,GAAY,MAAsB;AAChD,QAAI,UAAU,cAAe,QAAO,cAAc,CAAC;AACnD,QAAI,UAAU,aAAc,QAAO,aAAa,GAAG,KAAK,MAAM;AAG9D,WAAO;AAAA,EACT;AAMA,QAAM,OAAO,CAAC,GAAY,MAAkC;AAC1D,QAAI,UAAU,cAAe,QAAO,SAAS,qBAAqB,CAAC,CAAC;AACpE,QAAI,UAAU,aAAc,QAAO,SAAS,oBAAoB,GAAG,KAAK,MAAM,CAAC;AAC/E,WAAO,SAAS,cAAc,CAAC,aAAa,EAAE,SAAS,QAAQ,OAAO,CAAC;AAAA,EACzE;AAEA,SACE,qBAAC,SAAI,WAAW,GAAG,UAAU,SAAS,GAIpC;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,OAAO,EAAE,QAAQ,KAAK,EAAE;AAAA,QACxB,MAAK;AAAA,QACL,cAAY,KAAK,IAAI,CAAC,MAAM,GAAG,EAAE,KAAK,IAAI,EAAE,KAAK,EAAE,EAAE,KAAK,IAAI;AAAA,QAE7D,eAAK,IAAI,CAAC,GAAG,MACZ;AAAA,UAAC;AAAA;AAAA,YAEC,WAAU;AAAA,YACV,OAAO;AAAA,cACL,OAAO,GAAI,KAAK,EAAE,KAAK,IAAI,QAAS,GAAG;AAAA,cACvC,YAAY,KAAK,GAAG,CAAC;AAAA,cACrB,WAAW,KAAK,GAAG,CAAC;AAAA,YACtB;AAAA,YAEA,8BAAC,UAAK,WAAU,gDAA+C,OAAO,EAAE,OAAO,OAAO,GAAG,CAAC,EAAE,GAAI,YAAE,OAAM;AAAA;AAAA,UARnG,EAAE;AAAA,QAST,CACD;AAAA;AAAA,IACH;AAAA,IACC,cACC,oBAAC,QAAG,WAAU,uCACX,eAAK,IAAI,CAAC,GAAG,MACZ,qBAAC,QAAiB,WAAW,GAAG,wCAAwC,EAAE,SAAS,oBAAoB,yBAAyB,GAC9H;AAAA,0BAAC,UAAK,WAAU,kCAAiC,OAAO,EAAE,YAAY,KAAK,GAAG,CAAC,EAAE,GAAG,eAAY,QAAO;AAAA,MACtG,EAAE;AAAA,SAFI,EAAE,KAGX,CACD,GACH;AAAA,KAEJ;AAEJ;AACA,aAAa,cAAc;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/overlay/tooltip.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\nimport { cn } from '@/lib/utils';\n\n/**\n * Cairn Tooltip. Radix, because the `title` attribute is not an accessible\n * alternative to one.\n *\n * `title` looks like the free version of a tooltip and behaves like nothing at\n * all: it never appears on keyboard focus, most screen readers ignore or\n * duplicate it, it cannot be dismissed, and its delay belongs to the operating\n * system. Any information a sighted mouse user gets from it is information a\n * keyboard user does not get. Radix gives focus and hover parity, Escape to\n * dismiss, and a real `aria-describedby` link.\n *\n * The rule that survives all of it: a tooltip may only ever carry information\n * that is *supplementary*. If the interface does not make sense without it, the\n * text belongs on the surface (rule 4 — meaning never rests on a hover).\n *\n * Inverse surface, not a hue: a tooltip is a small dense mark and the inverse\n * pairing is the one that reads at that size on both themes.\n */\n\nexport const TooltipProvider = TooltipPrimitive.Provider;\nexport const Tooltip = TooltipPrimitive.Root;\nexport const TooltipTrigger = TooltipPrimitive.Trigger;\n\nexport interface TooltipContentProps\n extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> {\n /** Where the portal mounts. Defaults to `document.body`. See `PopoverContent`. */\n container?: HTMLElement | null;\n}\n\nexport const TooltipContent = React.forwardRef<\n React.ComponentRef<typeof TooltipPrimitive.Content>,\n TooltipContentProps\n>(({ className, sideOffset = 6, collisionPadding = 12, container, ...props }, ref) => (\n <TooltipPrimitive.Portal container={container ?? undefined}>\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n collisionPadding={collisionPadding}\n className={cn(\n 'z-50 max-w-64 rounded-control bg-inverse-surface px-3 py-1 sv-body-xs text-on-inverse-surface shadow-overlay',\n className\n )}\n {...props}\n />\n </TooltipPrimitive.Portal>\n));\nTooltipContent.displayName = 'TooltipContent';\n"],"mappings":";;;;;AAEA,YAAY,WAAW;AACvB,YAAY,sBAAsB;AAqC9B;AAfG,IAAM,kBAAmC;AACzC,IAAM,UAA2B;AACjC,IAAM,iBAAkC;AAQxC,IAAM,iBAAuB,iBAGlC,CAAC,EAAE,WAAW,aAAa,GAAG,mBAAmB,IAAI,WAAW,GAAG,MAAM,GAAG,QAC5E,oBAAkB,yBAAjB,EAAwB,WAAW,aAAa,QAC/C;AAAA,EAAkB;AAAA,EAAjB;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,GACF,CACD;AACD,eAAe,cAAc;","names":[]}
|
package/dist/chunk-G2XJK244.js
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
// src/charts/lib/series.ts
|
|
2
|
-
var chartToken = {
|
|
3
|
-
ink: "var(--sv-sys-chart-ink)",
|
|
4
|
-
muted: "var(--sv-sys-chart-muted)",
|
|
5
|
-
markEdge: "var(--sv-sys-chart-mark-edge)",
|
|
6
|
-
accent: "var(--sv-sys-chart-categorical-2)",
|
|
7
|
-
grid: "var(--sv-sys-chart-grid)",
|
|
8
|
-
axis: "var(--sv-sys-chart-axis)",
|
|
9
|
-
track: "var(--sv-sys-chart-track)"
|
|
10
|
-
};
|
|
11
|
-
var CATEGORICAL = [
|
|
12
|
-
"var(--sv-sys-chart-categorical-1)",
|
|
13
|
-
"var(--sv-sys-chart-categorical-2)",
|
|
14
|
-
"var(--sv-sys-chart-categorical-3)",
|
|
15
|
-
"var(--sv-sys-chart-categorical-4)"
|
|
16
|
-
];
|
|
17
|
-
var SEQUENTIAL = [
|
|
18
|
-
"var(--sv-sys-chart-sequential-1)",
|
|
19
|
-
"var(--sv-sys-chart-sequential-2)",
|
|
20
|
-
"var(--sv-sys-chart-sequential-3)",
|
|
21
|
-
"var(--sv-sys-chart-sequential-4)",
|
|
22
|
-
"var(--sv-sys-chart-sequential-5)"
|
|
23
|
-
];
|
|
24
|
-
var CATEGORICAL_MAX = CATEGORICAL.length;
|
|
25
|
-
var CATEGORICAL_ON = [
|
|
26
|
-
"var(--sv-sys-color-on-primary)",
|
|
27
|
-
// white, on neutral.900 (16.6:1)
|
|
28
|
-
"var(--sv-sys-color-on-primary)",
|
|
29
|
-
// white, on main.700 (6.0:1)
|
|
30
|
-
"var(--sv-sys-color-on-primary)",
|
|
31
|
-
// white, on neutral.500 (4.5:1)
|
|
32
|
-
"var(--sv-sys-color-on-surface)"
|
|
33
|
-
// ink, on main.400 (5.0:1)
|
|
34
|
-
];
|
|
35
|
-
var SEQUENTIAL_ON = [
|
|
36
|
-
"var(--sv-sys-color-on-surface)",
|
|
37
|
-
// ink, on main.100 (12.4:1)
|
|
38
|
-
"var(--sv-sys-color-on-surface)",
|
|
39
|
-
// ink, on main.300 (6.9:1)
|
|
40
|
-
"var(--sv-sys-color-on-surface)",
|
|
41
|
-
// ink, on main.500 (4.8:1)
|
|
42
|
-
"var(--sv-sys-color-on-primary)",
|
|
43
|
-
// white, on main.700 (6.0:1)
|
|
44
|
-
"var(--sv-sys-color-on-primary)"
|
|
45
|
-
// white, on main.900 (11.4:1)
|
|
46
|
-
];
|
|
47
|
-
var chartStroke = { line: 2, guide: 1 };
|
|
48
|
-
function toneFill(tone) {
|
|
49
|
-
if (tone === "accent") return chartToken.accent;
|
|
50
|
-
if (tone === "muted") return chartToken.muted;
|
|
51
|
-
return chartToken.ink;
|
|
52
|
-
}
|
|
53
|
-
var wrap = (i, n) => (i % n + n) % n;
|
|
54
|
-
var rampIndex = (i, n) => n <= 1 ? SEQUENTIAL.length - 1 : Math.round(Math.min(Math.max(i / (n - 1), 0), 1) * (SEQUENTIAL.length - 1));
|
|
55
|
-
function categorical(i) {
|
|
56
|
-
return CATEGORICAL[wrap(i, CATEGORICAL_MAX)];
|
|
57
|
-
}
|
|
58
|
-
function categoricalOn(i) {
|
|
59
|
-
return CATEGORICAL_ON[wrap(i, CATEGORICAL_MAX)];
|
|
60
|
-
}
|
|
61
|
-
function sequential(i, n) {
|
|
62
|
-
return SEQUENTIAL[rampIndex(i, n)];
|
|
63
|
-
}
|
|
64
|
-
function sequentialOn(i, n) {
|
|
65
|
-
return SEQUENTIAL_ON[rampIndex(i, n)];
|
|
66
|
-
}
|
|
67
|
-
var CATEGORICAL_PALE = [false, false, false, false];
|
|
68
|
-
var SEQUENTIAL_PALE = [true, true, false, false, false];
|
|
69
|
-
function categoricalNeedsEdge(i) {
|
|
70
|
-
return CATEGORICAL_PALE[wrap(i, CATEGORICAL_MAX)];
|
|
71
|
-
}
|
|
72
|
-
function sequentialNeedsEdge(i, n) {
|
|
73
|
-
return SEQUENTIAL_PALE[rampIndex(i, n)];
|
|
74
|
-
}
|
|
75
|
-
function toneNeedsEdge(_tone) {
|
|
76
|
-
return false;
|
|
77
|
-
}
|
|
78
|
-
function markEdge(needed) {
|
|
79
|
-
return needed ? `inset 0 0 0 1px ${chartToken.markEdge}` : void 0;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export {
|
|
83
|
-
chartToken,
|
|
84
|
-
CATEGORICAL_MAX,
|
|
85
|
-
chartStroke,
|
|
86
|
-
toneFill,
|
|
87
|
-
categorical,
|
|
88
|
-
categoricalOn,
|
|
89
|
-
sequential,
|
|
90
|
-
sequentialOn,
|
|
91
|
-
categoricalNeedsEdge,
|
|
92
|
-
sequentialNeedsEdge,
|
|
93
|
-
toneNeedsEdge,
|
|
94
|
-
markEdge
|
|
95
|
-
};
|
|
96
|
-
//# sourceMappingURL=chunk-G2XJK244.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/charts/lib/series.ts"],"sourcesContent":["/**\n * Cairn data-viz colour, the single place a series gets a colour.\n *\n * Rule: grayscale first. A single series is `ink`; a comparison series is `muted`.\n * Reach for hue only when categories are genuinely unordered (`categorical`, capped\n * at 4) or encode magnitude (`sequential`, single-hue). Never hand-pick a hex, every\n * value here is a `sys.chart.*` token resolved at runtime via its CSS variable, so a\n * theme swap (light↔dark) recolours the charts for free.\n */\n\n/** Semantic chart roles → their CSS variable. The single place a chart hue is named;\n * components consume these, never the raw `--sv-sys-chart-*` var. `accent` is the one\n * opt-in hue (the signature accent) a fixed-shape chart may promote a value to. */\nexport const chartToken = {\n ink: 'var(--sv-sys-chart-ink)',\n muted: 'var(--sv-sys-chart-muted)',\n markEdge: 'var(--sv-sys-chart-mark-edge)',\n accent: 'var(--sv-sys-chart-categorical-2)',\n grid: 'var(--sv-sys-chart-grid)',\n axis: 'var(--sv-sys-chart-axis)',\n track: 'var(--sv-sys-chart-track)',\n} as const;\n\n/** The unordered-category palette. HARD CAP at 4, a 5th category needs a pattern or\n * label, never a 5th hue. Indices wrap so a longer series degrades loudly, not silently. */\nconst CATEGORICAL = [\n 'var(--sv-sys-chart-categorical-1)',\n 'var(--sv-sys-chart-categorical-2)',\n 'var(--sv-sys-chart-categorical-3)',\n 'var(--sv-sys-chart-categorical-4)',\n] as const;\n\n/** Single-hue magnitude ramp (low → high). */\nconst SEQUENTIAL = [\n 'var(--sv-sys-chart-sequential-1)',\n 'var(--sv-sys-chart-sequential-2)',\n 'var(--sv-sys-chart-sequential-3)',\n 'var(--sv-sys-chart-sequential-4)',\n 'var(--sv-sys-chart-sequential-5)',\n] as const;\n\nexport const CATEGORICAL_MAX = CATEGORICAL.length;\n\n/** Accessible foreground for text/marks laid ON each categorical fill. Every pair below\n * clears WCAG AA (≥4.5:1). The accent category is main.700, not the brand main.600: a chart\n * fill carries a small value label, and 600 only clears the 3:1 large-text bar (ink 4.04:1).\n * Index-matched to CATEGORICAL, never guess contrast at runtime. */\nconst CATEGORICAL_ON = [\n 'var(--sv-sys-color-on-primary)', // white, on neutral.900 (16.6:1)\n 'var(--sv-sys-color-on-primary)', // white, on main.700 (6.0:1)\n 'var(--sv-sys-color-on-primary)', // white, on neutral.500 (4.5:1)\n 'var(--sv-sys-color-on-surface)', // ink, on main.400 (5.0:1)\n] as const;\n\n/** Accessible foreground per sequential step. The ramp is the accent, so it stays legible\n * under ink further up than a blue ramp would: main.100/300/500 take ink, only the darker\n * main.700/900 take white. Index-matched to SEQUENTIAL. */\nconst SEQUENTIAL_ON = [\n 'var(--sv-sys-color-on-surface)', // ink, on main.100 (12.4:1)\n 'var(--sv-sys-color-on-surface)', // ink, on main.300 (6.9:1)\n 'var(--sv-sys-color-on-surface)', // ink, on main.500 (4.8:1)\n 'var(--sv-sys-color-on-primary)', // white, on main.700 (6.0:1)\n 'var(--sv-sys-color-on-primary)', // white, on main.900 (11.4:1)\n] as const;\n\n/** Chart line-mark weights, in px. The single stroke scale for the family: every line mark\n * (sparkline, area line, trend line) uses `line`; reference/guide lines use `guide`. Radial\n * gauges (Ring) set their own arc thickness. Lives here beside `chartToken` so the whole\n * chart visual language (colour + stroke) has one home. */\nexport const chartStroke = { line: 2, guide: 1 } as const;\n\n/** The mono tone of a chart mark → its `sys.chart.*` colour. `ink` = the single/active series,\n * `muted` = a comparison/secondary series, `accent` = the one opt-in hue (the signature accent).\n * The single definition of the `tone` option, shared by every chart in the family. */\nexport function toneFill(tone: 'ink' | 'muted' | 'accent'): string {\n if (tone === 'accent') return chartToken.accent;\n if (tone === 'muted') return chartToken.muted;\n return chartToken.ink;\n}\n\nconst wrap = (i: number, n: number) => ((i % n) + n) % n;\nconst rampIndex = (i: number, n: number) =>\n n <= 1 ? SEQUENTIAL.length - 1 : Math.round(Math.min(Math.max(i / (n - 1), 0), 1) * (SEQUENTIAL.length - 1));\n\n/** Colour for category `i` (0-based). Wraps past the cap, pair with a label/pattern. */\nexport function categorical(i: number): string {\n return CATEGORICAL[wrap(i, CATEGORICAL_MAX)];\n}\n\n/** WCAG-AA foreground for text drawn on `categorical(i)`. */\nexport function categoricalOn(i: number): string {\n return CATEGORICAL_ON[wrap(i, CATEGORICAL_MAX)];\n}\n\n/** Colour for the `i`-th of `n` steps on the single-hue magnitude ramp. */\nexport function sequential(i: number, n: number): string {\n return SEQUENTIAL[rampIndex(i, n)];\n}\n\n/** WCAG-AA foreground for text drawn on `sequential(i, n)`. */\nexport function sequentialOn(i: number, n: number): string {\n return SEQUENTIAL_ON[rampIndex(i, n)];\n}\n\n/** Which fills sit under 3:1 against the surface and therefore need a `mark-edge` keyline to\n * carry their shape contrast (rule 9). Everything else already clears 3:1 on its own and takes\n * **no border at all**: a keyline on a dark or saturated fill is decoration, not accessibility,\n * and a chart where every mark is boxed reads as a table, not as data. Measured per value,\n * index-matched, never guessed at runtime.\n *\n * Mono and categorical fills were DARKENED so every one of them clears 3:1 unaided — that is why\n * bars and segments carry no border at all any more. categorical: neutral.900 (16.6:1),\n * main.700 (6.0:1), neutral.500 (4.5:1), main.400 (3.3:1) all pass.\n *\n * `sequential` is the one exception, and it is structural rather than an oversight: a magnitude\n * ramp has to start pale, so main.100 (1.4:1) and main.300 (2.6:1) cannot be darkened without\n * destroying the very thing the ramp encodes. Those two keep a keyline; main.500 (3.7:1) up\n * carry themselves. */\nconst CATEGORICAL_PALE = [false, false, false, false] as const;\nconst SEQUENTIAL_PALE = [true, true, false, false, false] as const;\n\n/** True when `categorical(i)` needs a keyline. */\nexport function categoricalNeedsEdge(i: number): boolean {\n return CATEGORICAL_PALE[wrap(i, CATEGORICAL_MAX)];\n}\n\n/** True when `sequential(i, n)` needs a keyline. */\nexport function sequentialNeedsEdge(i: number, n: number): boolean {\n return SEQUENTIAL_PALE[rampIndex(i, n)];\n}\n\n/** True when a mono `tone` fill needs a keyline. None do: `muted` moved to neutral.500 and now\n * clears 3:1 on its own (4.5:1 light / 3.7:1 dark), so mono marks draw no border at all. Kept as\n * a function rather than inlined, so a future tone that IS pale has one place to declare it. */\nexport function toneNeedsEdge(_tone: 'ink' | 'muted' | 'accent'): boolean {\n return false;\n}\n\n/** The keyline itself, or `undefined` when the mark carries its own contrast. Feed straight to\n * a style `boxShadow`, so a component never hand-writes the inset shadow. */\nexport function markEdge(needed: boolean): string | undefined {\n return needed ? `inset 0 0 0 1px ${chartToken.markEdge}` : undefined;\n}\n"],"mappings":";AAaO,IAAM,aAAa;AAAA,EACxB,KAAK;AAAA,EACL,OAAO;AAAA,EACP,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AACT;AAIA,IAAM,cAAc;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAGA,IAAM,aAAa;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,IAAM,kBAAkB,YAAY;AAM3C,IAAM,iBAAiB;AAAA,EACrB;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AACF;AAKA,IAAM,gBAAgB;AAAA,EACpB;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AACF;AAMO,IAAM,cAAc,EAAE,MAAM,GAAG,OAAO,EAAE;AAKxC,SAAS,SAAS,MAA0C;AACjE,MAAI,SAAS,SAAU,QAAO,WAAW;AACzC,MAAI,SAAS,QAAS,QAAO,WAAW;AACxC,SAAO,WAAW;AACpB;AAEA,IAAM,OAAO,CAAC,GAAW,OAAgB,IAAI,IAAK,KAAK;AACvD,IAAM,YAAY,CAAC,GAAW,MAC5B,KAAK,IAAI,WAAW,SAAS,IAAI,KAAK,MAAM,KAAK,IAAI,KAAK,IAAI,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,WAAW,SAAS,EAAE;AAGtG,SAAS,YAAY,GAAmB;AAC7C,SAAO,YAAY,KAAK,GAAG,eAAe,CAAC;AAC7C;AAGO,SAAS,cAAc,GAAmB;AAC/C,SAAO,eAAe,KAAK,GAAG,eAAe,CAAC;AAChD;AAGO,SAAS,WAAW,GAAW,GAAmB;AACvD,SAAO,WAAW,UAAU,GAAG,CAAC,CAAC;AACnC;AAGO,SAAS,aAAa,GAAW,GAAmB;AACzD,SAAO,cAAc,UAAU,GAAG,CAAC,CAAC;AACtC;AAgBA,IAAM,mBAAmB,CAAC,OAAO,OAAO,OAAO,KAAK;AACpD,IAAM,kBAAkB,CAAC,MAAM,MAAM,OAAO,OAAO,KAAK;AAGjD,SAAS,qBAAqB,GAAoB;AACvD,SAAO,iBAAiB,KAAK,GAAG,eAAe,CAAC;AAClD;AAGO,SAAS,oBAAoB,GAAW,GAAoB;AACjE,SAAO,gBAAgB,UAAU,GAAG,CAAC,CAAC;AACxC;AAKO,SAAS,cAAc,OAA4C;AACxE,SAAO;AACT;AAIO,SAAS,SAAS,QAAqC;AAC5D,SAAO,SAAS,mBAAmB,WAAW,QAAQ,KAAK;AAC7D;","names":[]}
|
package/dist/chunk-GNHNTI5A.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cn
|
|
3
|
-
} from "./chunk-DXRY7AS4.js";
|
|
4
|
-
|
|
5
|
-
// src/input/textarea.tsx
|
|
6
|
-
import * as React from "react";
|
|
7
|
-
import { jsx } from "react/jsx-runtime";
|
|
8
|
-
var Textarea = React.forwardRef(
|
|
9
|
-
({ className, rows = 3, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
10
|
-
"textarea",
|
|
11
|
-
{
|
|
12
|
-
ref,
|
|
13
|
-
rows,
|
|
14
|
-
className: cn(
|
|
15
|
-
"w-full resize-y rounded-field border border-outline-strong bg-surface p-inset-sm sv-body-sm text-on-surface",
|
|
16
|
-
"outline-none placeholder:text-on-surface-variant",
|
|
17
|
-
"focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-focus",
|
|
18
|
-
"disabled:cursor-not-allowed disabled:opacity-40",
|
|
19
|
-
className
|
|
20
|
-
),
|
|
21
|
-
...props
|
|
22
|
-
}
|
|
23
|
-
)
|
|
24
|
-
);
|
|
25
|
-
Textarea.displayName = "Textarea";
|
|
26
|
-
|
|
27
|
-
export {
|
|
28
|
-
Textarea
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=chunk-GNHNTI5A.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/input/textarea.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '@/lib/utils';\n\n/**\n * Cairn Textarea. `Input`'s multi-line sibling, same tokens, same radius role.\n *\n * Resize is left to the browser (`resize-y` only): a horizontally resizable\n * field breaks the column it sits in, and a field that cannot grow at all\n * forces the writer to compose inside a slot.\n */\nexport type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>;\n\nexport const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n ({ className, rows = 3, ...props }, ref) => (\n <textarea\n ref={ref}\n rows={rows}\n className={cn(\n 'w-full resize-y rounded-field border border-outline-strong bg-surface p-inset-sm sv-body-sm text-on-surface',\n 'outline-none placeholder:text-on-surface-variant',\n 'focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-focus',\n 'disabled:cursor-not-allowed disabled:opacity-40',\n className\n )}\n {...props}\n />\n )\n);\nTextarea.displayName = 'Textarea';\n"],"mappings":";;;;;AAAA,YAAY,WAAW;AAcnB;AAFG,IAAM,WAAiB;AAAA,EAC5B,CAAC,EAAE,WAAW,OAAO,GAAG,GAAG,MAAM,GAAG,QAClC;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AACA,SAAS,cAAc;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/input/label.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { cn } from '@/lib/utils';\n\n/**\n * Cairn Label. Radix, for one reason that is not styling.\n *\n * A plain `<label htmlFor>` works until the control is a composite — a Radix\n * select, a toggle group, anything that is not a single native element — and\n * then the association silently stops working. Radix's Label also stops the\n * text-selection-on-double-click that makes a form feel broken. That is\n * behaviour, so it is a dependency; the styling below is the whole of our part.\n *\n * The `label` type role, neutral ink on `on-surface-variant`: a label is\n * supporting text and its tone says so. It is never coloured (rule 1) and never\n * set in caps (rule 6) — the pill badge is the one sanctioned kicker.\n */\nexport type LabelProps = React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>;\n\nexport const Label = React.forwardRef<\n React.ComponentRef<typeof LabelPrimitive.Root>,\n LabelProps\n>(({ className, ...props }, ref) => (\n <LabelPrimitive.Root\n ref={ref}\n className={cn(\n 'sv-label-sm text-on-surface-variant',\n 'peer-disabled:cursor-not-allowed peer-disabled:opacity-40',\n className\n )}\n {...props}\n />\n));\nLabel.displayName = 'Label';\n\n/**\n * A labelled control in one call: the two are wired by a generated id, so a\n * consumer cannot forget the `htmlFor`/`id` pair — the most common way an\n * accessible form stops being one.\n */\nexport interface FieldProps {\n label: React.ReactNode;\n /** Receives the generated id; render your control with it. */\n children: (id: string) => React.ReactNode;\n className?: string;\n}\n\nexport function Field({ label, children, className }: FieldProps) {\n const id = React.useId();\n return (\n <div className={cn('flex flex-col gap-gap-xs', className)}>\n <Label htmlFor={id}>{label}</Label>\n {children(id)}\n </div>\n );\n}\n"],"mappings":";;;;;AAEA,YAAY,WAAW;AACvB,YAAY,oBAAoB;AAsB9B,cA2BE,YA3BF;AAJK,IAAM,QAAc,iBAGzB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAgB;AAAA,EAAf;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,MAAM,cAAc;AAcb,SAAS,MAAM,EAAE,OAAO,UAAU,UAAU,GAAe;AAChE,QAAM,KAAW,YAAM;AACvB,SACE,qBAAC,SAAI,WAAW,GAAG,4BAA4B,SAAS,GACtD;AAAA,wBAAC,SAAM,SAAS,IAAK,iBAAM;AAAA,IAC1B,SAAS,EAAE;AAAA,KACd;AAEJ;","names":[]}
|