@kismet-ux/constellation 1.8.0 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -0
- package/dist/brand/Logo/logo.css +4 -1
- package/dist/form/Checkbox/checkbox.css +48 -34
- package/dist/form/Checkbox/checkbox.d.ts +5 -0
- package/dist/form/Checkbox/checkbox.d.ts.map +1 -1
- package/dist/form/Checkbox/checkbox.js +6 -55
- package/dist/form/Checkbox/checkbox.js.map +1 -1
- package/dist/form/Checkbox/checkbox.module.scss.js +1 -1
- package/dist/form/Combobox/combobox.css +35 -0
- package/dist/form/Combobox/combobox.d.ts +41 -0
- package/dist/form/Combobox/combobox.d.ts.map +1 -0
- package/dist/form/Combobox/combobox.js +152 -0
- package/dist/form/Combobox/combobox.js.map +1 -0
- package/dist/form/Combobox/combobox.module.scss.js +6 -0
- package/dist/form/Combobox/combobox.module.scss.js.map +1 -0
- package/dist/form/Combobox/index.d.ts +2 -0
- package/dist/form/Combobox/index.d.ts.map +1 -0
- package/dist/form/DatePicker/date-picker.d.ts.map +1 -1
- package/dist/form/DatePicker/date-picker.js +5 -53
- package/dist/form/DatePicker/date-picker.js.map +1 -1
- package/dist/form/Input/input.css +12 -0
- package/dist/form/Input/input.d.ts.map +1 -1
- package/dist/form/Input/input.js +23 -3
- package/dist/form/Input/input.js.map +1 -1
- package/dist/form/Select/select.css +54 -1
- package/dist/form/Select/select.d.ts +41 -3
- package/dist/form/Select/select.d.ts.map +1 -1
- package/dist/form/Select/select.js +43 -21
- package/dist/form/Select/select.js.map +1 -1
- package/dist/form/Select/select.module.scss.js +2 -2
- package/dist/form/index.d.ts +1 -0
- package/dist/form/index.d.ts.map +1 -1
- package/dist/form.d.ts +1 -1
- package/dist/form.js +2 -1
- package/dist/form.js.map +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/layout/index.d.ts +1 -0
- package/dist/hooks/layout/index.d.ts.map +1 -1
- package/dist/hooks/layout/use-flip.d.ts +37 -0
- package/dist/hooks/layout/use-flip.d.ts.map +1 -0
- package/dist/hooks/layout/use-flip.js +128 -0
- package/dist/hooks/layout/use-flip.js.map +1 -0
- package/dist/hooks/use-motion.d.ts +30 -0
- package/dist/hooks/use-motion.d.ts.map +1 -0
- package/dist/hooks/use-motion.js +93 -0
- package/dist/hooks/use-motion.js.map +1 -0
- package/dist/index-2nHZOukj.d.ts +200 -0
- package/dist/index-3Ui8TAHy.d.ts +200 -0
- package/dist/index-59JuNTZm.d.ts +537 -0
- package/dist/index-5QXWn0de.d.ts +200 -0
- package/dist/index-98ozinMf.d.ts +498 -0
- package/dist/index-Ah3YQTri.d.ts +566 -0
- package/dist/index-As2iBOIu.d.ts +527 -0
- package/dist/index-B1Vw0zoR.d.ts +566 -0
- package/dist/index-B25sLBMr.d.ts +498 -0
- package/dist/index-B4B8aA9X.d.ts +272 -0
- package/dist/index-B97hn7Xp.d.ts +514 -0
- package/dist/{index-BSSQnlm_.d.ts → index-B9B7JjTb.d.ts} +3 -1
- package/dist/index-BFWt_pYt.d.ts +566 -0
- package/dist/index-BFZp_Pu6.d.ts +566 -0
- package/dist/index-BGL4DvKQ.d.ts +293 -0
- package/dist/index-BGP_J4I2.d.ts +498 -0
- package/dist/index-BHhoIUD_.d.ts +354 -0
- package/dist/index-BI0iaWmp.d.ts +222 -0
- package/dist/index-BMSRpHb6.d.ts +273 -0
- package/dist/index-BRQWKmfq.d.ts +566 -0
- package/dist/index-BTARYt96.d.ts +537 -0
- package/dist/index-BTrpuZdU.d.ts +566 -0
- package/dist/index-BWTwKQsp.d.ts +354 -0
- package/dist/index-B_05Skyi.d.ts +566 -0
- package/dist/index-BcQqBGNu.d.ts +200 -0
- package/dist/index-Be23E9xD.d.ts +298 -0
- package/dist/index-Bf44Z8ak.d.ts +514 -0
- package/dist/index-Bg42sKjg.d.ts +498 -0
- package/dist/index-Bg_0OPMx.d.ts +566 -0
- package/dist/index-BgjRk9l7.d.ts +537 -0
- package/dist/index-BhLEMn3N.d.ts +537 -0
- package/dist/index-BiqECuUj.d.ts +204 -0
- package/dist/index-BjUQiAs1.d.ts +130 -0
- package/dist/index-BlKqvax0.d.ts +204 -0
- package/dist/index-Bnb0JFqx.d.ts +514 -0
- package/dist/index-BpSD6t7A.d.ts +566 -0
- package/dist/index-BpxKwrv_.d.ts +537 -0
- package/dist/index-Brh7JZAQ.d.ts +514 -0
- package/dist/index-C-n7hM4G.d.ts +354 -0
- package/dist/index-C0wKb28S.d.ts +514 -0
- package/dist/index-C129uthr.d.ts +566 -0
- package/dist/index-C1ef0QtQ.d.ts +204 -0
- package/dist/index-C4BACHGE.d.ts +272 -0
- package/dist/index-C5JU8WTE.d.ts +514 -0
- package/dist/index-C63UYi-T.d.ts +195 -0
- package/dist/index-C8LoYkC7.d.ts +250 -0
- package/dist/index-C9-ECLyr.d.ts +566 -0
- package/dist/index-C9B1F-mr.d.ts +293 -0
- package/dist/index-CAVmbwa8.d.ts +514 -0
- package/dist/index-CBz-v5eM.d.ts +184 -0
- package/dist/index-CCpdo0n4.d.ts +130 -0
- package/dist/index-CDC_ZncW.d.ts +566 -0
- package/dist/index-CFQj-KtR.d.ts +184 -0
- package/dist/index-CFaxW5hv.d.ts +184 -0
- package/dist/index-CG9DKbG9.d.ts +498 -0
- package/dist/index-CGhG7YeI.d.ts +354 -0
- package/dist/index-CHC6kRbR.d.ts +537 -0
- package/dist/index-CH_q-5fk.d.ts +537 -0
- package/dist/index-CIK_SmBm.d.ts +200 -0
- package/dist/index-CJ1KPFOf.d.ts +537 -0
- package/dist/index-CJ5FEGRG.d.ts +537 -0
- package/dist/index-CKX2VNKk.d.ts +240 -0
- package/dist/index-CL7kYZ90.d.ts +231 -0
- package/dist/index-CNl03fCW.d.ts +498 -0
- package/dist/index-CO8Jq0pz.d.ts +298 -0
- package/dist/index-CQ-aS-rp.d.ts +566 -0
- package/dist/index-CQjzBv4q.d.ts +537 -0
- package/dist/index-CRVO4SlF.d.ts +537 -0
- package/dist/{index-ibcvWtdH.d.ts → index-CRrCqjAW.d.ts} +11 -1
- package/dist/index-CSQFy2xe.d.ts +195 -0
- package/dist/index-CWM2ewRz.d.ts +566 -0
- package/dist/index-CY6Xq36O.d.ts +204 -0
- package/dist/index-CYGOs6JT.d.ts +273 -0
- package/dist/index-CYPFkjfk.d.ts +204 -0
- package/dist/index-C_hJJ1fH.d.ts +527 -0
- package/dist/index-CcM-XHTL.d.ts +273 -0
- package/dist/index-CdGF_eEO.d.ts +514 -0
- package/dist/index-CdJTE9Lh.d.ts +566 -0
- package/dist/index-CdOt-pqR.d.ts +537 -0
- package/dist/index-CgeR_2Gi.d.ts +220 -0
- package/dist/index-CjUoZbDi.d.ts +354 -0
- package/dist/index-CjV6KsFc.d.ts +263 -0
- package/dist/index-Ck8LtgBW.d.ts +557 -0
- package/dist/index-Cknm9FUU.d.ts +299 -0
- package/dist/index-Clv3CnXv.d.ts +184 -0
- package/dist/index-Cm4wnJ29.d.ts +514 -0
- package/dist/index-Cmz3q-CI.d.ts +273 -0
- package/dist/index-CnMBzCft.d.ts +514 -0
- package/dist/index-CnVW0FnZ.d.ts +272 -0
- package/dist/index-CpIHT-uo.d.ts +231 -0
- package/dist/index-CtBEDM0b.d.ts +514 -0
- package/dist/index-CtVSiQeY.d.ts +130 -0
- package/dist/index-Cu107rOs.d.ts +293 -0
- package/dist/index-CxyTd3Ag.d.ts +354 -0
- package/dist/index-CywSNvOU.d.ts +200 -0
- package/dist/index-CzJL7Lro.d.ts +566 -0
- package/dist/index-CzJnKY3r.d.ts +272 -0
- package/dist/index-D-R9eOxe.d.ts +354 -0
- package/dist/index-D-hdgIbs.d.ts +273 -0
- package/dist/index-D-slQ9w4.d.ts +537 -0
- package/dist/index-D0jdNDaH.d.ts +204 -0
- package/dist/index-D1ir--Li.d.ts +566 -0
- package/dist/index-D29_-MCZ.d.ts +354 -0
- package/dist/index-D2glATpo.d.ts +273 -0
- package/dist/index-D6ATtbor.d.ts +298 -0
- package/dist/index-D6HktSlo.d.ts +514 -0
- package/dist/index-DB4UBCvy.d.ts +537 -0
- package/dist/index-DBd0PU9y.d.ts +222 -0
- package/dist/index-DE2Nm-iT.d.ts +354 -0
- package/dist/index-DEeJuuvm.d.ts +231 -0
- package/dist/index-DHhzBSfL.d.ts +498 -0
- package/dist/index-DKpWNCb6.d.ts +204 -0
- package/dist/index-DMewi97i.d.ts +566 -0
- package/dist/index-DN0gtpck.d.ts +354 -0
- package/dist/index-DO23vZ-R.d.ts +514 -0
- package/dist/index-DTb2-z6E.d.ts +130 -0
- package/dist/index-DV-CN7c0.d.ts +231 -0
- package/dist/index-DWgCs62z.d.ts +566 -0
- package/dist/index-D_6Qu6ia.d.ts +200 -0
- package/dist/index-D_vn8O-I.d.ts +293 -0
- package/dist/index-Daq4m4Rf.d.ts +514 -0
- package/dist/index-Db6cXpr6.d.ts +537 -0
- package/dist/index-DbZ1s2E-.d.ts +514 -0
- package/dist/index-DbevJPuY.d.ts +354 -0
- package/dist/index-DepmPwP7.d.ts +537 -0
- package/dist/index-DfnTWQCz.d.ts +514 -0
- package/dist/index-Dfu8WhiS.d.ts +273 -0
- package/dist/index-DggMYd7c.d.ts +298 -0
- package/dist/index-DhS2nQjt.d.ts +200 -0
- package/dist/index-Dn3bC8Ki.d.ts +222 -0
- package/dist/index-Dn9bGZvU.d.ts +195 -0
- package/dist/index-DnDt7A4Y.d.ts +354 -0
- package/dist/index-DpdYKBP2.d.ts +498 -0
- package/dist/index-DunP9qIK.d.ts +537 -0
- package/dist/index-DxO6-qt5.d.ts +498 -0
- package/dist/index-ESQ8WM_8.d.ts +130 -0
- package/dist/index-GVz409cm.d.ts +222 -0
- package/dist/index-HAx-aLZ0.d.ts +273 -0
- package/dist/{index-CkQ6wNCc.d.ts → index-Iuzs6nt9.d.ts} +3 -3
- package/dist/index-LnEpnlTq.d.ts +566 -0
- package/dist/index-Mihuyg_o.d.ts +204 -0
- package/dist/index-Mm1i2OdU.d.ts +537 -0
- package/dist/index-P0oxVi77.d.ts +537 -0
- package/dist/index-Q5JuPFoN.d.ts +293 -0
- package/dist/index-RJviLtvo.d.ts +566 -0
- package/dist/index-SnQCbfte.d.ts +498 -0
- package/dist/index-Th9It0ZT.d.ts +354 -0
- package/dist/index-UHHmyQM5.d.ts +272 -0
- package/dist/index-VyGmJYQZ.d.ts +537 -0
- package/dist/index-WYH70le_.d.ts +195 -0
- package/dist/index-Wj9RYtTX.d.ts +273 -0
- package/dist/index-Y-wMZeUG.d.ts +298 -0
- package/dist/index-ZgohDspB.d.ts +498 -0
- package/dist/index-Zo2rSdXz.d.ts +273 -0
- package/dist/index-ZwpWgV4n.d.ts +272 -0
- package/dist/index-_oZ4knIl.d.ts +272 -0
- package/dist/index-an222nAK.d.ts +354 -0
- package/dist/index-daV0QTe0.d.ts +537 -0
- package/dist/index-eGZu2HLC.d.ts +231 -0
- package/dist/index-eswPA0Un.d.ts +204 -0
- package/dist/index-gf6-wf_1.d.ts +566 -0
- package/dist/index-hdVr9Wrv.d.ts +566 -0
- package/dist/index-iygiXYw2.d.ts +537 -0
- package/dist/index-jR29ZGLD.d.ts +514 -0
- package/dist/index-kHgI28TP.d.ts +272 -0
- package/dist/index-lY4_UCOs.d.ts +566 -0
- package/dist/index-miXK87yJ.d.ts +231 -0
- package/dist/index-mwbGtZkk.d.ts +273 -0
- package/dist/index-ru2DFXcm.d.ts +195 -0
- package/dist/index-uj1ll_u-.d.ts +204 -0
- package/dist/index-vfq-aH7U.d.ts +537 -0
- package/dist/index-xqUz9XjP.d.ts +537 -0
- package/dist/index.css +74 -18
- package/dist/index.d.ts +78 -12
- package/dist/index.js +34 -28
- package/dist/index.js.map +1 -1
- package/dist/internal/use-scroll-lock.d.ts +15 -0
- package/dist/internal/use-scroll-lock.d.ts.map +1 -1
- package/dist/internal/use-scroll-lock.js +26 -8
- package/dist/internal/use-scroll-lock.js.map +1 -1
- package/dist/layout/AppContent/app-content.css +1 -1
- package/dist/layout/AppContentBands/app-content-bands.css +21 -0
- package/dist/layout/AppContentBands/app-content-bands.d.ts +26 -0
- package/dist/layout/AppContentBands/app-content-bands.d.ts.map +1 -0
- package/dist/layout/AppContentBands/app-content-bands.js +65 -0
- package/dist/layout/AppContentBands/app-content-bands.js.map +1 -0
- package/dist/layout/AppContentBands/app-content-bands.module.scss.js +6 -0
- package/dist/layout/AppContentBands/app-content-bands.module.scss.js.map +1 -0
- package/dist/layout/AppContentBands/index.d.ts +2 -0
- package/dist/layout/AppContentBands/index.d.ts.map +1 -0
- package/dist/layout/AppContentFooter/app-content-footer.css +9 -0
- package/dist/layout/AppContentFooter/app-content-footer.d.ts +38 -0
- package/dist/layout/AppContentFooter/app-content-footer.d.ts.map +1 -0
- package/dist/layout/AppContentFooter/app-content-footer.js +42 -0
- package/dist/layout/AppContentFooter/app-content-footer.js.map +1 -0
- package/dist/layout/AppContentFooter/app-content-footer.module.scss.js +6 -0
- package/dist/layout/AppContentFooter/app-content-footer.module.scss.js.map +1 -0
- package/dist/layout/AppContentFooter/index.d.ts +2 -0
- package/dist/layout/AppContentFooter/index.d.ts.map +1 -0
- package/dist/layout/AppContentMain/app-content-main.css +6 -0
- package/dist/layout/AppContentMain/app-content-main.d.ts +37 -0
- package/dist/layout/AppContentMain/app-content-main.d.ts.map +1 -0
- package/dist/layout/AppContentMain/app-content-main.js +41 -0
- package/dist/layout/AppContentMain/app-content-main.js.map +1 -0
- package/dist/layout/AppContentMain/app-content-main.module.scss.js +6 -0
- package/dist/layout/AppContentMain/app-content-main.module.scss.js.map +1 -0
- package/dist/layout/AppContentMain/index.d.ts +2 -0
- package/dist/layout/AppContentMain/index.d.ts.map +1 -0
- package/dist/layout/AppFooter/app-footer.js +1 -1
- package/dist/layout/AppSidebar/app-sidebar.js +1 -1
- package/dist/layout/AppSidebarHeader/app-sidebar-header.css +2 -3
- package/dist/layout/AppSidebarHeader/app-sidebar-header.d.ts +10 -2
- package/dist/layout/AppSidebarHeader/app-sidebar-header.d.ts.map +1 -1
- package/dist/layout/AppSidebarHeader/app-sidebar-header.js +12 -32
- package/dist/layout/AppSidebarHeader/app-sidebar-header.js.map +1 -1
- package/dist/layout/Collapse/collapse.css +4 -1
- package/dist/layout/Column/column.css +6 -0
- package/dist/layout/Column/column.d.ts.map +1 -1
- package/dist/layout/Column/column.js +3 -1
- package/dist/layout/Column/column.js.map +1 -1
- package/dist/layout/Column/column.module.scss.js +1 -1
- package/dist/layout/Container/container.css +43 -1
- package/dist/layout/Container/container.d.ts.map +1 -1
- package/dist/layout/Container/container.js +38 -7
- package/dist/layout/Container/container.js.map +1 -1
- package/dist/layout/Container/container.module.scss.js +1 -1
- package/dist/layout/Grid/grid.css +28 -0
- package/dist/layout/Grid/grid.d.ts.map +1 -1
- package/dist/layout/Grid/grid.js +40 -4
- package/dist/layout/Grid/grid.js.map +1 -1
- package/dist/layout/Grid/grid.module.scss.js +1 -1
- package/dist/layout/Row/row.css +42 -0
- package/dist/layout/Row/row.d.ts.map +1 -1
- package/dist/layout/Row/row.js +5 -3
- package/dist/layout/Row/row.js.map +1 -1
- package/dist/layout/Row/row.module.scss.js +1 -1
- package/dist/layout/Sidebar/sidebar.css +4 -2
- package/dist/layout/Sidebar/sidebar.d.ts.map +1 -1
- package/dist/layout/Sidebar/sidebar.js +1 -1
- package/dist/layout/Sidebar/sidebar.js.map +1 -1
- package/dist/layout/index.d.ts +2 -0
- package/dist/layout/index.d.ts.map +1 -1
- package/dist/layout.d.ts +3 -3
- package/dist/layout.js +2 -0
- package/dist/layout.js.map +1 -1
- package/dist/navigation/DropdownMenu/dropdown-menu.d.ts.map +1 -1
- package/dist/navigation/DropdownMenu/dropdown-menu.js +1 -1
- package/dist/navigation/DropdownMenu/dropdown-menu.js.map +1 -1
- package/dist/navigation/NavUser/nav-user.js +2 -2
- package/dist/navigation/Sheet/sheet.css +40 -6
- package/dist/navigation/Sheet/sheet.d.ts +22 -0
- package/dist/navigation/Sheet/sheet.d.ts.map +1 -1
- package/dist/navigation/Sheet/sheet.js +5 -30
- package/dist/navigation/Sheet/sheet.js.map +1 -1
- package/dist/navigation/Sheet/sheet.module.scss.js +1 -1
- package/dist/navigation.d.ts +22 -0
- package/dist/row-CuhTBQhK.d.ts +21 -0
- package/dist/settings/AppearanceDropdown/appearance-dropdown.js +1 -1
- package/dist/settings/AppearanceTabs/appearance-tabs.js +2 -27
- package/dist/settings/AppearanceTabs/appearance-tabs.js.map +1 -1
- package/dist/tokens.css +59 -17
- package/dist/tooltip-1qYeAGE9.d.ts +45 -0
- package/dist/tooltip-3IOkYFQ-.d.ts +45 -0
- package/dist/tooltip-540OmbEG.d.ts +46 -0
- package/dist/tooltip-91Nq_Hl8.d.ts +46 -0
- package/dist/tooltip-B56sWYK0.d.ts +46 -0
- package/dist/tooltip-BIrIF-4z.d.ts +45 -0
- package/dist/tooltip-BOipKW5l.d.ts +46 -0
- package/dist/tooltip-BPC0RH8i.d.ts +46 -0
- package/dist/tooltip-BST1BOCn.d.ts +45 -0
- package/dist/tooltip-BhuxNQwX.d.ts +45 -0
- package/dist/tooltip-BpAJwi3K.d.ts +46 -0
- package/dist/tooltip-C0LBu2Iu.d.ts +45 -0
- package/dist/tooltip-C1ZwALiG.d.ts +45 -0
- package/dist/tooltip-C55-HA0w.d.ts +45 -0
- package/dist/tooltip-CHn6WuDv.d.ts +46 -0
- package/dist/tooltip-CNjH7zKO.d.ts +45 -0
- package/dist/tooltip-CSBby1OT.d.ts +45 -0
- package/dist/tooltip-CXFRzR0L.d.ts +45 -0
- package/dist/tooltip-ChpsbkOU.d.ts +46 -0
- package/dist/tooltip-CspTy2ZW.d.ts +46 -0
- package/dist/tooltip-CvComAZD.d.ts +46 -0
- package/dist/tooltip-D19vhhRn.d.ts +45 -0
- package/dist/tooltip-D32S1g-7.d.ts +46 -0
- package/dist/tooltip-DAvBN683.d.ts +45 -0
- package/dist/tooltip-DQz4_i4m.d.ts +45 -0
- package/dist/tooltip-DVYPUAb1.d.ts +46 -0
- package/dist/tooltip-DXoSckt9.d.ts +46 -0
- package/dist/tooltip-Dtoq3bn_.d.ts +46 -0
- package/dist/tooltip-DxO_DWMO.d.ts +46 -0
- package/dist/tooltip-DxdGb3dX.d.ts +45 -0
- package/dist/tooltip-DzAzC0d7.d.ts +45 -0
- package/dist/tooltip-Lk4RpuSh.d.ts +45 -0
- package/dist/tooltip-ReFyHDhU.d.ts +45 -0
- package/dist/tooltip-_wdlSYAb.d.ts +46 -0
- package/dist/{tooltip-XagXjWLB.d.ts → tooltip-cjwkBINy.d.ts} +4 -0
- package/dist/tooltip-nKcM19C9.d.ts +45 -0
- package/dist/types/layout/container.d.ts +30 -1
- package/dist/types/layout/container.d.ts.map +1 -1
- package/dist/types/layout/grid.d.ts +42 -0
- package/dist/types/layout/grid.d.ts.map +1 -1
- package/dist/types/layout/row.d.ts +7 -0
- package/dist/types/layout/row.d.ts.map +1 -1
- package/dist/typography/Typography/typography-variants.d.ts +3 -0
- package/dist/typography/Typography/typography-variants.d.ts.map +1 -1
- package/dist/typography/Typography/typography-variants.js +25 -0
- package/dist/typography/Typography/typography-variants.js.map +1 -1
- package/dist/typography/Typography/typography.css +105 -41
- package/dist/typography/Typography/typography.d.ts +20 -0
- package/dist/typography/Typography/typography.d.ts.map +1 -1
- package/dist/typography/Typography/typography.js +11 -2
- package/dist/typography/Typography/typography.js.map +1 -1
- package/dist/typography/Typography/typography.module.scss.js +1 -1
- package/dist/typography-CTGVc_Gg.d.ts +41 -0
- package/dist/typography.d.ts +2 -2
- package/dist/ui/Alert/alert-provider.d.ts.map +1 -1
- package/dist/ui/Alert/alert-provider.js +1 -1
- package/dist/ui/Alert/alert-provider.js.map +1 -1
- package/dist/ui/Button/button-variants.d.ts +1 -0
- package/dist/ui/Button/button-variants.d.ts.map +1 -1
- package/dist/ui/Button/button-variants.js +3 -0
- package/dist/ui/Button/button-variants.js.map +1 -1
- package/dist/ui/Button/button.css +146 -77
- package/dist/ui/Button/button.d.ts +4 -0
- package/dist/ui/Button/button.d.ts.map +1 -1
- package/dist/ui/Button/button.js +8 -2
- package/dist/ui/Button/button.js.map +1 -1
- package/dist/ui/Button/button.module.scss.js +1 -1
- package/dist/ui/Chip/chip.css +32 -11
- package/dist/ui/Chip/chip.d.ts +16 -0
- package/dist/ui/Chip/chip.d.ts.map +1 -1
- package/dist/ui/Chip/chip.js +4 -2
- package/dist/ui/Chip/chip.js.map +1 -1
- package/dist/ui/CodeBlock/code-block.css +8 -3
- package/dist/ui/Dialog/dialog.css +70 -0
- package/dist/ui/Dialog/dialog.d.ts +45 -2
- package/dist/ui/Dialog/dialog.d.ts.map +1 -1
- package/dist/ui/Dialog/dialog.js +256 -7
- package/dist/ui/Dialog/dialog.js.map +1 -1
- package/dist/ui/Dialog/dialog.module.scss.js +1 -1
- package/dist/ui/Icon/icon.css +14 -7
- package/dist/ui/ProgressBar/progress-bar.css +10 -3
- package/dist/ui/StatCard/stat-card.css +13 -0
- package/dist/ui/StatCard/stat-card.d.ts +9 -0
- package/dist/ui/StatCard/stat-card.d.ts.map +1 -1
- package/dist/ui/StatCard/stat-card.js +2 -2
- package/dist/ui/StatCard/stat-card.js.map +1 -1
- package/dist/ui/StatusDot/status-dot.css +4 -1
- package/dist/ui/StepProgress/step-progress.css +12 -4
- package/dist/ui/Switch/switch.css +6 -2
- package/dist/ui/Tooltip/tooltip.d.ts.map +1 -1
- package/dist/ui/Tooltip/tooltip.js +1 -1
- package/dist/ui/Tooltip/tooltip.js.map +1 -1
- package/dist/ui.d.ts +3 -3
- package/dist/user/UserInfo/user-info.js +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/portal.d.ts +34 -0
- package/dist/utils/portal.d.ts.map +1 -0
- package/dist/utils/portal.js +40 -0
- package/dist/utils/portal.js.map +1 -0
- package/dist/utils.d.ts +35 -1
- package/dist/utils.js +1 -0
- package/dist/utils.js.map +1 -1
- package/package.json +3 -2
- package/src/styles/_mixins.scss +30 -0
- package/vite-plugin.mjs +7 -2
package/README.md
CHANGED
|
@@ -154,6 +154,42 @@ Each component is a folder: `component-name.tsx` + `component-name.module.scss`
|
|
|
154
154
|
|
|
155
155
|
---
|
|
156
156
|
|
|
157
|
+
## Developing it against a real app
|
|
158
|
+
|
|
159
|
+
Publishing a version for every small change is how versioning goes off the rails. Instead, point a consuming app at a sibling checkout:
|
|
160
|
+
|
|
161
|
+
```
|
|
162
|
+
projects/
|
|
163
|
+
kismet-constellation/ ← this repo
|
|
164
|
+
your-app/
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
In the app's `vite.config.js`:
|
|
168
|
+
|
|
169
|
+
```js
|
|
170
|
+
import constellationLocal from '@kismet-ux/constellation/vite';
|
|
171
|
+
|
|
172
|
+
export default defineConfig({
|
|
173
|
+
plugins: [constellationLocal({ root: '../kismet-constellation' }), react()],
|
|
174
|
+
});
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
…and in its `.env.local`:
|
|
178
|
+
|
|
179
|
+
```
|
|
180
|
+
CONSTELLATION_LOCAL=true
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
The plugin builds resolve aliases from this package's own `exports` map, so there is no alias list to maintain. It aliases to `dist`, so keep a build running:
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
npx rollup -c --watch
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
`__CONSTELLATION_LOCAL__` is defined as `true` while it is on, which is what `DevIndicator` reads to show its badge. With the variable unset the plugin is inert and the app uses the published package, so nothing depends on the checkout existing.
|
|
190
|
+
|
|
191
|
+
⚠️ **The plugin appends to `server.fs.allow`, and must.** Setting that option at all replaces Vite's default, so listing only the library root locks the consuming app out of its own source — every module 403s and the page renders blank with no useful error.
|
|
192
|
+
|
|
157
193
|
## Commands
|
|
158
194
|
|
|
159
195
|
```bash
|
package/dist/brand/Logo/logo.css
CHANGED
|
@@ -62,7 +62,10 @@ div[data-state='collapsed'] .logo-module_wordmark___KAG5 {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
@media (prefers-reduced-motion: reduce) {
|
|
65
|
-
.logo-module_wordmark___KAG5 {
|
|
65
|
+
:root:not([data-motion=full]) .logo-module_wordmark___KAG5 {
|
|
66
66
|
transition: none;
|
|
67
67
|
}
|
|
68
|
+
}
|
|
69
|
+
:root[data-motion=reduced] .logo-module_wordmark___KAG5 {
|
|
70
|
+
transition: none;
|
|
68
71
|
}
|
|
@@ -1,73 +1,76 @@
|
|
|
1
|
-
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
.checkbox-module_checkbox__8YN87 {
|
|
3
|
+
/*
|
|
4
|
+
* The fallback set, for a box wearing no theme class at all.
|
|
5
|
+
*
|
|
6
|
+
* ⚠️ The themes below MUST stay nested inside this rule. They were top-level
|
|
7
|
+
* per-theme blocks declared BEFORE this one, which put them at the same
|
|
8
|
+
* specificity (0,1,0) and let source order decide — so this declaration
|
|
9
|
+
* overrode every one of them and the box came out primary whatever it was
|
|
10
|
+
* asked for. Both classes land on the same element, so nesting resolves to
|
|
11
|
+
* `.checkbox.theme-success` (0,2,0) and wins on merit rather than on order.
|
|
12
|
+
* `Chip` scopes its themes the same way, for the same reason.
|
|
13
|
+
*/
|
|
14
|
+
--checkbox-theme-main: var(--primary-main);
|
|
15
|
+
--checkbox-theme-contrast: var(--primary-contrast);
|
|
16
|
+
--checkbox-theme-emphasis: var(--primary-emphasis);
|
|
17
|
+
--checkbox-theme-focus-visible: var(--primary-focus-visible);
|
|
18
|
+
/*
|
|
19
|
+
* `inherit` takes its colour from a themed ancestor rather than the scale.
|
|
20
|
+
* `emphasis` deliberately falls back to `main`: the inherit context exposes
|
|
21
|
+
* no emphasis role, and an undefined var would leave the focus ring
|
|
22
|
+
* transparent.
|
|
23
|
+
*/
|
|
24
|
+
}
|
|
25
|
+
.checkbox-module_checkbox__8YN87.checkbox-module_theme-inherit__9-o7A {
|
|
2
26
|
--checkbox-theme-main: var(--inherit-main);
|
|
3
27
|
--checkbox-theme-contrast: var(--inherit-contrast);
|
|
4
28
|
--checkbox-theme-emphasis: var(--inherit-main);
|
|
5
29
|
--checkbox-theme-focus-visible: var(--inherit-focus-visible);
|
|
6
|
-
--checkbox-theme-outlined-border: var(--inherit-outlined-border);
|
|
7
30
|
}
|
|
8
|
-
|
|
9
|
-
.checkbox-module_theme-primary__zyuNX {
|
|
31
|
+
.checkbox-module_checkbox__8YN87.checkbox-module_theme-primary__zyuNX {
|
|
10
32
|
--checkbox-theme-main: var(--primary-main);
|
|
11
33
|
--checkbox-theme-contrast: var(--primary-contrast);
|
|
12
34
|
--checkbox-theme-emphasis: var(--primary-emphasis);
|
|
13
35
|
--checkbox-theme-focus-visible: var(--primary-focus-visible);
|
|
14
|
-
--checkbox-theme-outlined-border: var(--primary-outlined-border);
|
|
15
36
|
}
|
|
16
|
-
|
|
17
|
-
.checkbox-module_theme-secondary__JUYKr {
|
|
37
|
+
.checkbox-module_checkbox__8YN87.checkbox-module_theme-secondary__JUYKr {
|
|
18
38
|
--checkbox-theme-main: var(--secondary-main);
|
|
19
39
|
--checkbox-theme-contrast: var(--secondary-contrast);
|
|
20
40
|
--checkbox-theme-emphasis: var(--secondary-emphasis);
|
|
21
41
|
--checkbox-theme-focus-visible: var(--secondary-focus-visible);
|
|
22
|
-
--checkbox-theme-outlined-border: var(--secondary-outlined-border);
|
|
23
42
|
}
|
|
24
|
-
|
|
25
|
-
.checkbox-module_theme-destructive__M8AgU {
|
|
43
|
+
.checkbox-module_checkbox__8YN87.checkbox-module_theme-destructive__M8AgU {
|
|
26
44
|
--checkbox-theme-main: var(--destructive-main);
|
|
27
45
|
--checkbox-theme-contrast: var(--destructive-contrast);
|
|
28
46
|
--checkbox-theme-emphasis: var(--destructive-emphasis);
|
|
29
47
|
--checkbox-theme-focus-visible: var(--destructive-focus-visible);
|
|
30
|
-
--checkbox-theme-outlined-border: var(--destructive-outlined-border);
|
|
31
48
|
}
|
|
32
|
-
|
|
33
|
-
.checkbox-module_theme-warning__AKuuE {
|
|
49
|
+
.checkbox-module_checkbox__8YN87.checkbox-module_theme-warning__AKuuE {
|
|
34
50
|
--checkbox-theme-main: var(--warning-main);
|
|
35
51
|
--checkbox-theme-contrast: var(--warning-contrast);
|
|
36
52
|
--checkbox-theme-emphasis: var(--warning-emphasis);
|
|
37
53
|
--checkbox-theme-focus-visible: var(--warning-focus-visible);
|
|
38
|
-
--checkbox-theme-outlined-border: var(--warning-outlined-border);
|
|
39
54
|
}
|
|
40
|
-
|
|
41
|
-
.checkbox-module_theme-success__Mp45s {
|
|
55
|
+
.checkbox-module_checkbox__8YN87.checkbox-module_theme-success__Mp45s {
|
|
42
56
|
--checkbox-theme-main: var(--success-main);
|
|
43
57
|
--checkbox-theme-contrast: var(--success-contrast);
|
|
44
58
|
--checkbox-theme-emphasis: var(--success-emphasis);
|
|
45
59
|
--checkbox-theme-focus-visible: var(--success-focus-visible);
|
|
46
|
-
--checkbox-theme-outlined-border: var(--success-outlined-border);
|
|
47
60
|
}
|
|
48
|
-
|
|
49
|
-
.checkbox-module_theme-info__Gdbcb {
|
|
61
|
+
.checkbox-module_checkbox__8YN87.checkbox-module_theme-info__Gdbcb {
|
|
50
62
|
--checkbox-theme-main: var(--info-main);
|
|
51
63
|
--checkbox-theme-contrast: var(--info-contrast);
|
|
52
64
|
--checkbox-theme-emphasis: var(--info-emphasis);
|
|
53
65
|
--checkbox-theme-focus-visible: var(--info-focus-visible);
|
|
54
|
-
--checkbox-theme-outlined-border: var(--info-outlined-border);
|
|
55
66
|
}
|
|
56
|
-
|
|
57
|
-
.checkbox-module_theme-slate__eMHDz {
|
|
67
|
+
.checkbox-module_checkbox__8YN87.checkbox-module_theme-slate__eMHDz {
|
|
58
68
|
--checkbox-theme-main: var(--slate-main);
|
|
59
69
|
--checkbox-theme-contrast: var(--slate-contrast);
|
|
60
70
|
--checkbox-theme-emphasis: var(--slate-emphasis);
|
|
61
71
|
--checkbox-theme-focus-visible: var(--slate-focus-visible);
|
|
62
|
-
--checkbox-theme-outlined-border: var(--slate-outlined-border);
|
|
63
72
|
}
|
|
64
|
-
|
|
65
73
|
.checkbox-module_checkbox__8YN87 {
|
|
66
|
-
--checkbox-theme-main: var(--primary-main);
|
|
67
|
-
--checkbox-theme-contrast: var(--primary-contrast);
|
|
68
|
-
--checkbox-theme-emphasis: var(--primary-emphasis);
|
|
69
|
-
--checkbox-theme-focus-visible: var(--primary-focus-visible);
|
|
70
|
-
--checkbox-theme-outlined-border: var(--primary-outlined-border);
|
|
71
74
|
align-items: center;
|
|
72
75
|
background-color: var(--background-elevation-2);
|
|
73
76
|
border: 1px solid var(--input-outlined-enabled-border);
|
|
@@ -76,10 +79,21 @@
|
|
|
76
79
|
color: var(--text-primary);
|
|
77
80
|
display: inline-flex;
|
|
78
81
|
flex-shrink: 0;
|
|
79
|
-
|
|
82
|
+
/*
|
|
83
|
+
* `--checkbox-size` so the box, its tick and the helper-text indent all
|
|
84
|
+
* follow one number. A dense list row wants a smaller target than a form
|
|
85
|
+
* does, and hard-coding three lengths is how they drift apart.
|
|
86
|
+
*/
|
|
87
|
+
height: var(--checkbox-size, 1.125rem);
|
|
80
88
|
justify-content: center;
|
|
81
89
|
outline: none;
|
|
82
|
-
width: 1.125rem;
|
|
90
|
+
width: var(--checkbox-size, 1.125rem);
|
|
91
|
+
}
|
|
92
|
+
.checkbox-module_checkbox__8YN87.checkbox-module_size-sm__54gTY {
|
|
93
|
+
--checkbox-size: 0.9375rem;
|
|
94
|
+
}
|
|
95
|
+
.checkbox-module_checkbox__8YN87.checkbox-module_size-lg__6BGUr {
|
|
96
|
+
--checkbox-size: 1.25rem;
|
|
83
97
|
}
|
|
84
98
|
.checkbox-module_checkbox__8YN87[data-state=checked] {
|
|
85
99
|
background-color: var(--checkbox-theme-main);
|
|
@@ -106,8 +120,8 @@
|
|
|
106
120
|
justify-content: center;
|
|
107
121
|
}
|
|
108
122
|
.checkbox-module_checkbox__8YN87 .checkbox-module_icon__azmqw {
|
|
109
|
-
height:
|
|
110
|
-
width:
|
|
123
|
+
height: calc(var(--checkbox-size, 1.125rem) - 0.125rem);
|
|
124
|
+
width: calc(var(--checkbox-size, 1.125rem) - 0.125rem);
|
|
111
125
|
}
|
|
112
126
|
|
|
113
127
|
.checkbox-module_label__rVKGq {
|
|
@@ -120,5 +134,5 @@
|
|
|
120
134
|
}
|
|
121
135
|
|
|
122
136
|
.checkbox-module_helper-text__d0ZOs {
|
|
123
|
-
margin-left: calc(1.125rem + var(--size-1));
|
|
137
|
+
margin-left: calc(var(--checkbox-size, 1.125rem) + var(--size-1));
|
|
124
138
|
}
|
|
@@ -14,6 +14,11 @@ export interface CheckboxProps extends Omit<React.ButtonHTMLAttributes<HTMLButto
|
|
|
14
14
|
label?: React.ReactNode;
|
|
15
15
|
/** Optional helper / validation text rendered beneath the checkbox + label row. */
|
|
16
16
|
helperText?: React.ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Box size. `md` (default) is the form size; `sm` suits a dense list row and
|
|
19
|
+
* `lg` a primary confirm. The tick and the helper-text indent follow it.
|
|
20
|
+
*/
|
|
21
|
+
size?: 'sm' | 'md' | 'lg';
|
|
17
22
|
}
|
|
18
23
|
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLButtonElement>>;
|
|
19
24
|
export { Checkbox };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../src/form/Checkbox/checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAItD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,KAAK,YAAY,GAAG,OAAO,GAAG,eAAe,CAAC;AAE9C,MAAM,WAAW,aAAc,SAAQ,IAAI,CACzC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAC7C,UAAU,GAAG,OAAO,GAAG,cAAc,GAAG,gBAAgB,CACzD;IACC,KAAK,CAAC,EAAE,SAAS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,SAAS,CAAC;IAC7B;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3B;AAED,QAAA,MAAM,QAAQ,yFAyIb,CAAC;AAGF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -1,63 +1,14 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { Label } from '../Label/label.js';
|
|
3
|
+
import { Typography } from '../../typography/Typography/typography.js';
|
|
3
4
|
import cn from 'clsx';
|
|
4
|
-
import '../Input/input.js';
|
|
5
|
-
import '../../layout/Sidebar/sidebar-context.js';
|
|
6
|
-
import * as React from 'react';
|
|
7
|
-
import '../../ui/Alert/alert-context.js';
|
|
8
|
-
import '../../ui/Table/table-sort-context.js';
|
|
9
|
-
import '../../layout/Skeleton/skeleton.css';
|
|
10
|
-
import '../../navigation/Sheet/sheet.js';
|
|
11
|
-
import '../../ui/Button/button.js';
|
|
12
|
-
import '../../ui/Tooltip/tooltip.js';
|
|
13
5
|
import { CheckIcon } from 'lucide-react';
|
|
14
|
-
import '
|
|
15
|
-
import '../../layout/Sidebar/sidebar-variants.js';
|
|
16
|
-
import '../../layout/Sidebar/sidebar.css';
|
|
17
|
-
import '../../layout/AppContent/app-content.css';
|
|
18
|
-
import { Row } from '../../layout/Row/row.js';
|
|
19
|
-
import '../../navigation/Link/link.js';
|
|
20
|
-
import { Typography } from '../../typography/Typography/typography.js';
|
|
21
|
-
import '../../layout/AppFooter/app-footer.css';
|
|
22
|
-
import '../../navigation/Router/router-context.js';
|
|
23
|
-
import '../../ui/Separator/separator.js';
|
|
24
|
-
import 'react-dom';
|
|
25
|
-
import '../../typography/TruncatedText/truncated-text.js';
|
|
26
|
-
import '../../navigation/Breadcrumbs/breadcrumbs.css';
|
|
27
|
-
import '../../navigation/DropdownMenu/dropdown-menu.js';
|
|
28
|
-
import '../../ui/Avatar/avatar.js';
|
|
29
|
-
import '../../user/UserInfo/user-info.css';
|
|
30
|
-
import '../../navigation/NavUser/nav-user.css';
|
|
31
|
-
import '../../ui/Alert/alert.js';
|
|
32
|
-
import '../../ui/Alert/alert.css';
|
|
33
|
-
import '../../ui/Chip/chip.js';
|
|
34
|
-
import '../../ui/CodeBlock/code-block.js';
|
|
35
|
-
import '../../ui/DevIndicator/dev-indicator.css';
|
|
36
|
-
import '../../ui/Dialog/dialog.js';
|
|
37
|
-
import '../../ui/EmptyState/empty-state.js';
|
|
38
|
-
import '../../ui/Icon/icon.js';
|
|
39
|
-
import '../../ui/List/list.js';
|
|
40
|
-
import '../../ui/Pagination/pagination.js';
|
|
41
|
-
import '../../ui/ProgressBar/progress-bar.js';
|
|
42
|
-
import '../../ui/StatCard/stat-card.js';
|
|
43
|
-
import '../../ui/StatusDot/status-dot.js';
|
|
44
|
-
import '../../ui/StatusDot/status-dot-variants.js';
|
|
45
|
-
import '../../ui/StepProgress/step-progress.js';
|
|
46
|
-
import '../../ui/Switch/switch.js';
|
|
47
|
-
import '../../ui/Table/table.js';
|
|
48
|
-
import '../../ui/TableActionCell/table-action-cell.js';
|
|
49
|
-
import '../../ui/TableToolbar/table-toolbar.js';
|
|
50
|
-
import '../../ui/Toggle/toggle.js';
|
|
51
|
-
import '../../ui/ToggleGroup/toggle-group.js';
|
|
52
|
-
import '../../settings/AppearanceTabs/appearance-tabs.css';
|
|
53
|
-
import '../../layout/AppSidebarHeader/app-sidebar-header.css';
|
|
54
|
-
import '../../layout/Collapse/collapse.js';
|
|
55
|
-
import { Column } from '../../layout/Column/column.js';
|
|
56
|
-
import '../../layout/Container/container.js';
|
|
57
|
-
import '../../layout/Grid/grid.js';
|
|
6
|
+
import * as React from 'react';
|
|
58
7
|
import s from './checkbox.module.scss.js';
|
|
8
|
+
import { Column } from '../../layout/Column/column.js';
|
|
9
|
+
import { Row } from '../../layout/Row/row.js';
|
|
59
10
|
|
|
60
|
-
const Checkbox = React.forwardRef(({ className, id, theme = 'primary', destructive = false, checked: controlledChecked, defaultChecked = false, onCheckedChange, disabled, value = 'on', name, required, label, helperText, ['aria-invalid']: ariaInvalid, ['aria-describedby']: ariaDescribedBy, onClick, onKeyDown, ...props }, ref) => {
|
|
11
|
+
const Checkbox = React.forwardRef(({ className, id, theme = 'primary', destructive = false, size = 'md', checked: controlledChecked, defaultChecked = false, onCheckedChange, disabled, value = 'on', name, required, label, helperText, ['aria-invalid']: ariaInvalid, ['aria-describedby']: ariaDescribedBy, onClick, onKeyDown, ...props }, ref) => {
|
|
61
12
|
const isControlled = controlledChecked !== undefined;
|
|
62
13
|
const [internalChecked, setInternalChecked] = React.useState(defaultChecked);
|
|
63
14
|
const checked = isControlled ? controlledChecked : internalChecked;
|
|
@@ -90,7 +41,7 @@ const Checkbox = React.forwardRef(({ className, id, theme = 'primary', destructi
|
|
|
90
41
|
toggle();
|
|
91
42
|
}
|
|
92
43
|
};
|
|
93
|
-
const button = (jsx("button", { ref: ref, id: checkboxId, type: 'button', role: 'checkbox', "aria-checked": checked === 'indeterminate' ? 'mixed' : checked, "aria-invalid": destructive ? 'true' : ariaInvalid, "aria-required": required, "aria-describedby": describedBy, "data-slot": 'checkbox', "data-state": dataState, disabled: disabled, className: cn(s.checkbox, s[`theme-${theme}`], className), ...props, onClick: handleClick, onKeyDown: handleKeyDown, children: checked ? (jsx("span", { "data-slot": 'checkbox-indicator', className: s.indicator, children: jsx(CheckIcon, { className: s.icon }) })) : null }));
|
|
44
|
+
const button = (jsx("button", { ref: ref, id: checkboxId, type: 'button', role: 'checkbox', "aria-checked": checked === 'indeterminate' ? 'mixed' : checked, "aria-invalid": destructive ? 'true' : ariaInvalid, "aria-required": required, "aria-describedby": describedBy, "data-slot": 'checkbox', "data-state": dataState, disabled: disabled, className: cn(s.checkbox, s[`theme-${theme}`], size !== 'md' && s[`size-${size}`], className), ...props, onClick: handleClick, onKeyDown: handleKeyDown, children: checked ? (jsx("span", { "data-slot": 'checkbox-indicator', className: s.indicator, children: jsx(CheckIcon, { className: s.icon }) })) : null }));
|
|
94
45
|
// Match native <input type='checkbox'> form-submission semantics: an
|
|
95
46
|
// unchecked (or indeterminate) box is omitted entirely from the submission,
|
|
96
47
|
// not present-but-empty. Only emit the hidden input when actually checked.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.js","sources":["../../../src/form/Checkbox/checkbox.tsx"],"sourcesContent":["import { Label } from '@constellation/form/Label';\nimport { Column, Row } from '@constellation/layout';\nimport { type FormTheme } from '@constellation/types';\nimport { Typography } from '@constellation/typography/Typography';\nimport cn from 'clsx';\nimport { CheckIcon } from 'lucide-react';\nimport * as React from 'react';\nimport s from './checkbox.module.scss';\n\ntype CheckedState = boolean | 'indeterminate';\n\nexport interface CheckboxProps extends Omit<\n React.ButtonHTMLAttributes<HTMLButtonElement>,\n 'onChange' | 'value' | 'defaultValue' | 'defaultChecked'\n> {\n theme?: FormTheme;\n destructive?: boolean;\n checked?: CheckedState;\n defaultChecked?: CheckedState;\n onCheckedChange?: (checked: CheckedState) => void;\n value?: string;\n name?: string;\n required?: boolean;\n /** Optional inline label rendered to the right of the checkbox and associated via htmlFor. */\n label?: React.ReactNode;\n /** Optional helper / validation text rendered beneath the checkbox + label row. */\n helperText?: React.ReactNode;\n}\n\nconst Checkbox = React.forwardRef<HTMLButtonElement, CheckboxProps>(\n (\n {\n className,\n id,\n theme = 'primary',\n destructive = false,\n checked: controlledChecked,\n defaultChecked = false,\n onCheckedChange,\n disabled,\n value = 'on',\n name,\n required,\n label,\n helperText,\n ['aria-invalid']: ariaInvalid,\n ['aria-describedby']: ariaDescribedBy,\n onClick,\n onKeyDown,\n ...props\n },\n ref,\n ) => {\n const isControlled = controlledChecked !== undefined;\n const [internalChecked, setInternalChecked] = React.useState<CheckedState>(defaultChecked);\n const checked = isControlled ? controlledChecked : internalChecked;\n\n const generatedId = React.useId();\n const checkboxId = id ?? generatedId;\n const helperId = helperText ? `${checkboxId}-helper` : undefined;\n const describedBy = [ariaDescribedBy, helperId].filter(Boolean).join(' ') || undefined;\n\n const dataState =\n checked === 'indeterminate' ? 'indeterminate' : checked ? 'checked' : 'unchecked';\n\n const toggle = () => {\n if (disabled) return;\n const next = checked === 'indeterminate' ? true : !checked;\n if (!isControlled) {\n setInternalChecked(next);\n }\n onCheckedChange?.(next);\n };\n\n const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(e);\n if (e.defaultPrevented) return;\n toggle();\n };\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLButtonElement>) => {\n onKeyDown?.(e);\n if (e.defaultPrevented) return;\n if (e.key === ' ') {\n e.preventDefault();\n toggle();\n }\n };\n\n const button = (\n <button\n ref={ref}\n id={checkboxId}\n type={'button'}\n role={'checkbox'}\n aria-checked={checked === 'indeterminate' ? 'mixed' : checked}\n aria-invalid={destructive ? 'true' : ariaInvalid}\n aria-required={required}\n aria-describedby={describedBy}\n data-slot={'checkbox'}\n data-state={dataState}\n disabled={disabled}\n className={cn(s.checkbox
|
|
1
|
+
{"version":3,"file":"checkbox.js","sources":["../../../src/form/Checkbox/checkbox.tsx"],"sourcesContent":["import { Label } from '@constellation/form/Label';\nimport { Column, Row } from '@constellation/layout';\nimport { type FormTheme } from '@constellation/types';\nimport { Typography } from '@constellation/typography/Typography';\nimport cn from 'clsx';\nimport { CheckIcon } from 'lucide-react';\nimport * as React from 'react';\nimport s from './checkbox.module.scss';\n\ntype CheckedState = boolean | 'indeterminate';\n\nexport interface CheckboxProps extends Omit<\n React.ButtonHTMLAttributes<HTMLButtonElement>,\n 'onChange' | 'value' | 'defaultValue' | 'defaultChecked'\n> {\n theme?: FormTheme;\n destructive?: boolean;\n checked?: CheckedState;\n defaultChecked?: CheckedState;\n onCheckedChange?: (checked: CheckedState) => void;\n value?: string;\n name?: string;\n required?: boolean;\n /** Optional inline label rendered to the right of the checkbox and associated via htmlFor. */\n label?: React.ReactNode;\n /** Optional helper / validation text rendered beneath the checkbox + label row. */\n helperText?: React.ReactNode;\n /**\n * Box size. `md` (default) is the form size; `sm` suits a dense list row and\n * `lg` a primary confirm. The tick and the helper-text indent follow it.\n */\n size?: 'sm' | 'md' | 'lg';\n}\n\nconst Checkbox = React.forwardRef<HTMLButtonElement, CheckboxProps>(\n (\n {\n className,\n id,\n theme = 'primary',\n destructive = false,\n size = 'md',\n checked: controlledChecked,\n defaultChecked = false,\n onCheckedChange,\n disabled,\n value = 'on',\n name,\n required,\n label,\n helperText,\n ['aria-invalid']: ariaInvalid,\n ['aria-describedby']: ariaDescribedBy,\n onClick,\n onKeyDown,\n ...props\n },\n ref,\n ) => {\n const isControlled = controlledChecked !== undefined;\n const [internalChecked, setInternalChecked] = React.useState<CheckedState>(defaultChecked);\n const checked = isControlled ? controlledChecked : internalChecked;\n\n const generatedId = React.useId();\n const checkboxId = id ?? generatedId;\n const helperId = helperText ? `${checkboxId}-helper` : undefined;\n const describedBy = [ariaDescribedBy, helperId].filter(Boolean).join(' ') || undefined;\n\n const dataState =\n checked === 'indeterminate' ? 'indeterminate' : checked ? 'checked' : 'unchecked';\n\n const toggle = () => {\n if (disabled) return;\n const next = checked === 'indeterminate' ? true : !checked;\n if (!isControlled) {\n setInternalChecked(next);\n }\n onCheckedChange?.(next);\n };\n\n const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(e);\n if (e.defaultPrevented) return;\n toggle();\n };\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLButtonElement>) => {\n onKeyDown?.(e);\n if (e.defaultPrevented) return;\n if (e.key === ' ') {\n e.preventDefault();\n toggle();\n }\n };\n\n const button = (\n <button\n ref={ref}\n id={checkboxId}\n type={'button'}\n role={'checkbox'}\n aria-checked={checked === 'indeterminate' ? 'mixed' : checked}\n aria-invalid={destructive ? 'true' : ariaInvalid}\n aria-required={required}\n aria-describedby={describedBy}\n data-slot={'checkbox'}\n data-state={dataState}\n disabled={disabled}\n className={cn(\n s.checkbox,\n s[`theme-${theme}`],\n size !== 'md' && s[`size-${size}`],\n className,\n )}\n {...props}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n >\n {checked ? (\n <span data-slot={'checkbox-indicator'} className={s.indicator}>\n <CheckIcon className={s.icon} />\n </span>\n ) : null}\n </button>\n );\n\n // Match native <input type='checkbox'> form-submission semantics: an\n // unchecked (or indeterminate) box is omitted entirely from the submission,\n // not present-but-empty. Only emit the hidden input when actually checked.\n const hiddenInput =\n name && checked === true ? <input type={'hidden'} name={name} value={value} /> : null;\n\n if (label === undefined && helperText === undefined) {\n return (\n <>\n {button}\n {hiddenInput}\n </>\n );\n }\n\n return (\n <Column data-slot={'checkbox-field'} gap={1}>\n <Row data-slot={'checkbox-row'} gap={1} align={'center'}>\n {button}\n {label !== undefined ? (\n <Label\n data-slot={'checkbox-label'}\n htmlFor={checkboxId}\n className={cn(s['label'], disabled && s['label--disabled'])}\n theme={destructive ? 'destructive' : 'inherit'}\n >\n {label}\n </Label>\n ) : null}\n </Row>\n {helperText !== undefined ? (\n <Typography\n data-slot={'checkbox-helper-text'}\n id={helperId}\n variant={'caption'}\n theme={destructive ? 'destructive' : 'muted'}\n className={s['helper-text']}\n >\n {helperText}\n </Typography>\n ) : null}\n {hiddenInput}\n </Column>\n );\n },\n);\nCheckbox.displayName = 'Checkbox';\n\nexport { Checkbox };\n"],"names":["_jsx","_jsxs","_Fragment"],"mappings":";;;;;;;;;;AAkCA,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAC/B,CACE,EACE,SAAS,EACT,EAAE,EACF,KAAK,GAAG,SAAS,EACjB,WAAW,GAAG,KAAK,EACnB,IAAI,GAAG,IAAI,EACX,OAAO,EAAE,iBAAiB,EAC1B,cAAc,GAAG,KAAK,EACtB,eAAe,EACf,QAAQ,EACR,KAAK,GAAG,IAAI,EACZ,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,UAAU,EACV,CAAC,cAAc,GAAG,WAAW,EAC7B,CAAC,kBAAkB,GAAG,eAAe,EACrC,OAAO,EACP,SAAS,EACT,GAAG,KAAK,EACT,EACD,G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AA,QACEC,IAAA,CAAAC,QAAA,EAAA,EAAA,QAAA,EAAA,CACG,MAAM,EACN,WAAW,CAAA,EAAA,CACX;IAEP;AAEA,IAAA,QACED,IAAA,CAAC,MAAM,EAAA,EAAA,WAAA,EAAY,gBAAgB,EAAE,GAAG,EAAE,CAAC,EAAA,QAAA,EAAA,CACzCA,IAAA,CAAC,GAAG,EAAA,EAAA,WAAA,EAAY,cAAc,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAA,QAAA,EAAA,CACpD,MAAM,EACN,KAAK,KAAK,SAAS,IAClBD,GAAA,CAAC,KAAK,EAAA,EAAA,WAAA,EACO,gBAAgB,EAC3B,OAAO,EAAE,UAAU,EACnB,SAAS,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,QAAQ,IAAI,CAAC,CAAC,iBAAiB,CAAC,CAAC,EAC3D,KAAK,EAAE,WAAW,GAAG,aAAa,GAAG,SAAS,EAAA,QAAA,EAE7C,KAAK,EAAA,CACA,IACN,IAAI,CAAA,EAAA,CACJ,EACL,UAAU,KAAK,SAAS,IACvBA,GAAA,CAAC,UAAU,EAAA,EAAA,WAAA,EACE,sBAAsB,EACjC,EAAE,EAAE,QAAQ,EACZ,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,WAAW,GAAG,aAAa,GAAG,OAAO,EAC5C,SAAS,EAAE,CAAC,CAAC,aAAa,CAAC,EAAA,QAAA,EAE1B,UAAU,EAAA,CACA,IACX,IAAI,EACP,WAAW,CAAA,EAAA,CACL;AAEb,CAAC;AAEH,QAAQ,CAAC,WAAW,GAAG,UAAU;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './checkbox.css';
|
|
2
2
|
|
|
3
|
-
var s = {"theme-inherit":"checkbox-module_theme-inherit__9-o7A","theme-primary":"checkbox-module_theme-primary__zyuNX","theme-secondary":"checkbox-module_theme-secondary__JUYKr","theme-destructive":"checkbox-module_theme-destructive__M8AgU","theme-warning":"checkbox-module_theme-warning__AKuuE","theme-success":"checkbox-module_theme-success__Mp45s","theme-info":"checkbox-module_theme-info__Gdbcb","theme-slate":"checkbox-module_theme-slate__eMHDz","checkbox":"checkbox-
|
|
3
|
+
var s = {"checkbox":"checkbox-module_checkbox__8YN87","theme-inherit":"checkbox-module_theme-inherit__9-o7A","theme-primary":"checkbox-module_theme-primary__zyuNX","theme-secondary":"checkbox-module_theme-secondary__JUYKr","theme-destructive":"checkbox-module_theme-destructive__M8AgU","theme-warning":"checkbox-module_theme-warning__AKuuE","theme-success":"checkbox-module_theme-success__Mp45s","theme-info":"checkbox-module_theme-info__Gdbcb","theme-slate":"checkbox-module_theme-slate__eMHDz","size-sm":"checkbox-module_size-sm__54gTY","size-lg":"checkbox-module_size-lg__6BGUr","indicator":"checkbox-module_indicator__RVW8h","icon":"checkbox-module_icon__azmqw","label":"checkbox-module_label__rVKGq","label--disabled":"checkbox-module_label--disabled__iHm0R","helper-text":"checkbox-module_helper-text__d0ZOs"};
|
|
4
4
|
|
|
5
5
|
export { s as default };
|
|
6
6
|
//# sourceMappingURL=checkbox.module.scss.js.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
.combobox-module_empty__S_Hgc {
|
|
3
|
+
color: var(--text-secondary);
|
|
4
|
+
font-size: 0.8rem;
|
|
5
|
+
padding: 0.5rem 0.75rem;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
* The typed fragment, picked out inside each suggestion. Weight only — a colour
|
|
10
|
+
* change here fights the row's own hover and selected states.
|
|
11
|
+
*/
|
|
12
|
+
.combobox-module_match__WZJoC {
|
|
13
|
+
font-weight: 700;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.combobox-module_hint__JccTH {
|
|
17
|
+
color: var(--text-secondary);
|
|
18
|
+
font-size: 0.72rem;
|
|
19
|
+
margin-left: auto;
|
|
20
|
+
padding-left: 0.75rem;
|
|
21
|
+
white-space: nowrap;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* The row is a flex line already; this keeps the label from crushing the hint. */
|
|
25
|
+
.combobox-module_label__kNV8N {
|
|
26
|
+
min-width: 0;
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
text-overflow: ellipsis;
|
|
29
|
+
white-space: nowrap;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.combobox-module_active__idRqT {
|
|
33
|
+
background-color: var(--secondary-main);
|
|
34
|
+
color: var(--secondary-contrast);
|
|
35
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { InputBaseProps } from '../Input/input';
|
|
3
|
+
export interface ComboboxOption {
|
|
4
|
+
/** The value written back on selection. */
|
|
5
|
+
value: string;
|
|
6
|
+
/** What the row shows. Falls back to `value`. */
|
|
7
|
+
label?: string;
|
|
8
|
+
/** Trailing muted text — a category, a count, a unit. */
|
|
9
|
+
hint?: string;
|
|
10
|
+
/** Heading this option files under. Ungrouped options render first. */
|
|
11
|
+
group?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ComboboxProps extends InputBaseProps, Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange' | 'list'> {
|
|
14
|
+
options: ComboboxOption[];
|
|
15
|
+
value?: string;
|
|
16
|
+
onValueChange?: (value: string) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Whether a value absent from `options` is allowed. Default true — this
|
|
19
|
+
* replaces a `<datalist>`, whose whole point is that typing a new one is how
|
|
20
|
+
* the vocabulary grows.
|
|
21
|
+
*/
|
|
22
|
+
allowCustom?: boolean;
|
|
23
|
+
/** Shown when the filter matches nothing. */
|
|
24
|
+
emptyText?: string;
|
|
25
|
+
/** Cap on rows rendered at once. */
|
|
26
|
+
maxVisible?: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Free-text field with a suggestion list.
|
|
30
|
+
*
|
|
31
|
+
* This exists because `<datalist>` does not hold up: Chrome only reliably opens
|
|
32
|
+
* it once the user types or presses ArrowDown — a click on the field does
|
|
33
|
+
* nothing, so it reads as broken — and nothing about the popup can be styled,
|
|
34
|
+
* so it arrives as OS chrome hanging off an otherwise themed field.
|
|
35
|
+
*
|
|
36
|
+
* The panel is Select's `Surface` and Select's stylesheet, deliberately: a
|
|
37
|
+
* lookalike built from its own rules drifts the moment either is touched.
|
|
38
|
+
*/
|
|
39
|
+
declare function Combobox({ options, value, onValueChange, allowCustom, emptyText, maxVisible, onKeyDown, onFocus, onBlur, className, ...inputProps }: ComboboxProps): React.JSX.Element;
|
|
40
|
+
export { Combobox };
|
|
41
|
+
//# sourceMappingURL=combobox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../../src/form/Combobox/combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAMrD,MAAM,WAAW,cAAc;IAC7B,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yDAAyD;IACzD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aACf,SACE,cAAc,EAOd,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC;IAClF,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oCAAoC;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAMD;;;;;;;;;;GAUG;AACH,iBAAS,QAAQ,CAAC,EAChB,OAAO,EACP,KAAU,EACV,aAAa,EACb,WAAkB,EAClB,SAAwB,EACxB,UAAe,EACf,SAAS,EACT,OAAO,EACP,MAAM,EACN,SAAS,EACT,GAAG,UAAU,EACd,EAAE,aAAa,qBA0Mf;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import cn from 'clsx';
|
|
4
|
+
import { Input } from '../Input/input.js';
|
|
5
|
+
import { __Surface as Surface } from '../Select/select.js';
|
|
6
|
+
import selectStyles from '../Select/select.module.scss.js';
|
|
7
|
+
import s from './combobox.module.scss.js';
|
|
8
|
+
|
|
9
|
+
function normalize(text) {
|
|
10
|
+
return text.trim().toLowerCase();
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Free-text field with a suggestion list.
|
|
14
|
+
*
|
|
15
|
+
* This exists because `<datalist>` does not hold up: Chrome only reliably opens
|
|
16
|
+
* it once the user types or presses ArrowDown — a click on the field does
|
|
17
|
+
* nothing, so it reads as broken — and nothing about the popup can be styled,
|
|
18
|
+
* so it arrives as OS chrome hanging off an otherwise themed field.
|
|
19
|
+
*
|
|
20
|
+
* The panel is Select's `Surface` and Select's stylesheet, deliberately: a
|
|
21
|
+
* lookalike built from its own rules drifts the moment either is touched.
|
|
22
|
+
*/
|
|
23
|
+
function Combobox({ options, value = '', onValueChange, allowCustom = true, emptyText = 'No matches', maxVisible = 50, onKeyDown, onFocus, onBlur, className, ...inputProps }) {
|
|
24
|
+
const [open, setOpen] = React.useState(false);
|
|
25
|
+
const [active, setActive] = React.useState(0);
|
|
26
|
+
/*
|
|
27
|
+
* Typing filters; opening from a click does not. Without this the list would
|
|
28
|
+
* arrive pre-filtered to the single current value, which is the least useful
|
|
29
|
+
* moment to hide the other 26 options.
|
|
30
|
+
*/
|
|
31
|
+
const [query, setQuery] = React.useState(null);
|
|
32
|
+
const triggerRef = React.useRef(null);
|
|
33
|
+
const contentRef = React.useRef(null);
|
|
34
|
+
const filtered = React.useMemo(() => {
|
|
35
|
+
const q = normalize(query ?? '');
|
|
36
|
+
const matches = q ? options.filter(o => normalize(o.label ?? o.value).includes(q)) : options;
|
|
37
|
+
return matches.slice(0, maxVisible);
|
|
38
|
+
}, [options, query, maxVisible]);
|
|
39
|
+
// A filter that shortens the list must not leave the highlight past its end.
|
|
40
|
+
React.useEffect(() => {
|
|
41
|
+
setActive(i => (i < filtered.length ? i : 0));
|
|
42
|
+
}, [filtered.length]);
|
|
43
|
+
const close = React.useCallback(() => {
|
|
44
|
+
setOpen(false);
|
|
45
|
+
setQuery(null);
|
|
46
|
+
}, []);
|
|
47
|
+
React.useEffect(() => {
|
|
48
|
+
if (!open)
|
|
49
|
+
return undefined;
|
|
50
|
+
const onDocPointerDown = (event) => {
|
|
51
|
+
const target = event.target;
|
|
52
|
+
if (triggerRef.current?.contains(target))
|
|
53
|
+
return;
|
|
54
|
+
if (contentRef.current?.contains(target))
|
|
55
|
+
return;
|
|
56
|
+
close();
|
|
57
|
+
};
|
|
58
|
+
document.addEventListener('pointerdown', onDocPointerDown, true);
|
|
59
|
+
return () => document.removeEventListener('pointerdown', onDocPointerDown, true);
|
|
60
|
+
}, [open, close]);
|
|
61
|
+
const commit = (next) => {
|
|
62
|
+
onValueChange?.(next);
|
|
63
|
+
close();
|
|
64
|
+
};
|
|
65
|
+
const handleKeyDown = (event) => {
|
|
66
|
+
onKeyDown?.(event);
|
|
67
|
+
if (event.defaultPrevented)
|
|
68
|
+
return;
|
|
69
|
+
if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {
|
|
70
|
+
event.preventDefault();
|
|
71
|
+
if (!open) {
|
|
72
|
+
setOpen(true);
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
if (!filtered.length)
|
|
76
|
+
return;
|
|
77
|
+
const step = event.key === 'ArrowDown' ? 1 : -1;
|
|
78
|
+
setActive(i => (i + step + filtered.length) % filtered.length);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
if (event.key === 'Enter') {
|
|
82
|
+
if (open && filtered[active]) {
|
|
83
|
+
event.preventDefault();
|
|
84
|
+
commit(filtered[active].value);
|
|
85
|
+
}
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
if (event.key === 'Escape') {
|
|
89
|
+
if (open) {
|
|
90
|
+
// Only the list closes. Escape inside a Dialog would otherwise dismiss
|
|
91
|
+
// the whole dialog out from under an open dropdown.
|
|
92
|
+
event.stopPropagation();
|
|
93
|
+
close();
|
|
94
|
+
}
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
if (event.key === 'Tab') {
|
|
98
|
+
close();
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
/* Ungrouped rows first, then each group in the order it first appears. */
|
|
102
|
+
const sections = React.useMemo(() => {
|
|
103
|
+
const loose = [];
|
|
104
|
+
const groups = new Map();
|
|
105
|
+
for (const option of filtered) {
|
|
106
|
+
if (!option.group) {
|
|
107
|
+
loose.push(option);
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
const bucket = groups.get(option.group);
|
|
111
|
+
if (bucket)
|
|
112
|
+
bucket.push(option);
|
|
113
|
+
else
|
|
114
|
+
groups.set(option.group, [option]);
|
|
115
|
+
}
|
|
116
|
+
return { loose, groups: [...groups.entries()] };
|
|
117
|
+
}, [filtered]);
|
|
118
|
+
let index = -1;
|
|
119
|
+
const renderOption = (option) => {
|
|
120
|
+
index += 1;
|
|
121
|
+
const i = index;
|
|
122
|
+
const text = option.label ?? option.value;
|
|
123
|
+
const q = normalize(query ?? '');
|
|
124
|
+
const at = q ? normalize(text).indexOf(q) : -1;
|
|
125
|
+
return (jsxs("button", { type: 'button', role: 'option', "aria-selected": option.value === value, "data-slot": 'combobox-item', tabIndex: -1, className: cn(selectStyles.item, i === active && s.active),
|
|
126
|
+
// pointerdown, not click: the field's blur would otherwise tear the
|
|
127
|
+
// list down before the click ever lands.
|
|
128
|
+
onPointerDown: event => {
|
|
129
|
+
event.preventDefault();
|
|
130
|
+
commit(option.value);
|
|
131
|
+
}, onMouseMove: () => setActive(i), children: [jsx("span", { className: s.label, children: at >= 0 ? (jsxs(Fragment, { children: [text.slice(0, at), jsx("span", { className: s.match, children: text.slice(at, at + q.length) }), text.slice(at + q.length)] })) : (text) }), option.hint ? jsx("span", { className: s.hint, children: option.hint }) : null] }, `${option.group ?? ''}:${option.value}`));
|
|
132
|
+
};
|
|
133
|
+
return (jsxs(Fragment, { children: [jsx("div", { ref: triggerRef, children: jsx(Input, { ...inputProps, className: className, role: 'combobox', "aria-expanded": open, "aria-autocomplete": 'list', autoComplete: 'off', value: value, onChange: event => {
|
|
134
|
+
const next = event.target.value;
|
|
135
|
+
setQuery(next);
|
|
136
|
+
setActive(0);
|
|
137
|
+
setOpen(true);
|
|
138
|
+
if (allowCustom)
|
|
139
|
+
onValueChange?.(next);
|
|
140
|
+
}, onFocus: event => {
|
|
141
|
+
onFocus?.(event);
|
|
142
|
+
setOpen(true);
|
|
143
|
+
}, onBlur: event => {
|
|
144
|
+
onBlur?.(event);
|
|
145
|
+
if (!allowCustom && value && !options.some(o => o.value === value)) {
|
|
146
|
+
onValueChange?.('');
|
|
147
|
+
}
|
|
148
|
+
}, onClick: () => setOpen(true), onKeyDown: handleKeyDown }) }), jsx(Surface, { open: open, displayOpen: open, contentRef: contentRef, triggerRef: triggerRef, className: selectStyles.content, role: 'listbox', children: jsx("div", { className: cn(selectStyles.viewport, selectStyles['viewport-popper']), children: filtered.length === 0 ? (jsx("div", { className: s.empty, children: emptyText })) : (jsxs(Fragment, { children: [sections.loose.map(renderOption), sections.groups.map(([group, items]) => (jsxs("div", { className: selectStyles.group, role: 'group', "aria-label": group, children: [jsx("div", { className: selectStyles['group-label'], "aria-hidden": 'true', children: group }), items.map(renderOption)] }, group)))] })) }) })] }));
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export { Combobox };
|
|
152
|
+
//# sourceMappingURL=combobox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combobox.js","sources":["../../../src/form/Combobox/combobox.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport cn from 'clsx';\nimport { Input } from '../Input';\nimport type { InputBaseProps } from '../Input/input';\nimport { __Surface as Surface } from '../Select/select';\nimport selectStyles from '../Select/select.module.scss';\n\nimport s from './combobox.module.scss';\n\nexport interface ComboboxOption {\n /** The value written back on selection. */\n value: string;\n /** What the row shows. Falls back to `value`. */\n label?: string;\n /** Trailing muted text — a category, a count, a unit. */\n hint?: string;\n /** Heading this option files under. Ungrouped options render first. */\n group?: string;\n}\n\nexport interface ComboboxProps\n extends\n InputBaseProps,\n /*\n * The <input> half only. `Input`'s own props are a union with the textarea\n * variant, and a union will not narrow through a spread — every handler\n * below would be typed as \"input AND textarea event\" and none of them\n * would satisfy it.\n */\n Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange' | 'list'> {\n options: ComboboxOption[];\n value?: string;\n onValueChange?: (value: string) => void;\n /**\n * Whether a value absent from `options` is allowed. Default true — this\n * replaces a `<datalist>`, whose whole point is that typing a new one is how\n * the vocabulary grows.\n */\n allowCustom?: boolean;\n /** Shown when the filter matches nothing. */\n emptyText?: string;\n /** Cap on rows rendered at once. */\n maxVisible?: number;\n}\n\nfunction normalize(text: string) {\n return text.trim().toLowerCase();\n}\n\n/**\n * Free-text field with a suggestion list.\n *\n * This exists because `<datalist>` does not hold up: Chrome only reliably opens\n * it once the user types or presses ArrowDown — a click on the field does\n * nothing, so it reads as broken — and nothing about the popup can be styled,\n * so it arrives as OS chrome hanging off an otherwise themed field.\n *\n * The panel is Select's `Surface` and Select's stylesheet, deliberately: a\n * lookalike built from its own rules drifts the moment either is touched.\n */\nfunction Combobox({\n options,\n value = '',\n onValueChange,\n allowCustom = true,\n emptyText = 'No matches',\n maxVisible = 50,\n onKeyDown,\n onFocus,\n onBlur,\n className,\n ...inputProps\n}: ComboboxProps) {\n const [open, setOpen] = React.useState(false);\n const [active, setActive] = React.useState(0);\n /*\n * Typing filters; opening from a click does not. Without this the list would\n * arrive pre-filtered to the single current value, which is the least useful\n * moment to hide the other 26 options.\n */\n const [query, setQuery] = React.useState<string | null>(null);\n\n const triggerRef = React.useRef<HTMLDivElement | null>(null);\n const contentRef = React.useRef<HTMLDivElement | null>(null);\n\n const filtered = React.useMemo(() => {\n const q = normalize(query ?? '');\n const matches = q ? options.filter(o => normalize(o.label ?? o.value).includes(q)) : options;\n return matches.slice(0, maxVisible);\n }, [options, query, maxVisible]);\n\n // A filter that shortens the list must not leave the highlight past its end.\n React.useEffect(() => {\n setActive(i => (i < filtered.length ? i : 0));\n }, [filtered.length]);\n\n const close = React.useCallback(() => {\n setOpen(false);\n setQuery(null);\n }, []);\n\n React.useEffect(() => {\n if (!open) return undefined;\n const onDocPointerDown = (event: PointerEvent) => {\n const target = event.target as Node | null;\n if (triggerRef.current?.contains(target as Node)) return;\n if (contentRef.current?.contains(target as Node)) return;\n close();\n };\n document.addEventListener('pointerdown', onDocPointerDown, true);\n return () => document.removeEventListener('pointerdown', onDocPointerDown, true);\n }, [open, close]);\n\n const commit = (next: string) => {\n onValueChange?.(next);\n close();\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n onKeyDown?.(event);\n if (event.defaultPrevented) return;\n\n if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {\n event.preventDefault();\n if (!open) {\n setOpen(true);\n return;\n }\n if (!filtered.length) return;\n const step = event.key === 'ArrowDown' ? 1 : -1;\n setActive(i => (i + step + filtered.length) % filtered.length);\n return;\n }\n\n if (event.key === 'Enter') {\n if (open && filtered[active]) {\n event.preventDefault();\n commit(filtered[active].value);\n }\n return;\n }\n\n if (event.key === 'Escape') {\n if (open) {\n // Only the list closes. Escape inside a Dialog would otherwise dismiss\n // the whole dialog out from under an open dropdown.\n event.stopPropagation();\n close();\n }\n return;\n }\n\n if (event.key === 'Tab') {\n close();\n }\n };\n\n /* Ungrouped rows first, then each group in the order it first appears. */\n const sections = React.useMemo(() => {\n const loose: ComboboxOption[] = [];\n const groups = new Map<string, ComboboxOption[]>();\n for (const option of filtered) {\n if (!option.group) {\n loose.push(option);\n continue;\n }\n const bucket = groups.get(option.group);\n if (bucket) bucket.push(option);\n else groups.set(option.group, [option]);\n }\n return { loose, groups: [...groups.entries()] };\n }, [filtered]);\n\n let index = -1;\n const renderOption = (option: ComboboxOption) => {\n index += 1;\n const i = index;\n const text = option.label ?? option.value;\n const q = normalize(query ?? '');\n const at = q ? normalize(text).indexOf(q) : -1;\n\n return (\n <button\n key={`${option.group ?? ''}:${option.value}`}\n type={'button'}\n role={'option'}\n aria-selected={option.value === value}\n data-slot={'combobox-item'}\n tabIndex={-1}\n className={cn(selectStyles.item, i === active && s.active)}\n // pointerdown, not click: the field's blur would otherwise tear the\n // list down before the click ever lands.\n onPointerDown={event => {\n event.preventDefault();\n commit(option.value);\n }}\n onMouseMove={() => setActive(i)}\n >\n <span className={s.label}>\n {at >= 0 ? (\n <>\n {text.slice(0, at)}\n <span className={s.match}>{text.slice(at, at + q.length)}</span>\n {text.slice(at + q.length)}\n </>\n ) : (\n text\n )}\n </span>\n {option.hint ? <span className={s.hint}>{option.hint}</span> : null}\n </button>\n );\n };\n\n return (\n <>\n <div ref={triggerRef}>\n <Input\n {...inputProps}\n className={className}\n role={'combobox'}\n aria-expanded={open}\n aria-autocomplete={'list'}\n autoComplete={'off'}\n value={value}\n onChange={event => {\n const next = event.target.value;\n setQuery(next);\n setActive(0);\n setOpen(true);\n if (allowCustom) onValueChange?.(next);\n }}\n onFocus={event => {\n onFocus?.(event);\n setOpen(true);\n }}\n onBlur={event => {\n onBlur?.(event);\n if (!allowCustom && value && !options.some(o => o.value === value)) {\n onValueChange?.('');\n }\n }}\n onClick={() => setOpen(true)}\n onKeyDown={handleKeyDown}\n />\n </div>\n <Surface\n open={open}\n displayOpen={open}\n contentRef={contentRef}\n triggerRef={triggerRef}\n className={selectStyles.content}\n role={'listbox'}\n >\n <div className={cn(selectStyles.viewport, selectStyles['viewport-popper'])}>\n {filtered.length === 0 ? (\n <div className={s.empty}>{emptyText}</div>\n ) : (\n <>\n {sections.loose.map(renderOption)}\n {sections.groups.map(([group, items]) => (\n <div key={group} className={selectStyles.group} role={'group'} aria-label={group}>\n <div className={selectStyles['group-label']} aria-hidden={'true'}>\n {group}\n </div>\n {items.map(renderOption)}\n </div>\n ))}\n </>\n )}\n </div>\n </Surface>\n </>\n );\n}\n\nexport { Combobox };\n"],"names":["_jsxs","_jsx","_Fragment"],"mappings":";;;;;;;;AA8CA,SAAS,SAAS,CAAC,IAAY,EAAA;AAC7B,IAAA,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE;AAClC;AAEA;;;;;;;;;;AAUG;AACH,SAAS,QAAQ,CAAC,EAChB,OAAO,EACP,KAAK,GAAG,EAAE,EACV,aAAa,EACb,WAAW,GAAG,IAAI,EAClB,SAAS,GAAG,YAAY,EACxB,UAAU,GAAG,EAAE,EACf,SAAS,EACT,OAAO,EACP,MAAM,EACN,SAAS,EACT,GAAG,UAAU,EACC,EAAA;AACd,IAAA,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC;AAC7C,IAAA,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC7C;;;;AAIG;AACH,IAAA,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAgB,IAAI,CAAC;IAE7D,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAwB,IAAI,CAAC;IAC5D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AS,EAAA,QAAA,EAEfA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,YAAY,CAAC,iBAAiB,CAAC,CAAC,EAAA,QAAA,EACvE,QAAQ,CAAC,MAAM,KAAK,CAAC,IACpBA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,CAAC,CAAC,KAAK,EAAA,QAAA,EAAG,SAAS,EAAA,CAAO,KAE1CD,IAAA,CAAAE,QAAA,EAAA,EAAA,QAAA,EAAA,CACG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,EAChC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,MAClCF,IAAA,CAAA,KAAA,EAAA,EAAiB,SAAS,EAAE,YAAY,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAA,YAAA,EAAc,KAAK,aAC9EC,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,YAAY,CAAC,aAAa,CAAC,EAAA,aAAA,EAAe,MAAM,YAC7D,KAAK,EAAA,CACF,EACL,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,KAJhB,KAAK,CAKT,CACP,CAAC,IACD,CACJ,EAAA,CACG,EAAA,CACE,CAAA,EAAA,CACT;AAEP;;"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import './combobox.css';
|
|
2
|
+
|
|
3
|
+
var s = {"empty":"combobox-module_empty__S_Hgc","match":"combobox-module_match__WZJoC","hint":"combobox-module_hint__JccTH","label":"combobox-module_label__kNV8N","active":"combobox-module_active__idRqT"};
|
|
4
|
+
|
|
5
|
+
export { s as default };
|
|
6
|
+
//# sourceMappingURL=combobox.module.scss.js.map
|