@kismet-ux/constellation 1.9.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/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 +1 -1
- 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 +46 -2
- package/dist/form/Select/select.d.ts +31 -3
- package/dist/form/Select/select.d.ts.map +1 -1
- package/dist/form/Select/select.js +35 -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-B9B7JjTb.d.ts +204 -0
- 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-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-Iuzs6nt9.d.ts +498 -0
- package/dist/index-LnEpnlTq.d.ts +566 -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-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 +121 -13
- 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 +42 -0
- package/dist/layout/Container/container.d.ts.map +1 -1
- package/dist/layout/Container/container.js +37 -9
- 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.js +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-nKcM19C9.d.ts +45 -0
- package/dist/types/layout/container.d.ts +28 -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 +68 -14
- package/dist/ui/Button/button.d.ts.map +1 -1
- package/dist/ui/Button/button.js +2 -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
|
@@ -13,6 +13,18 @@
|
|
|
13
13
|
* app whose palette encodes meaning (which aisle a thing lands on), that is the
|
|
14
14
|
* difference between using the library and forking it.
|
|
15
15
|
*/
|
|
16
|
+
/*
|
|
17
|
+
* Fills its container and centres its label.
|
|
18
|
+
*
|
|
19
|
+
* A block button — the one that commits a form, or the one at the foot of a
|
|
20
|
+
* card — is otherwise the caller writing `width: 100%` over the top, which is
|
|
21
|
+
* a rule per app for a shape the library already knows how to draw.
|
|
22
|
+
*/
|
|
23
|
+
.button-module_button--full-width__f1jWC {
|
|
24
|
+
display: flex;
|
|
25
|
+
width: 100%;
|
|
26
|
+
}
|
|
27
|
+
|
|
16
28
|
.button-module_button__ATpxB {
|
|
17
29
|
align-items: center;
|
|
18
30
|
border: none;
|
|
@@ -181,7 +193,10 @@
|
|
|
181
193
|
color: var(--button-color, var(--primary-outlined-border));
|
|
182
194
|
}
|
|
183
195
|
.button-module_button--outlined__AxHna.button-module_button--primary__BO20b:hover:not(:disabled) {
|
|
184
|
-
|
|
196
|
+
/* Mixed on the SOLID, not on `--primary-hover`. That token is itself an
|
|
197
|
+
alpha tint (8–16%), so mixing it again compounded two transparencies and
|
|
198
|
+
landed at ~1.6% — a hover nobody could see. */
|
|
199
|
+
background-color: color-mix(in srgb, var(--button-color, var(--primary-main)) 14%, transparent);
|
|
185
200
|
}
|
|
186
201
|
.button-module_button--outlined__AxHna.button-module_button--primary__BO20b:focus-visible {
|
|
187
202
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--primary-focus-visible);
|
|
@@ -195,7 +210,10 @@
|
|
|
195
210
|
color: var(--button-color, var(--secondary-outlined-border));
|
|
196
211
|
}
|
|
197
212
|
.button-module_button--outlined__AxHna.button-module_button--secondary__EgwQf:hover:not(:disabled) {
|
|
198
|
-
|
|
213
|
+
/* Mixed on the SOLID, not on `--secondary-hover`. That token is itself an
|
|
214
|
+
alpha tint (8–16%), so mixing it again compounded two transparencies and
|
|
215
|
+
landed at ~1.6% — a hover nobody could see. */
|
|
216
|
+
background-color: color-mix(in srgb, var(--button-color, var(--secondary-main)) 14%, transparent);
|
|
199
217
|
}
|
|
200
218
|
.button-module_button--outlined__AxHna.button-module_button--secondary__EgwQf:focus-visible {
|
|
201
219
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--secondary-focus-visible);
|
|
@@ -209,7 +227,10 @@
|
|
|
209
227
|
color: var(--button-color, var(--destructive-outlined-border));
|
|
210
228
|
}
|
|
211
229
|
.button-module_button--outlined__AxHna.button-module_button--destructive__PPikG:hover:not(:disabled) {
|
|
212
|
-
|
|
230
|
+
/* Mixed on the SOLID, not on `--destructive-hover`. That token is itself an
|
|
231
|
+
alpha tint (8–16%), so mixing it again compounded two transparencies and
|
|
232
|
+
landed at ~1.6% — a hover nobody could see. */
|
|
233
|
+
background-color: color-mix(in srgb, var(--button-color, var(--destructive-main)) 14%, transparent);
|
|
213
234
|
}
|
|
214
235
|
.button-module_button--outlined__AxHna.button-module_button--destructive__PPikG:focus-visible {
|
|
215
236
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--destructive-focus-visible);
|
|
@@ -223,7 +244,10 @@
|
|
|
223
244
|
color: var(--button-color, var(--warning-outlined-border));
|
|
224
245
|
}
|
|
225
246
|
.button-module_button--outlined__AxHna.button-module_button--warning__8wotP:hover:not(:disabled) {
|
|
226
|
-
|
|
247
|
+
/* Mixed on the SOLID, not on `--warning-hover`. That token is itself an
|
|
248
|
+
alpha tint (8–16%), so mixing it again compounded two transparencies and
|
|
249
|
+
landed at ~1.6% — a hover nobody could see. */
|
|
250
|
+
background-color: color-mix(in srgb, var(--button-color, var(--warning-main)) 14%, transparent);
|
|
227
251
|
}
|
|
228
252
|
.button-module_button--outlined__AxHna.button-module_button--warning__8wotP:focus-visible {
|
|
229
253
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--warning-focus-visible);
|
|
@@ -237,7 +261,10 @@
|
|
|
237
261
|
color: var(--button-color, var(--success-outlined-border));
|
|
238
262
|
}
|
|
239
263
|
.button-module_button--outlined__AxHna.button-module_button--success__iPEgl:hover:not(:disabled) {
|
|
240
|
-
|
|
264
|
+
/* Mixed on the SOLID, not on `--success-hover`. That token is itself an
|
|
265
|
+
alpha tint (8–16%), so mixing it again compounded two transparencies and
|
|
266
|
+
landed at ~1.6% — a hover nobody could see. */
|
|
267
|
+
background-color: color-mix(in srgb, var(--button-color, var(--success-main)) 14%, transparent);
|
|
241
268
|
}
|
|
242
269
|
.button-module_button--outlined__AxHna.button-module_button--success__iPEgl:focus-visible {
|
|
243
270
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--success-focus-visible);
|
|
@@ -251,7 +278,10 @@
|
|
|
251
278
|
color: var(--button-color, var(--info-outlined-border));
|
|
252
279
|
}
|
|
253
280
|
.button-module_button--outlined__AxHna.button-module_button--info__WaPKN:hover:not(:disabled) {
|
|
254
|
-
|
|
281
|
+
/* Mixed on the SOLID, not on `--info-hover`. That token is itself an
|
|
282
|
+
alpha tint (8–16%), so mixing it again compounded two transparencies and
|
|
283
|
+
landed at ~1.6% — a hover nobody could see. */
|
|
284
|
+
background-color: color-mix(in srgb, var(--button-color, var(--info-main)) 14%, transparent);
|
|
255
285
|
}
|
|
256
286
|
.button-module_button--outlined__AxHna.button-module_button--info__WaPKN:focus-visible {
|
|
257
287
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--info-focus-visible);
|
|
@@ -265,7 +295,10 @@
|
|
|
265
295
|
color: var(--button-color, var(--slate-outlined-border));
|
|
266
296
|
}
|
|
267
297
|
.button-module_button--outlined__AxHna.button-module_button--slate__DRwTq:hover:not(:disabled) {
|
|
268
|
-
|
|
298
|
+
/* Mixed on the SOLID, not on `--slate-hover`. That token is itself an
|
|
299
|
+
alpha tint (8–16%), so mixing it again compounded two transparencies and
|
|
300
|
+
landed at ~1.6% — a hover nobody could see. */
|
|
301
|
+
background-color: color-mix(in srgb, var(--button-color, var(--slate-main)) 14%, transparent);
|
|
269
302
|
}
|
|
270
303
|
.button-module_button--outlined__AxHna.button-module_button--slate__DRwTq:focus-visible {
|
|
271
304
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--slate-focus-visible);
|
|
@@ -292,7 +325,10 @@
|
|
|
292
325
|
color: var(--button-color, var(--primary-outlined-border));
|
|
293
326
|
}
|
|
294
327
|
.button-module_button--ghost__m7RzP.button-module_button--primary__BO20b:hover:not(:disabled) {
|
|
295
|
-
|
|
328
|
+
/* Mixed on the SOLID, not on `--primary-hover`. That token is itself an
|
|
329
|
+
alpha tint (8–16%), so mixing it again compounded two transparencies and
|
|
330
|
+
landed at ~1.6% — a hover nobody could see. */
|
|
331
|
+
background-color: color-mix(in srgb, var(--button-color, var(--primary-main)) 14%, transparent);
|
|
296
332
|
}
|
|
297
333
|
.button-module_button--ghost__m7RzP.button-module_button--primary__BO20b:focus-visible {
|
|
298
334
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--primary-focus-visible);
|
|
@@ -305,7 +341,10 @@
|
|
|
305
341
|
color: var(--button-color, var(--secondary-outlined-border));
|
|
306
342
|
}
|
|
307
343
|
.button-module_button--ghost__m7RzP.button-module_button--secondary__EgwQf:hover:not(:disabled) {
|
|
308
|
-
|
|
344
|
+
/* Mixed on the SOLID, not on `--secondary-hover`. That token is itself an
|
|
345
|
+
alpha tint (8–16%), so mixing it again compounded two transparencies and
|
|
346
|
+
landed at ~1.6% — a hover nobody could see. */
|
|
347
|
+
background-color: color-mix(in srgb, var(--button-color, var(--secondary-main)) 14%, transparent);
|
|
309
348
|
}
|
|
310
349
|
.button-module_button--ghost__m7RzP.button-module_button--secondary__EgwQf:focus-visible {
|
|
311
350
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--secondary-focus-visible);
|
|
@@ -318,7 +357,10 @@
|
|
|
318
357
|
color: var(--button-color, var(--destructive-outlined-border));
|
|
319
358
|
}
|
|
320
359
|
.button-module_button--ghost__m7RzP.button-module_button--destructive__PPikG:hover:not(:disabled) {
|
|
321
|
-
|
|
360
|
+
/* Mixed on the SOLID, not on `--destructive-hover`. That token is itself an
|
|
361
|
+
alpha tint (8–16%), so mixing it again compounded two transparencies and
|
|
362
|
+
landed at ~1.6% — a hover nobody could see. */
|
|
363
|
+
background-color: color-mix(in srgb, var(--button-color, var(--destructive-main)) 14%, transparent);
|
|
322
364
|
}
|
|
323
365
|
.button-module_button--ghost__m7RzP.button-module_button--destructive__PPikG:focus-visible {
|
|
324
366
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--destructive-focus-visible);
|
|
@@ -331,7 +373,10 @@
|
|
|
331
373
|
color: var(--button-color, var(--warning-outlined-border));
|
|
332
374
|
}
|
|
333
375
|
.button-module_button--ghost__m7RzP.button-module_button--warning__8wotP:hover:not(:disabled) {
|
|
334
|
-
|
|
376
|
+
/* Mixed on the SOLID, not on `--warning-hover`. That token is itself an
|
|
377
|
+
alpha tint (8–16%), so mixing it again compounded two transparencies and
|
|
378
|
+
landed at ~1.6% — a hover nobody could see. */
|
|
379
|
+
background-color: color-mix(in srgb, var(--button-color, var(--warning-main)) 14%, transparent);
|
|
335
380
|
}
|
|
336
381
|
.button-module_button--ghost__m7RzP.button-module_button--warning__8wotP:focus-visible {
|
|
337
382
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--warning-focus-visible);
|
|
@@ -344,7 +389,10 @@
|
|
|
344
389
|
color: var(--button-color, var(--success-outlined-border));
|
|
345
390
|
}
|
|
346
391
|
.button-module_button--ghost__m7RzP.button-module_button--success__iPEgl:hover:not(:disabled) {
|
|
347
|
-
|
|
392
|
+
/* Mixed on the SOLID, not on `--success-hover`. That token is itself an
|
|
393
|
+
alpha tint (8–16%), so mixing it again compounded two transparencies and
|
|
394
|
+
landed at ~1.6% — a hover nobody could see. */
|
|
395
|
+
background-color: color-mix(in srgb, var(--button-color, var(--success-main)) 14%, transparent);
|
|
348
396
|
}
|
|
349
397
|
.button-module_button--ghost__m7RzP.button-module_button--success__iPEgl:focus-visible {
|
|
350
398
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--success-focus-visible);
|
|
@@ -357,7 +405,10 @@
|
|
|
357
405
|
color: var(--button-color, var(--info-outlined-border));
|
|
358
406
|
}
|
|
359
407
|
.button-module_button--ghost__m7RzP.button-module_button--info__WaPKN:hover:not(:disabled) {
|
|
360
|
-
|
|
408
|
+
/* Mixed on the SOLID, not on `--info-hover`. That token is itself an
|
|
409
|
+
alpha tint (8–16%), so mixing it again compounded two transparencies and
|
|
410
|
+
landed at ~1.6% — a hover nobody could see. */
|
|
411
|
+
background-color: color-mix(in srgb, var(--button-color, var(--info-main)) 14%, transparent);
|
|
361
412
|
}
|
|
362
413
|
.button-module_button--ghost__m7RzP.button-module_button--info__WaPKN:focus-visible {
|
|
363
414
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--info-focus-visible);
|
|
@@ -370,7 +421,10 @@
|
|
|
370
421
|
color: var(--button-color, var(--slate-outlined-border));
|
|
371
422
|
}
|
|
372
423
|
.button-module_button--ghost__m7RzP.button-module_button--slate__DRwTq:hover:not(:disabled) {
|
|
373
|
-
|
|
424
|
+
/* Mixed on the SOLID, not on `--slate-hover`. That token is itself an
|
|
425
|
+
alpha tint (8–16%), so mixing it again compounded two transparencies and
|
|
426
|
+
landed at ~1.6% — a hover nobody could see. */
|
|
427
|
+
background-color: color-mix(in srgb, var(--button-color, var(--slate-main)) 14%, transparent);
|
|
374
428
|
}
|
|
375
429
|
.button-module_button--ghost__m7RzP.button-module_button--slate__DRwTq:focus-visible {
|
|
376
430
|
box-shadow: 0 0 0 2px var(--background-default), 0 0 0 4px var(--slate-focus-visible);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/ui/Button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAmCnD,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,YAAY,CAAC,OAAO,cAAc,CAAC;IAC1F,4EAA4E;IAC5E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/ui/Button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAmCnD,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,YAAY,CAAC,OAAO,cAAc,CAAC;IAC1F,4EAA4E;IAC5E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,QAAA,MAAM,MAAM,uFA4EX,CAAC;AAGF,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
package/dist/ui/Button/button.js
CHANGED
|
@@ -34,7 +34,7 @@ const normalizePathname = (href, origin) => {
|
|
|
34
34
|
return null;
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
|
-
const Button = React.forwardRef(({ variant = 'contained', theme = 'primary', size = 'md', rounded = 'extra', iconOnly, className, asChild = false, onClick, color, onColor, style, ...props }, ref) => {
|
|
37
|
+
const Button = React.forwardRef(({ variant = 'contained', theme = 'primary', size = 'md', rounded = 'extra', iconOnly, fullWidth, className, asChild = false, onClick, color, onColor, style, ...props }, ref) => {
|
|
38
38
|
const Comp = asChild ? Slot : 'button';
|
|
39
39
|
const childHref = asChild ? getChildHref(props.children) : null;
|
|
40
40
|
const isBrowser = typeof window !== 'undefined';
|
|
@@ -57,7 +57,7 @@ const Button = React.forwardRef(({ variant = 'contained', theme = 'primary', siz
|
|
|
57
57
|
// a wrapper element whose own content needs its own a11y decisions.
|
|
58
58
|
const { children: rawChildren, ...restProps } = props;
|
|
59
59
|
const children = asChild ? rawChildren : withAriaHiddenChildren(rawChildren);
|
|
60
|
-
return (jsx(Comp, { "data-slot": 'button', "data-active-link": isActiveLink ? 'true' : undefined, "aria-current": isActiveLink && asChild ? 'page' : undefined, className: cn(buttonVariants({ variant, theme, iconOnly, size, rounded }), className), style: color || onColor
|
|
60
|
+
return (jsx(Comp, { "data-slot": 'button', "data-active-link": isActiveLink ? 'true' : undefined, "aria-current": isActiveLink && asChild ? 'page' : undefined, className: cn(buttonVariants({ variant, theme, iconOnly, fullWidth, size, rounded }), className), style: color || onColor
|
|
61
61
|
? {
|
|
62
62
|
...style,
|
|
63
63
|
...(color ? { '--button-color': color } : null),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sources":["../../../src/ui/Button/button.tsx"],"sourcesContent":["import { type VariantProps } from 'class-variance-authority';\nimport cn from 'clsx';\nimport * as React from 'react';\nimport { createRipple } from '../../internal/create-ripple';\nimport { Slot } from '../../internal/slot';\nimport { withAriaHiddenChildren } from '../../internal/with-aria-hidden-children';\nimport { buttonVariants } from './button-variants';\nimport s from './button.module.scss';\n\nconst getChildHref = (children: React.ReactNode): string | null => {\n const childArray = React.Children.toArray(children ?? []);\n if (childArray.length !== 1) {\n return null;\n }\n\n const child = childArray[0];\n if (!React.isValidElement<{ href?: string; to?: string }>(child)) {\n return null;\n }\n\n if (typeof child.props?.href === 'string') {\n return child.props.href;\n }\n\n if (typeof child.props?.to === 'string') {\n return child.props.to;\n }\n\n return null;\n};\n\nconst normalizePathname = (href: string, origin: string): string | null => {\n try {\n const url = new URL(href, origin);\n const normalizedPath = url.pathname.replace(/\\/+$/, '');\n return normalizedPath || '/';\n } catch {\n return null;\n }\n};\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {\n /** A colour outside the theme scale; overrides the theme's colour roles. */\n color?: string;\n /** Ink for `contained` when `color` is set and the default contrast is wrong. */\n onColor?: string;\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n variant = 'contained',\n theme = 'primary',\n size = 'md',\n rounded = 'extra',\n iconOnly,\n className,\n asChild = false,\n onClick,\n color,\n onColor,\n style,\n ...props\n },\n ref,\n ) => {\n const Comp = asChild ? Slot : 'button';\n const childHref = asChild ? getChildHref(props.children) : null;\n const isBrowser = typeof window !== 'undefined';\n\n let currentPath: string | null = null;\n let targetPath: string | null = null;\n\n if (isBrowser) {\n const { pathname, origin } = window.location;\n currentPath = normalizePathname(pathname, origin);\n\n if (childHref) {\n targetPath = normalizePathname(childHref, origin);\n }\n }\n\n const isActiveLink = Boolean(\n asChild && currentPath && targetPath && currentPath === targetPath,\n );\n\n const handleClick = (event: React.MouseEvent<HTMLElement>) => {\n createRipple(event, s['ripple']);\n onClick?.(event as React.MouseEvent<HTMLButtonElement>);\n };\n\n // Treat element children as decorative by default (icons get\n // aria-hidden automatically). Skip for `asChild` because Slot's child is\n // a wrapper element whose own content needs its own a11y decisions.\n const { children: rawChildren, ...restProps } = props;\n const children = asChild ? rawChildren : withAriaHiddenChildren(rawChildren);\n\n return (\n <Comp\n data-slot={'button'}\n data-active-link={isActiveLink ? 'true' : undefined}\n aria-current={isActiveLink && asChild ? 'page' : undefined}\n className={cn(buttonVariants({ variant, theme, iconOnly, size, rounded })
|
|
1
|
+
{"version":3,"file":"button.js","sources":["../../../src/ui/Button/button.tsx"],"sourcesContent":["import { type VariantProps } from 'class-variance-authority';\nimport cn from 'clsx';\nimport * as React from 'react';\nimport { createRipple } from '../../internal/create-ripple';\nimport { Slot } from '../../internal/slot';\nimport { withAriaHiddenChildren } from '../../internal/with-aria-hidden-children';\nimport { buttonVariants } from './button-variants';\nimport s from './button.module.scss';\n\nconst getChildHref = (children: React.ReactNode): string | null => {\n const childArray = React.Children.toArray(children ?? []);\n if (childArray.length !== 1) {\n return null;\n }\n\n const child = childArray[0];\n if (!React.isValidElement<{ href?: string; to?: string }>(child)) {\n return null;\n }\n\n if (typeof child.props?.href === 'string') {\n return child.props.href;\n }\n\n if (typeof child.props?.to === 'string') {\n return child.props.to;\n }\n\n return null;\n};\n\nconst normalizePathname = (href: string, origin: string): string | null => {\n try {\n const url = new URL(href, origin);\n const normalizedPath = url.pathname.replace(/\\/+$/, '');\n return normalizedPath || '/';\n } catch {\n return null;\n }\n};\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {\n /** A colour outside the theme scale; overrides the theme's colour roles. */\n color?: string;\n /** Ink for `contained` when `color` is set and the default contrast is wrong. */\n onColor?: string;\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n variant = 'contained',\n theme = 'primary',\n size = 'md',\n rounded = 'extra',\n iconOnly,\n fullWidth,\n className,\n asChild = false,\n onClick,\n color,\n onColor,\n style,\n ...props\n },\n ref,\n ) => {\n const Comp = asChild ? Slot : 'button';\n const childHref = asChild ? getChildHref(props.children) : null;\n const isBrowser = typeof window !== 'undefined';\n\n let currentPath: string | null = null;\n let targetPath: string | null = null;\n\n if (isBrowser) {\n const { pathname, origin } = window.location;\n currentPath = normalizePathname(pathname, origin);\n\n if (childHref) {\n targetPath = normalizePathname(childHref, origin);\n }\n }\n\n const isActiveLink = Boolean(\n asChild && currentPath && targetPath && currentPath === targetPath,\n );\n\n const handleClick = (event: React.MouseEvent<HTMLElement>) => {\n createRipple(event, s['ripple']);\n onClick?.(event as React.MouseEvent<HTMLButtonElement>);\n };\n\n // Treat element children as decorative by default (icons get\n // aria-hidden automatically). Skip for `asChild` because Slot's child is\n // a wrapper element whose own content needs its own a11y decisions.\n const { children: rawChildren, ...restProps } = props;\n const children = asChild ? rawChildren : withAriaHiddenChildren(rawChildren);\n\n return (\n <Comp\n data-slot={'button'}\n data-active-link={isActiveLink ? 'true' : undefined}\n aria-current={isActiveLink && asChild ? 'page' : undefined}\n className={cn(\n buttonVariants({ variant, theme, iconOnly, fullWidth, size, rounded }),\n className,\n )}\n style={\n color || onColor\n ? ({\n ...style,\n ...(color ? { '--button-color': color } : null),\n ...(onColor ? { '--button-on-color': onColor } : null),\n } as React.CSSProperties)\n : style\n }\n ref={ref}\n onClick={handleClick}\n {...restProps}\n >\n {children}\n </Comp>\n );\n },\n);\nButton.displayName = 'Button';\n\nexport { Button };\n"],"names":["_jsx"],"mappings":"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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './button.css';
|
|
2
2
|
|
|
3
|
-
var s = {"button":"button-module_button__ATpxB","ripple":"button-module_ripple__Ny6oE","button--rounded":"button-module_button--rounded__ah_Ei","button--extra-rounded":"button-module_button--extra-rounded__B9xBI","button--contained":"button-module_button--contained__YQQ33","button--primary":"button-module_button--primary__BO20b","button--secondary":"button-module_button--secondary__EgwQf","button--destructive":"button-module_button--destructive__PPikG","button--warning":"button-module_button--warning__8wotP","button--success":"button-module_button--success__iPEgl","button--info":"button-module_button--info__WaPKN","button--slate":"button-module_button--slate__DRwTq","button--inherit":"button-module_button--inherit__KgtNC","button--outlined":"button-module_button--outlined__AxHna","button--ghost":"button-module_button--ghost__m7RzP","button--xs":"button-module_button--xs__eWH8k","button--icon-only":"button-module_button--icon-only__U2BKr","button--sm":"button-module_button--sm__4yeUt","button--md":"button-module_button--md__HpLm1","button--lg":"button-module_button--lg__67gAK"};
|
|
3
|
+
var s = {"button--full-width":"button-module_button--full-width__f1jWC","button":"button-module_button__ATpxB","ripple":"button-module_ripple__Ny6oE","button--rounded":"button-module_button--rounded__ah_Ei","button--extra-rounded":"button-module_button--extra-rounded__B9xBI","button--contained":"button-module_button--contained__YQQ33","button--primary":"button-module_button--primary__BO20b","button--secondary":"button-module_button--secondary__EgwQf","button--destructive":"button-module_button--destructive__PPikG","button--warning":"button-module_button--warning__8wotP","button--success":"button-module_button--success__iPEgl","button--info":"button-module_button--info__WaPKN","button--slate":"button-module_button--slate__DRwTq","button--inherit":"button-module_button--inherit__KgtNC","button--outlined":"button-module_button--outlined__AxHna","button--ghost":"button-module_button--ghost__m7RzP","button--xs":"button-module_button--xs__eWH8k","button--icon-only":"button-module_button--icon-only__U2BKr","button--sm":"button-module_button--sm__4yeUt","button--md":"button-module_button--md__HpLm1","button--lg":"button-module_button--lg__67gAK"};
|
|
4
4
|
|
|
5
5
|
export { s as default };
|
|
6
6
|
//# sourceMappingURL=button.module.scss.js.map
|
package/dist/ui/Chip/chip.css
CHANGED
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
border-style: dashed;
|
|
40
40
|
}
|
|
41
41
|
.chip-module_chip--2xs__GJtZF {
|
|
42
|
-
font-size: 0.
|
|
43
|
-
padding: 0 0.25rem;
|
|
42
|
+
font-size: 0.6rem;
|
|
43
|
+
padding: 0.05rem 0.25rem;
|
|
44
44
|
}
|
|
45
45
|
.chip-module_chip--2xs__GJtZF > svg {
|
|
46
46
|
height: 0.6rem;
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
--themed-selected: var(--primary-selected);
|
|
105
105
|
--chip-ink: var(--chip-color, var(--primary-outlined-border));
|
|
106
106
|
--chip-fill: var(--chip-color, var(--primary-main));
|
|
107
|
-
--chip-wash: var(--chip-color, var(--primary-
|
|
107
|
+
--chip-wash: var(--chip-color, var(--primary-main));
|
|
108
108
|
--chip-on-fill: var(--primary-contrast);
|
|
109
109
|
}
|
|
110
110
|
.chip-module_chip__u4PJ9.chip-module_chip--secondary__eyfdz {
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
--themed-selected: var(--secondary-selected);
|
|
121
121
|
--chip-ink: var(--chip-color, var(--secondary-outlined-border));
|
|
122
122
|
--chip-fill: var(--chip-color, var(--secondary-main));
|
|
123
|
-
--chip-wash: var(--chip-color, var(--secondary-
|
|
123
|
+
--chip-wash: var(--chip-color, var(--secondary-main));
|
|
124
124
|
--chip-on-fill: var(--secondary-contrast);
|
|
125
125
|
}
|
|
126
126
|
.chip-module_chip__u4PJ9.chip-module_chip--destructive__80JrW {
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
--themed-selected: var(--destructive-selected);
|
|
137
137
|
--chip-ink: var(--chip-color, var(--destructive-outlined-border));
|
|
138
138
|
--chip-fill: var(--chip-color, var(--destructive-main));
|
|
139
|
-
--chip-wash: var(--chip-color, var(--destructive-
|
|
139
|
+
--chip-wash: var(--chip-color, var(--destructive-main));
|
|
140
140
|
--chip-on-fill: var(--destructive-contrast);
|
|
141
141
|
}
|
|
142
142
|
.chip-module_chip__u4PJ9.chip-module_chip--warning__3oxvl {
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
--themed-selected: var(--warning-selected);
|
|
153
153
|
--chip-ink: var(--chip-color, var(--warning-outlined-border));
|
|
154
154
|
--chip-fill: var(--chip-color, var(--warning-main));
|
|
155
|
-
--chip-wash: var(--chip-color, var(--warning-
|
|
155
|
+
--chip-wash: var(--chip-color, var(--warning-main));
|
|
156
156
|
--chip-on-fill: var(--warning-contrast);
|
|
157
157
|
}
|
|
158
158
|
.chip-module_chip__u4PJ9.chip-module_chip--success__VF1tZ {
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
--themed-selected: var(--success-selected);
|
|
169
169
|
--chip-ink: var(--chip-color, var(--success-outlined-border));
|
|
170
170
|
--chip-fill: var(--chip-color, var(--success-main));
|
|
171
|
-
--chip-wash: var(--chip-color, var(--success-
|
|
171
|
+
--chip-wash: var(--chip-color, var(--success-main));
|
|
172
172
|
--chip-on-fill: var(--success-contrast);
|
|
173
173
|
}
|
|
174
174
|
.chip-module_chip__u4PJ9.chip-module_chip--info__Jgnsc {
|
|
@@ -184,7 +184,7 @@
|
|
|
184
184
|
--themed-selected: var(--info-selected);
|
|
185
185
|
--chip-ink: var(--chip-color, var(--info-outlined-border));
|
|
186
186
|
--chip-fill: var(--chip-color, var(--info-main));
|
|
187
|
-
--chip-wash: var(--chip-color, var(--info-
|
|
187
|
+
--chip-wash: var(--chip-color, var(--info-main));
|
|
188
188
|
--chip-on-fill: var(--info-contrast);
|
|
189
189
|
}
|
|
190
190
|
.chip-module_chip__u4PJ9.chip-module_chip--slate__vmQ7R {
|
|
@@ -200,7 +200,7 @@
|
|
|
200
200
|
--themed-selected: var(--slate-selected);
|
|
201
201
|
--chip-ink: var(--chip-color, var(--slate-outlined-border));
|
|
202
202
|
--chip-fill: var(--chip-color, var(--slate-main));
|
|
203
|
-
--chip-wash: var(--chip-color, var(--slate-
|
|
203
|
+
--chip-wash: var(--chip-color, var(--slate-main));
|
|
204
204
|
--chip-on-fill: var(--slate-contrast);
|
|
205
205
|
}
|
|
206
206
|
.chip-module_chip__u4PJ9.chip-module_chip--inherit__HjU_P {
|
|
@@ -209,21 +209,42 @@
|
|
|
209
209
|
--chip-wash: var(--chip-color, var(--themed-hover, var(--action-hover)));
|
|
210
210
|
--chip-on-fill: var(--themed-contrast, var(--background-default));
|
|
211
211
|
}
|
|
212
|
+
.chip-module_chip__u4PJ9 {
|
|
213
|
+
/*
|
|
214
|
+
* Every fill answers a hover.
|
|
215
|
+
*
|
|
216
|
+
* `outline` and `solid` had none at all, which is most visible where a chip
|
|
217
|
+
* IS the control — a filter pill, a size to pick — and the only feedback was
|
|
218
|
+
* the cursor. `soft` had one, but on a `--chip-wash` that fell back to an
|
|
219
|
+
* already-alpha `-hover` token, so 20% of 10% was 2% and the hover moved it
|
|
220
|
+
* to 4%. The wash is a solid now and the percentages mean what they say.
|
|
221
|
+
*/
|
|
222
|
+
}
|
|
212
223
|
.chip-module_chip--soft__zYBtU {
|
|
213
|
-
background-color: color-mix(in srgb, var(--chip-wash)
|
|
224
|
+
background-color: color-mix(in srgb, var(--chip-wash) 18%, transparent);
|
|
214
225
|
border-color: var(--chip-ink);
|
|
215
226
|
color: var(--chip-ink);
|
|
216
227
|
}
|
|
217
228
|
.chip-module_chip--soft__zYBtU:hover {
|
|
218
|
-
background-color: color-mix(in srgb, var(--chip-wash)
|
|
229
|
+
background-color: color-mix(in srgb, var(--chip-wash) 34%, transparent);
|
|
219
230
|
}
|
|
220
231
|
.chip-module_chip--outline__TO-HF {
|
|
221
232
|
background-color: transparent;
|
|
222
233
|
border-color: color-mix(in srgb, var(--chip-ink) 55%, transparent);
|
|
223
234
|
color: var(--chip-ink);
|
|
224
235
|
}
|
|
236
|
+
.chip-module_chip--outline__TO-HF:hover {
|
|
237
|
+
background-color: color-mix(in srgb, var(--chip-wash) 16%, transparent);
|
|
238
|
+
border-color: var(--chip-ink);
|
|
239
|
+
}
|
|
225
240
|
.chip-module_chip--solid__F89cD {
|
|
226
241
|
background-color: var(--chip-fill);
|
|
227
242
|
border-color: var(--chip-fill);
|
|
228
243
|
color: var(--chip-on-fill);
|
|
244
|
+
/* Lightened toward the page's own ink-on-accent, the way a contained
|
|
245
|
+
Button lightens its fill — a solid cannot take a tint on top. */
|
|
246
|
+
}
|
|
247
|
+
.chip-module_chip--solid__F89cD:hover {
|
|
248
|
+
background-color: color-mix(in srgb, var(--chip-fill) 86%, var(--chip-on-fill));
|
|
249
|
+
border-color: color-mix(in srgb, var(--chip-fill) 86%, var(--chip-on-fill));
|
|
229
250
|
}
|
package/dist/ui/Chip/chip.d.ts
CHANGED
|
@@ -8,6 +8,22 @@ export interface ChipProps extends React.HTMLAttributes<HTMLSpanElement>, Varian
|
|
|
8
8
|
* so one value is enough for every `variant`.
|
|
9
9
|
*/
|
|
10
10
|
color?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Render the caller's own element instead of a `<span>`, keeping the chip's
|
|
13
|
+
* styling.
|
|
14
|
+
*
|
|
15
|
+
* A chip is a status marker by default and a span is right for that. But a
|
|
16
|
+
* row of chips is often a CHOICE — pick a variant, filter a list — and that
|
|
17
|
+
* needs real button semantics: focusable, keyboard-operable, `aria-pressed`.
|
|
18
|
+
* Styling a `<span>` to look tappable does not give any of that.
|
|
19
|
+
*
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <Chip asChild variant={'outline'}>
|
|
22
|
+
* <button type={'button'} aria-pressed={on} onClick={pick}>Diced</button>
|
|
23
|
+
* </Chip>
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
asChild?: boolean;
|
|
11
27
|
}
|
|
12
28
|
/**
|
|
13
29
|
* A small status marker.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chip.d.ts","sourceRoot":"","sources":["../../../src/ui/Chip/chip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"chip.d.ts","sourceRoot":"","sources":["../../../src/ui/Chip/chip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,WAAW,SACf,SAAQ,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,YAAY,CAAC,OAAO,YAAY,CAAC;IAChF;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;GAOG;AACH,QAAA,MAAM,IAAI,mFAqCT,CAAC;AAGF,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
package/dist/ui/Chip/chip.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import cn from 'clsx';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
+
import { Slot } from '../../internal/slot.js';
|
|
4
5
|
import { withAriaHiddenChildren } from '../../internal/with-aria-hidden-children.js';
|
|
5
6
|
import { chipVariants } from './chip-variants.js';
|
|
6
7
|
|
|
@@ -12,8 +13,9 @@ import { chipVariants } from './chip-variants.js';
|
|
|
12
13
|
* `dashed` marks the value as provisional — a guess rather than a reading —
|
|
13
14
|
* which is a distinction worth drawing without spending a second colour on it.
|
|
14
15
|
*/
|
|
15
|
-
const Chip = React.forwardRef(({ className, size, theme, variant, shape, dashed, mono, uppercase, wrap, color, style, children, ...props }, ref) => {
|
|
16
|
-
|
|
16
|
+
const Chip = React.forwardRef(({ className, size, theme, variant, shape, dashed, mono, uppercase, wrap, color, asChild, style, children, ...props }, ref) => {
|
|
17
|
+
const Comp = asChild ? Slot : 'span';
|
|
18
|
+
return (jsx(Comp, { "data-slot": 'chip', ref: ref, className: cn(chipVariants({ size, theme, variant, shape, dashed, mono, uppercase, wrap }), className), style: color ? { ...style, '--chip-color': color } : style, ...props, children: withAriaHiddenChildren(children) }));
|
|
17
19
|
});
|
|
18
20
|
Chip.displayName = 'Chip';
|
|
19
21
|
|
package/dist/ui/Chip/chip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chip.js","sources":["../../../src/ui/Chip/chip.tsx"],"sourcesContent":["import { type VariantProps } from 'class-variance-authority';\nimport cn from 'clsx';\nimport * as React from 'react';\nimport { withAriaHiddenChildren } from '../../internal/with-aria-hidden-children';\nimport { chipVariants } from './chip-variants';\n\nexport interface ChipProps\n extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof chipVariants> {\n /**\n * Any colour outside the theme scale — a category hue, a dietary marker.\n * Overrides the whole set of colour roles the theme would otherwise supply,\n * so one value is enough for every `variant`.\n */\n color?: string;\n}\n\n/**\n * A small status marker.\n *\n * `variant` chooses how much weight it carries: `soft` (a tinted fill, the\n * default) reads as ambient, `outline` recedes further, and `solid` is a claim.\n * `dashed` marks the value as provisional — a guess rather than a reading —\n * which is a distinction worth drawing without spending a second colour on it.\n */\nconst Chip = React.forwardRef<HTMLSpanElement, ChipProps>(\n (\n {\n className,\n size,\n theme,\n variant,\n shape,\n dashed,\n mono,\n uppercase,\n wrap,\n color,\n style,\n children,\n ...props\n },\n ref,\n ) => {\n return (\n <
|
|
1
|
+
{"version":3,"file":"chip.js","sources":["../../../src/ui/Chip/chip.tsx"],"sourcesContent":["import { type VariantProps } from 'class-variance-authority';\nimport cn from 'clsx';\nimport * as React from 'react';\nimport { Slot } from '../../internal/slot';\nimport { withAriaHiddenChildren } from '../../internal/with-aria-hidden-children';\nimport { chipVariants } from './chip-variants';\n\nexport interface ChipProps\n extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof chipVariants> {\n /**\n * Any colour outside the theme scale — a category hue, a dietary marker.\n * Overrides the whole set of colour roles the theme would otherwise supply,\n * so one value is enough for every `variant`.\n */\n color?: string;\n /**\n * Render the caller's own element instead of a `<span>`, keeping the chip's\n * styling.\n *\n * A chip is a status marker by default and a span is right for that. But a\n * row of chips is often a CHOICE — pick a variant, filter a list — and that\n * needs real button semantics: focusable, keyboard-operable, `aria-pressed`.\n * Styling a `<span>` to look tappable does not give any of that.\n *\n * ```tsx\n * <Chip asChild variant={'outline'}>\n * <button type={'button'} aria-pressed={on} onClick={pick}>Diced</button>\n * </Chip>\n * ```\n */\n asChild?: boolean;\n}\n\n/**\n * A small status marker.\n *\n * `variant` chooses how much weight it carries: `soft` (a tinted fill, the\n * default) reads as ambient, `outline` recedes further, and `solid` is a claim.\n * `dashed` marks the value as provisional — a guess rather than a reading —\n * which is a distinction worth drawing without spending a second colour on it.\n */\nconst Chip = React.forwardRef<HTMLSpanElement, ChipProps>(\n (\n {\n className,\n size,\n theme,\n variant,\n shape,\n dashed,\n mono,\n uppercase,\n wrap,\n color,\n asChild,\n style,\n children,\n ...props\n },\n ref,\n ) => {\n const Comp = asChild ? Slot : 'span';\n\n return (\n <Comp\n data-slot={'chip'}\n ref={ref}\n className={cn(\n chipVariants({ size, theme, variant, shape, dashed, mono, uppercase, wrap }),\n className,\n )}\n style={color ? ({ ...style, '--chip-color': color } as React.CSSProperties) : style}\n {...props}\n >\n {withAriaHiddenChildren(children)}\n </Comp>\n );\n },\n);\nChip.displayName = 'Chip';\n\nexport { Chip };\n"],"names":["_jsx"],"mappings":";;;;;;;AAiCA;;;;;;;AAOG;AACH,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAC3B,CACE,EACE,SAAS,EACT,IAAI,EACJ,KAAK,EACL,OAAO,EACP,KAAK,EACL,MAAM,EACN,IAAI,EACJ,SAAS,EACT,IAAI,EACJ,KAAK,EACL,OAAO,EACP,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACT,EACD,GAAG,KACD;IACF,MAAM,IAAI,GAAG,OAAO,GAAG,IAAI,GAAG,MAAM;AAEpC,IAAA,QACEA,GAAA,CAAC,IAAI,EAAA,EAAA,WAAA,EACQ,MAAM,EACjB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAC5E,SAAS,CACV,EACD,KAAK,EAAE,KAAK,GAAI,EAAE,GAAG,KAAK,EAAE,cAAc,EAAE,KAAK,EAA0B,GAAG,KAAK,EAAA,GAC/E,KAAK,EAAA,QAAA,EAER,sBAAsB,CAAC,QAAQ,CAAC,EAAA,CAC5B;AAEX,CAAC;AAEH,IAAI,CAAC,WAAW,GAAG,MAAM;;"}
|
|
@@ -209,9 +209,14 @@
|
|
|
209
209
|
}
|
|
210
210
|
|
|
211
211
|
@media (prefers-reduced-motion: reduce) {
|
|
212
|
-
.code-block-module_code-block-content--collapsible__EZKCv,
|
|
213
|
-
.code-block-module_code-block-collapse-fade__Y0TgX,
|
|
214
|
-
.code-block-module_code-block-toggle-icon__yL-sy {
|
|
212
|
+
:root:not([data-motion=full]) .code-block-module_code-block-content--collapsible__EZKCv,
|
|
213
|
+
:root:not([data-motion=full]) .code-block-module_code-block-collapse-fade__Y0TgX,
|
|
214
|
+
:root:not([data-motion=full]) .code-block-module_code-block-toggle-icon__yL-sy {
|
|
215
215
|
transition: none;
|
|
216
216
|
}
|
|
217
|
+
}
|
|
218
|
+
:root[data-motion=reduced] .code-block-module_code-block-content--collapsible__EZKCv,
|
|
219
|
+
:root[data-motion=reduced] .code-block-module_code-block-collapse-fade__Y0TgX,
|
|
220
|
+
:root[data-motion=reduced] .code-block-module_code-block-toggle-icon__yL-sy {
|
|
221
|
+
transition: none;
|
|
217
222
|
}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
1
2
|
.dialog-module_dialog-overlay__m4sZN {
|
|
2
3
|
background-color: var(--background-modal);
|
|
3
4
|
inset: 0;
|
|
4
5
|
position: fixed;
|
|
5
6
|
z-index: var(--z-modal);
|
|
6
7
|
}
|
|
8
|
+
.dialog-module_dialog-overlay__m4sZN[data-pass-through] {
|
|
9
|
+
pointer-events: none;
|
|
10
|
+
}
|
|
7
11
|
.dialog-module_dialog-overlay__m4sZN[data-state=open] {
|
|
8
12
|
animation: dialog-module_fadeIn__8JmIQ 200ms;
|
|
9
13
|
}
|
|
@@ -35,6 +39,9 @@
|
|
|
35
39
|
.dialog-module_dialog-content__FgQr2.dialog-module_dialog-width-min__dbFaL {
|
|
36
40
|
width: min-content;
|
|
37
41
|
}
|
|
42
|
+
.dialog-module_dialog-content__FgQr2.dialog-module_dialog-measure__ajXF_ {
|
|
43
|
+
width: var(--dialog-measure);
|
|
44
|
+
}
|
|
38
45
|
.dialog-module_dialog-content__FgQr2[data-state=open] {
|
|
39
46
|
animation: dialog-module_fadeIn__8JmIQ 200ms, dialog-module_zoomIn__ezGtu 200ms;
|
|
40
47
|
}
|
|
@@ -77,6 +84,69 @@
|
|
|
77
84
|
}
|
|
78
85
|
}
|
|
79
86
|
|
|
87
|
+
/*
|
|
88
|
+
* A morphing dialog animates its own transform from the element it came from,
|
|
89
|
+
* so the stock zoom must not also be running — two animations on one
|
|
90
|
+
* transform is a judder, not a crossfade.
|
|
91
|
+
*/
|
|
92
|
+
/*
|
|
93
|
+
* A morphing dialog travels between two explicit geometries; see
|
|
94
|
+
* `useMorphFrom`. Everything here is keyed off `data-morph-state`, so the
|
|
95
|
+
* exit is the entrance with the value flipped rather than a second animation.
|
|
96
|
+
*/
|
|
97
|
+
.dialog-module_dialog-content__FgQr2[data-morph] {
|
|
98
|
+
animation: none;
|
|
99
|
+
/*
|
|
100
|
+
* …and the stock EXIT must not hide the panel.
|
|
101
|
+
*
|
|
102
|
+
* `[data-state='closed']` pairs its keyframes with a bare `opacity: 0` to
|
|
103
|
+
* hold the faded-out state after they finish. Cancelling the animation above
|
|
104
|
+
* leaves that declaration standing on its own, so a morphing panel went
|
|
105
|
+
* transparent on the first frame of its exit and then travelled home
|
|
106
|
+
* invisibly. Which looks exactly like having no exit animation at all.
|
|
107
|
+
*/
|
|
108
|
+
opacity: 1;
|
|
109
|
+
/*
|
|
110
|
+
* Both of these belong to a panel whose box is being DRIVEN, and neither to
|
|
111
|
+
* one at rest — so they hang off the flag `pin()`/`release()` maintain
|
|
112
|
+
* rather than off `[data-morph]`.
|
|
113
|
+
*
|
|
114
|
+
* `overflow: hidden` is right while the box is a measured rectangle
|
|
115
|
+
* travelling between two sizes: content must not spill out of a panel that
|
|
116
|
+
* is still smaller than it. It is wrong the moment the panel arrives, where
|
|
117
|
+
* it overrode the base rule's `overflow-y: auto` and turned a dialog too
|
|
118
|
+
* tall for the screen into one whose lower half was simply cut off.
|
|
119
|
+
*
|
|
120
|
+
* The transition is scoped for the same reason: once the geometry is back
|
|
121
|
+
* with the stylesheet, `width` is `max-content` and `height` is `auto`, and
|
|
122
|
+
* animating a panel between two content-derived sizes every time a
|
|
123
|
+
* disclosure opens is a wobble, not a transition.
|
|
124
|
+
*/
|
|
125
|
+
}
|
|
126
|
+
.dialog-module_dialog-content__FgQr2[data-morph][data-morph-pinned] {
|
|
127
|
+
overflow: hidden;
|
|
128
|
+
transition: left 300ms var(--easing-default), top 300ms var(--easing-default), width 300ms var(--easing-default), height 300ms var(--easing-default);
|
|
129
|
+
}
|
|
130
|
+
.dialog-module_dialog-content__FgQr2[data-morph] {
|
|
131
|
+
/*
|
|
132
|
+
* What the tile already shows STAYS, and everything else fills in.
|
|
133
|
+
*
|
|
134
|
+
* A child marked `data-morph-keep` is the part the panel and the tile have
|
|
135
|
+
* in common — the name, its marks, the size. It is present from the first
|
|
136
|
+
* frame, so the panel opens as a bigger version of the tile rather than as
|
|
137
|
+
* an empty box that fills up. The rest are the fields the tile has no room
|
|
138
|
+
* for: they arrive as the box grows large enough to hold them, and they
|
|
139
|
+
* leave before it has finished collapsing.
|
|
140
|
+
*/
|
|
141
|
+
}
|
|
142
|
+
.dialog-module_dialog-content__FgQr2[data-morph] > *:not([data-morph-keep]) {
|
|
143
|
+
transition: opacity 160ms ease 90ms;
|
|
144
|
+
}
|
|
145
|
+
.dialog-module_dialog-content__FgQr2[data-morph][data-morph-state=from] > *:not([data-morph-keep]) {
|
|
146
|
+
opacity: 0;
|
|
147
|
+
transition-delay: 0ms;
|
|
148
|
+
}
|
|
149
|
+
|
|
80
150
|
@keyframes dialog-module_fadeIn__8JmIQ {
|
|
81
151
|
from {
|
|
82
152
|
opacity: 0;
|
|
@@ -16,11 +16,54 @@ export interface DialogCloseProps extends React.ButtonHTMLAttributes<HTMLButtonE
|
|
|
16
16
|
asChild?: boolean;
|
|
17
17
|
}
|
|
18
18
|
declare function DialogClose({ asChild, onClick, children, ...props }: DialogCloseProps): React.JSX.Element;
|
|
19
|
-
declare function DialogOverlay({ className, ...props }: React.HTMLAttributes<HTMLDivElement>
|
|
19
|
+
declare function DialogOverlay({ className, passThrough, ...props }: React.HTMLAttributes<HTMLDivElement> & {
|
|
20
|
+
passThrough?: boolean;
|
|
21
|
+
}): React.JSX.Element;
|
|
20
22
|
export type DialogContentProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
21
23
|
width?: 'max' | 'min';
|
|
24
|
+
/**
|
|
25
|
+
* Give the panel a real width instead of letting its content decide.
|
|
26
|
+
*
|
|
27
|
+
* `width` is `max-content`/`min-content`, which is fine for a confirm but
|
|
28
|
+
* wrong for anything with a form in it: the panel ends up as narrow as the
|
|
29
|
+
* longest line allows and every row inside is squashed. Takes the same
|
|
30
|
+
* vocabulary as `Container` — `text`, `content`, `wide`, or a CSS length —
|
|
31
|
+
* and stays capped by the viewport either way.
|
|
32
|
+
*/
|
|
33
|
+
measure?: 'text' | 'content' | 'wide' | (string & {});
|
|
34
|
+
/**
|
|
35
|
+
* The element the dialog came from, so it grows out of it and shrinks back
|
|
36
|
+
* into it rather than fading in over the top of the page.
|
|
37
|
+
*
|
|
38
|
+
* Pass the tile, row or card that was clicked. Where a modal has an obvious
|
|
39
|
+
* origin on screen, morphing from it says "this is that thing, larger" — a
|
|
40
|
+
* dialog that fades in centre-screen makes the reader find their place
|
|
41
|
+
* again when it closes.
|
|
42
|
+
*
|
|
43
|
+
* A `DOMRect` is accepted too, for the case where the origin has since been
|
|
44
|
+
* unmounted or moved.
|
|
45
|
+
*/
|
|
46
|
+
origin?: React.RefObject<HTMLElement | null> | DOMRect | null;
|
|
47
|
+
/**
|
|
48
|
+
* Whether the scrim takes the pointer.
|
|
49
|
+
*
|
|
50
|
+
* `blocking` (the default) is a modal in the usual sense: the page behind is
|
|
51
|
+
* dimmed and inert, and a click on the scrim dismisses.
|
|
52
|
+
*
|
|
53
|
+
* `pass-through` dims the page but leaves it live, for a panel that is a
|
|
54
|
+
* DETAIL VIEW of something still on screen — a tile in a grid, a row in a
|
|
55
|
+
* table. Clicking the next tile should show the next thing, not spend one
|
|
56
|
+
* click closing and a second one opening. The dialog still dismisses on a
|
|
57
|
+
* click that lands outside it, so a click on the empty background behaves as
|
|
58
|
+
* it always did; a handler that calls `stopPropagation()` keeps it open,
|
|
59
|
+
* which is how the tile says "I am taking this click".
|
|
60
|
+
*
|
|
61
|
+
* Scroll is not locked in this mode, for the same reason: the thing you want
|
|
62
|
+
* to look at next may be further down the page.
|
|
63
|
+
*/
|
|
64
|
+
overlay?: 'blocking' | 'pass-through';
|
|
22
65
|
};
|
|
23
|
-
declare function DialogContent({ className, children, width, ...props }: DialogContentProps): React.ReactPortal | null;
|
|
66
|
+
declare function DialogContent({ className, children, width, origin, measure, overlay, style, ...props }: DialogContentProps): React.ReactPortal | null;
|
|
24
67
|
declare function DialogHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
25
68
|
declare function DialogFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
26
69
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/ui/Dialog/dialog.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAI1F,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/ui/Dialog/dialog.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAI1F,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA8B/B,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,iBAAS,MAAM,CAAC,EACd,IAAI,EAAE,cAAc,EACpB,WAAmB,EACnB,YAAY,EACZ,YAAY,EACZ,QAAQ,GACT,EAAE,WAAW,qBAsBb;AAID,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACvF,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,iBAAS,aAAa,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,qBAclF;AAID,MAAM,WAAW,gBAAiB,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACrF,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,iBAAS,WAAW,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,qBAc9E;AAID,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,WAAmB,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,qBAgBlE;AAID,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG;IACtE,KAAK,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IACtB;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IACtD;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,OAAO,GAAG,IAAI,CAAC;IAC9D;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CAAC,EAAE,UAAU,GAAG,cAAc,CAAC;CACvC,CAAC;AA6MF,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,QAAQ,EACR,KAAa,EACb,MAAM,EACN,OAAO,EACP,OAAoB,EACpB,KAAK,EACL,GAAG,KAAK,EACT,EAAE,kBAAkB,4BAgIpB;AAID,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAIzE;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAUzE;AAED;;;;;;GAMG;AACH,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,OAAO,EACP,OAAc,EACd,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC7B,qBAuBA;AAED;;;;GAIG;AACH,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,OAAO,EACP,OAAiB,EACjB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC7B,qBAuBA;AAID,iBAAS,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,qBAEjE;AAED,OAAO,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,CAAC"}
|