@nxgt/material 2.7.1 → 2.9.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/CHANGELOG.md +201 -0
- package/README.md +9 -6
- package/dist/{_Uint8Array-JRUmWcRr.js → _Uint8Array-azThpjEP.js} +1 -1
- package/dist/{_overRest-DvC5rm5s.js → _overRest-DMn4Dt71.js} +1 -1
- package/dist/{abnfDiagram-O67JEVCF-Cl4ukf6a.js → abnfDiagram-O67JEVCF-D-rmT4BY.js} +4 -4
- package/dist/{architectureDiagram-NJMV4G6O-WmFlBQF5.js → architectureDiagram-NJMV4G6O-DOc_c_T9.js} +7 -7
- package/dist/{async-slice-OftEOtMA.js → async-slice-DhZDjEtw.js} +2 -2
- package/dist/{blockDiagram-BEXU5L5S-BM-gkWAO.js → blockDiagram-BEXU5L5S-BOsyK4E_.js} +11 -11
- package/dist/{c4Diagram-YGBWAQC7-D9xSt2QO.js → c4Diagram-YGBWAQC7-El4SkIzX.js} +8 -8
- package/dist/{channel-Dg92Hoym.js → channel-CnLB6790.js} +1 -1
- package/dist/{chunk-3FUC2YCW-Cf18L00V.js → chunk-3FUC2YCW-BCsKm3ZT.js} +8 -8
- package/dist/{chunk-5DYCD2WN-Cja1INgd.js → chunk-5DYCD2WN-Cd1zazNp.js} +3 -3
- package/dist/{chunk-6AEJRKK7-3YWRP4aV.js → chunk-6AEJRKK7-BLBlw8ui.js} +2 -2
- package/dist/{chunk-742MDFTN-Cs1qGiTK.js → chunk-742MDFTN-CsUjFyzK.js} +2 -2
- package/dist/{chunk-7INBJB4K-BY5n77ka.js → chunk-7INBJB4K-k-I67NSP.js} +6 -6
- package/dist/{chunk-7M6MHVWA-C3x6E3yT.js → chunk-7M6MHVWA-C3qpW8zM.js} +9 -9
- package/dist/{chunk-7PRAP22T-_Av9vcXz.js → chunk-7PRAP22T-0C6_H8Li.js} +1 -1
- package/dist/{chunk-GNY47TPC-D1E6DHDV.js → chunk-GNY47TPC-CzPNLW5k.js} +11 -11
- package/dist/{chunk-GTNCS2PH-BZ9WMD1v.js → chunk-GTNCS2PH-AJi9PVT7.js} +3 -3
- package/dist/{chunk-GWA4HPMP-Co-A6dtV.js → chunk-GWA4HPMP-B8jXI0Tl.js} +3 -3
- package/dist/{chunk-MBY4JIJT-C3RQP_Nk.js → chunk-MBY4JIJT-BFIqOe-8.js} +4 -4
- package/dist/{chunk-NETBCI7D-DJUuN4EY.js → chunk-NETBCI7D-tNinefdn.js} +1 -1
- package/dist/{chunk-O7XYJQB3-A66QSOPA.js → chunk-O7XYJQB3-BChweQ_V.js} +1 -1
- package/dist/{chunk-UA2S7LBM-BNeHeMx9.js → chunk-UA2S7LBM-ChuksCDg.js} +6 -6
- package/dist/{chunk-WEXAMYUT-CucJfehv.js → chunk-WEXAMYUT-CbFOhEve.js} +2 -2
- package/dist/{chunk-XXDRQBXY-FgXU14Bh.js → chunk-XXDRQBXY-dKXxu_aj.js} +1 -1
- package/dist/{chunk-Z7XXMR3K-DMTBxZxM.js → chunk-Z7XXMR3K-C9P-XjM2.js} +8 -8
- package/dist/{chunk-ZIGJFQKS-C3xUAXJq.js → chunk-ZIGJFQKS-9VXArDKF.js} +3 -3
- package/dist/{classDiagram-v2-NBCMYWYE-BDaxYvDy.js → classDiagram-v2-NBCMYWYE-D00ZobEC.js} +14 -14
- package/dist/clsx-CbxlCXZ3.js +16 -0
- package/dist/components/base-content.css +139 -0
- package/dist/components/base.css +150 -0
- package/dist/components/components.css +2 -0
- package/dist/components/reduced-motion.css +56 -0
- package/dist/components/theme-tokens.css +116 -0
- package/dist/components/ui/actions/button-group/button-group.css +1 -1
- package/dist/components/ui/feedback/toast/toast.css +21 -0
- package/dist/components/ui/primitives/label/label.css +33 -0
- package/dist/{components-DrStgM4J.js → components-km60bAdr.js} +34658 -34218
- package/dist/components.js +6 -6
- package/dist/{cose-bilkent-JH36ORCC-DRUT3qBb.js → cose-bilkent-JH36ORCC-P94vkHv_.js} +2 -2
- package/dist/{cynefinDiagram-VND7K2PF-B9HrdQW8.js → cynefinDiagram-VND7K2PF-EIpXbLXm.js} +4 -4
- package/dist/{dagre-6A5THRUB-DZF0nICj.js → dagre-6A5THRUB-D_F3_LlW.js} +20 -20
- package/dist/{diagram-22UHCM2B-CVZYpeev.js → diagram-22UHCM2B-CsxOExpW.js} +15 -15
- package/dist/{diagram-3UASUU5V-D7MmBJbM.js → diagram-3UASUU5V-Dl7AETV1.js} +7 -7
- package/dist/{diagram-ATOU4E4O-CNY-8kl0.js → diagram-ATOU4E4O-isL7nwg2.js} +3 -3
- package/dist/{diagram-CDSNMT55-C8Mk1smi.js → diagram-CDSNMT55-Bnhlo5at.js} +5 -5
- package/dist/{diagram-MLGK6HIB-CpfeILwW.js → diagram-MLGK6HIB-DvBcyz8v.js} +4 -4
- package/dist/{diagram-MPIPVDR6-Do7bUnTd.js → diagram-MPIPVDR6-iTevwmNE.js} +4 -4
- package/dist/{dist-C3YK_ean.js → dist-B6_-RPZ3.js} +1 -1
- package/dist/{dist-CRbPtqwD.js → dist-BvUQHUs_.js} +4 -4
- package/dist/dnd.js +1 -1
- package/dist/{ebnfDiagram-ZINNZB2B-1GewX9Zq.js → ebnfDiagram-ZINNZB2B-RVuQIpm0.js} +4 -4
- package/dist/{elk-276RUBZZ-DI4eicFj.js → elk-276RUBZZ-BK-NMLiI.js} +26 -26
- package/dist/{erDiagram-OPXOYQCR-CUbpVns3.js → erDiagram-OPXOYQCR-DC1GgS4l.js} +14 -14
- package/dist/field-blur--x_n3oMy.js +3637 -0
- package/dist/flowDiagram-KWPJA3E3-BUSlDNQP.js +17 -0
- package/dist/{ganttDiagram-FUAMR5RP-D3vmspam.js → ganttDiagram-FUAMR5RP-DOp1p_x0.js} +6 -6
- package/dist/{gitGraphDiagram-X574FWY7-80yOq8dE.js → gitGraphDiagram-X574FWY7-DerJL1Q-.js} +3 -3
- package/dist/{graphlib-DLJn7qS3.js → graphlib-DLjE3QPd.js} +6 -6
- package/dist/hooks.js +3 -3
- package/dist/{i18n-provider-DBFRz5uH.js → i18n-provider-CQL7fqLy.js} +1 -1
- package/dist/i18n.js +6 -6
- package/dist/icon-button-G9zdQ3Ix.js +2753 -0
- package/dist/{infoDiagram-VRGFBTTK-Cboh-B9n.js → infoDiagram-VRGFBTTK-CtVsLyCQ.js} +3 -3
- package/dist/{isArrayLikeObject-CO5xeuaJ.js → isArrayLikeObject-CO-5KAzG.js} +3 -3
- package/dist/{isEmpty-DOC38Ces.js → isEmpty-Bl1drJE7.js} +3 -3
- package/dist/{ishikawaDiagram-OU5B5YK6-DwTd1YxL.js → ishikawaDiagram-OU5B5YK6-D1n8vp8C.js} +4 -4
- package/dist/{journeyDiagram-ZHPQQLJL-Dxvl3oeN.js → journeyDiagram-ZHPQQLJL-DuQ9Th0y.js} +4 -4
- package/dist/{kanban-definition-PNTS6WVX-S8plI4wn.js → kanban-definition-PNTS6WVX-D1-Owjil.js} +10 -10
- package/dist/lib/components/ui/actions/button/busy-click-capture.d.ts +11 -0
- package/dist/lib/components/ui/actions/button/button-tones.d.ts +36 -0
- package/dist/lib/components/ui/actions/button/button.d.ts +19 -0
- package/dist/lib/components/ui/actions/button/button.wrap.d.ts +8 -0
- package/dist/lib/components/ui/actions/button/label-text.d.ts +10 -0
- package/dist/lib/components/ui/actions/button/use-click-lock.d.ts +18 -0
- package/dist/lib/components/ui/actions/copy-button/copy-button.d.ts +5 -1
- package/dist/lib/components/ui/actions/icon-button/icon-button.compound-variants.d.ts +114 -0
- package/dist/lib/components/ui/collections/data-table/hooks.d.ts +13 -13
- package/dist/lib/components/ui/collections/data-table/partials/data-table-empty-row.d.ts +5 -1
- package/dist/lib/components/ui/collections/data-table/partials/data-table-scroll-region.d.ts +16 -0
- package/dist/lib/components/ui/collections/data-table/partials/data-table-toolbar.d.ts +24 -0
- package/dist/lib/components/ui/collections/data-table/select-checkbox.d.ts +10 -0
- package/dist/lib/components/ui/collections/data-table/types.d.ts +9 -0
- package/dist/lib/components/ui/collections/data-table/use-data-table.d.ts +12 -1
- package/dist/lib/components/ui/collections/data-table/use-scroll-edges.d.ts +22 -0
- package/dist/lib/components/ui/dates/calendar/calendar-day.d.ts +8 -0
- package/dist/lib/components/ui/dates/calendar/calendar.d.ts +3 -3
- package/dist/lib/components/ui/dates/calendar/calendar.utils.d.ts +8 -0
- package/dist/lib/components/ui/dates/calendar/use-calendar-labels.d.ts +22 -0
- package/dist/lib/components/ui/display/description/description.d.ts +2 -1
- package/dist/lib/components/ui/display/list-tile/list-tile.d.ts +9 -1
- package/dist/lib/components/ui/display/list-tile/partials/list-tile-body.d.ts +11 -0
- package/dist/lib/components/ui/display/list-tile/partials/list-tile-classes.d.ts +10 -0
- package/dist/lib/components/ui/feedback/alert-dialog/alert-dialog.d.ts +1 -1
- package/dist/lib/components/ui/feedback/toast/partials/toast-actions.d.ts +3 -0
- package/dist/lib/components/ui/feedback/toast/toast.d.ts +27 -3
- package/dist/lib/components/ui/feedback/toast/toaster.d.ts +19 -0
- package/dist/lib/components/ui/feedback/toast/toasts.d.ts +3 -0
- package/dist/lib/components/ui/forms/field-blur.d.ts +7 -2
- package/dist/lib/components/ui/forms/use-field-blur.d.ts +8 -1
- package/dist/lib/components/ui/layout/app-shell/activity-content.d.ts +10 -1
- package/dist/lib/components/ui/layout/app-shell/activity-layout.d.ts +26 -2
- package/dist/lib/components/ui/layout/app-shell/app-header.d.ts +8 -2
- package/dist/lib/components/ui/layout/app-shell/app-sidebar.d.ts +8 -2
- package/dist/lib/components/ui/layout/app-shell/types.d.ts +3 -0
- package/dist/lib/components/ui/layout/app-shell/use-content-scroll.d.ts +10 -0
- package/dist/lib/components/ui/layout/app-shell/use-navigation-sheet.d.ts +19 -0
- package/dist/lib/components/ui/layout/sidebar/index.d.ts +5 -0
- package/dist/lib/components/ui/layout/sidebar/sidebar-content.d.ts +2 -0
- package/dist/lib/components/ui/layout/sidebar/sidebar-context.d.ts +7 -0
- package/dist/lib/components/ui/layout/sidebar/sidebar-footer.d.ts +2 -0
- package/dist/lib/components/ui/layout/sidebar/sidebar-header.d.ts +2 -0
- package/dist/lib/components/ui/layout/sidebar/sidebar-menu-item-tooltip.d.ts +7 -0
- package/dist/lib/components/ui/layout/sidebar/sidebar-menu-item.d.ts +31 -0
- package/dist/lib/components/ui/layout/sidebar/sidebar-menu-label.d.ts +4 -0
- package/dist/lib/components/ui/layout/sidebar/sidebar.d.ts +1 -12
- package/dist/lib/components/ui/overlays/context-menu/context-menu-items.d.ts +10 -0
- package/dist/lib/components/ui/overlays/context-menu/context-menu-sub.d.ts +8 -0
- package/dist/lib/components/ui/overlays/context-menu/context-menu.d.ts +4 -14
- package/dist/lib/components/ui/overlays/dialog/dialog-outside.d.ts +6 -0
- package/dist/lib/components/ui/overlays/dialog/dialog-scroll-content.d.ts +1 -1
- package/dist/lib/components/ui/overlays/dialog/dialog.d.ts +1 -1
- package/dist/lib/components/ui/overlays/dialog/use-return-focus.d.ts +3 -2
- package/dist/lib/components/ui/overlays/drawer/drawer.d.ts +1 -1
- package/dist/lib/components/ui/overlays/dropdown-menu/dropdown-menu-items.d.ts +11 -0
- package/dist/lib/components/ui/overlays/dropdown-menu/dropdown-menu-sub.d.ts +8 -0
- package/dist/lib/components/ui/overlays/dropdown-menu/dropdown-menu.d.ts +6 -21
- package/dist/lib/components/ui/overlays/popover/popover.d.ts +1 -1
- package/dist/lib/components/ui/overlays/sheet/sheet.d.ts +1 -1
- package/dist/lib/components/ui/primitives/card/card.d.ts +10 -1
- package/dist/lib/components/ui/primitives/link/link-component.d.ts +14 -0
- package/dist/lib/components/ui/primitives/tabs/partials/tabs-content.d.ts +3 -0
- package/dist/lib/components/ui/primitives/tabs/partials/tabs-indicator.d.ts +13 -0
- package/dist/lib/components/ui/primitives/tabs/partials/tabs-list.d.ts +3 -0
- package/dist/lib/components/ui/primitives/tabs/partials/tabs-trigger.d.ts +6 -0
- package/dist/lib/components/ui/primitives/tabs/tabs-classes.d.ts +27 -0
- package/dist/lib/components/ui/primitives/tabs/tabs-variant.d.ts +5 -0
- package/dist/lib/components/ui/primitives/tabs/tabs.d.ts +11 -7
- package/dist/lib/components/ui/selection/select/select.d.ts +1 -1
- package/dist/lib/components/ui/selection/select-chip-field/select-chip-field.d.ts +1 -1
- package/dist/lib/components/ui/widgets/emoji/types.d.ts +1 -6
- package/dist/lib/i18n/resources/en/en.d.ts +23 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +28 -5
- package/dist/lib/i18n/resources/fr/fr.d.ts +23 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +28 -5
- package/dist/lib/i18n/resources/resources.d.ts +46 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib/lib/redux/status-slice.d.ts +1 -1
- package/dist/lib.js +39 -55
- package/dist/main.js +13 -13
- package/dist/map.js +35 -35
- package/dist/material.css +1 -1
- package/dist/{merge-CuDTNgpm.js → merge-CwwtONfp.js} +4 -4
- package/dist/{mermaid.core-O7mtb1-p.js → mermaid.core-Dfr4zfuP.js} +49 -49
- package/dist/{mindmap-definition-NLK3R4M7-CO0E97EZ.js → mindmap-definition-NLK3R4M7-_qKWGSrk.js} +13 -13
- package/dist/{pegDiagram-GJSIUBJH-CAO6aYvj.js → pegDiagram-GJSIUBJH-CWKobqLl.js} +4 -4
- package/dist/{pieDiagram-5QR66LMP-BXxVfv5K.js → pieDiagram-5QR66LMP-B6at48Bd.js} +5 -5
- package/dist/print.js +2 -2
- package/dist/{quadrantDiagram-O4NWA36T-BbidZDM8.js → quadrantDiagram-O4NWA36T-Cr9bA0xJ.js} +3 -3
- package/dist/{railroadDiagram-XR7U4H2S-DmKDXg8V.js → railroadDiagram-XR7U4H2S-fsZ7oqPG.js} +4 -4
- package/dist/{requirementDiagram-PLB6GJNP-wFvgSWJP.js → requirementDiagram-PLB6GJNP-BBs-lByV.js} +13 -13
- package/dist/rolldown-runtime-BFFgcFxR.js +30 -0
- package/dist/{sankeyDiagram-IPEJSGJF-Cka5t09q.js → sankeyDiagram-IPEJSGJF-BzX37jGY.js} +3 -3
- package/dist/{sequenceDiagram-PO4LG4MO-B2qb55A5.js → sequenceDiagram-PO4LG4MO-Bgx1kuGA.js} +5 -5
- package/dist/{sortable-provider-C5VYhY8u.js → sortable-provider-WZT5I34N.js} +24 -24
- package/dist/{src-C9kQSo6K.js → src-CsLQInsN.js} +1 -1
- package/dist/{stateDiagram-v2-GCMORJYK-EMa7q3ju.js → stateDiagram-v2-GCMORJYK-Chc9Z6Mr.js} +14 -14
- package/dist/{stored-language-B0o4cBh8.js → stored-language-BW32owje.js} +56 -10
- package/dist/styles.css +10 -368
- package/dist/{swimlanes-2SLR337P-BtZ7Di5u.js → swimlanes-2SLR337P-D0yLvfot.js} +12 -12
- package/dist/swimlanesDiagram-TC7HE7FX-BOd0Czfs.js +28 -0
- package/dist/{timeline-definition-EJHVYXUP-2Z6UABw8.js → timeline-definition-EJHVYXUP-nDNR-Dt-.js} +5 -5
- package/dist/{translate-material-BCwQrt2G.js → translate-material-ZEzF-LKH.js} +2 -2
- package/dist/{translator-CwpmpI24.js → translator-BfqVlNGW.js} +1 -1
- package/dist/{use-heading-spy-BtBJiU63.js → use-heading-spy-DvZVu15k.js} +37 -37
- package/dist/{use-material-translation-DG_7z3Q7.js → use-material-translation-B2GUtxUY.js} +2 -2
- package/dist/{usecaseDiagram-POWQR4AR-DT56cp_B.js → usecaseDiagram-POWQR4AR-Bwen99ay.js} +13 -13
- package/dist/{utils-UBn-46YY.js → utils-DC8bw9A_.js} +346 -360
- package/dist/{vennDiagram-UO4OBE2U-CO0yFCI8.js → vennDiagram-UO4OBE2U-BpgP__1T.js} +4 -4
- package/dist/{wardleyDiagram-VNRHLVJA-QkwghAYo.js → wardleyDiagram-VNRHLVJA-CYqKMb2f.js} +4 -4
- package/dist/{xychartDiagram-PMCCYNJV-B2aZlrno.js → xychartDiagram-PMCCYNJV-b-Quuxoi.js} +7 -7
- package/docs/components/buttons-and-actions.md +60 -10
- package/docs/components/data-display.md +24 -2
- package/docs/components/data-table-filter-and-lists.md +88 -10
- package/docs/components/date-and-time.md +24 -0
- package/docs/components/feedback-and-status.md +85 -8
- package/docs/components/form-fields.md +14 -5
- package/docs/components/media-and-files.md +7 -0
- package/docs/components/navigation-and-layout.md +21 -3
- package/docs/components/overlays-and-menus.md +21 -6
- package/docs/components/primitives.md +96 -7
- package/docs/components/rich-widgets.md +10 -0
- package/docs/components/selection-and-choice.md +13 -2
- package/docs/getting-started.md +4 -2
- package/docs/guides/app-shell.md +97 -4
- package/docs/guides/forms.md +54 -5
- package/docs/guides/helpers.md +2 -2
- package/docs/guides/i18n.md +24 -4
- package/docs/guides/ssr.md +1 -1
- package/docs/guides/theming.md +147 -5
- package/docs/previews/data-display-codegroup.webp +0 -0
- package/docs/previews/data-display-description.webp +0 -0
- package/docs/previews/feedback-status-toast.webp +0 -0
- package/docs/previews/primitives-tabs.webp +0 -0
- package/docs/previews/rich-widgets-emojipicker.webp +0 -0
- package/docs/roadmap.md +29 -1
- package/docs/troubleshooting.md +937 -11
- package/lib/components/base-content.css +139 -0
- package/lib/components/base.css +150 -0
- package/lib/components/components.css +2 -0
- package/lib/components/reduced-motion.css +56 -0
- package/lib/components/theme-tokens.css +116 -0
- package/lib/components/ui/actions/button-group/button-group.css +1 -1
- package/lib/components/ui/feedback/toast/toast.css +21 -0
- package/lib/components/ui/primitives/label/label.css +33 -0
- package/lib/styles.css +10 -368
- package/package.json +2 -2
- package/dist/field-blur-DWQtxiAe.js +0 -3483
- package/dist/flowDiagram-KWPJA3E3-DZxumFfu.js +0 -17
- package/dist/icon-button-BxySFfrr.js +0 -2718
- package/dist/lib/components/ui/widgets/emoji/emoji.groups.d.ts +0 -6
- package/dist/swimlanesDiagram-TC7HE7FX-CROh8GTF.js +0 -28
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
type ListTileBodyProps = {
|
|
3
|
+
leading?: ReactNode;
|
|
4
|
+
trailing?: ReactNode;
|
|
5
|
+
title: ReactNode;
|
|
6
|
+
subtitle?: ReactNode;
|
|
7
|
+
compact: boolean;
|
|
8
|
+
selected?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare function ListTileBody({ leading, trailing, title, subtitle, compact, selected, }: ListTileBodyProps): import("react").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type ListTileClassesOptions = {
|
|
2
|
+
compact: boolean;
|
|
3
|
+
selected: boolean;
|
|
4
|
+
interactive: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
/** The classes shared by the tile's three elements (link, button, div). */
|
|
9
|
+
export declare function listTileClasses({ compact, selected, interactive, disabled, className, }: ListTileClassesOptions): string;
|
|
10
|
+
export {};
|
|
@@ -5,7 +5,7 @@ declare function AlertDialog({ ...props }: ComponentProps<typeof AlertDialogPrim
|
|
|
5
5
|
declare function AlertDialogTrigger({ children, asChild, ...props }: ComponentProps<typeof AlertDialogPrimitive.Trigger>): import("react").JSX.Element;
|
|
6
6
|
declare function AlertDialogPortal({ ...props }: ComponentProps<typeof AlertDialogPrimitive.Portal>): import("react").JSX.Element;
|
|
7
7
|
declare function AlertDialogOverlay({ className, ...props }: ComponentProps<typeof AlertDialogPrimitive.Overlay>): import("react").JSX.Element;
|
|
8
|
-
declare function AlertDialogContent({ className, onOpenAutoFocus, onCloseAutoFocus, ...props }: ComponentProps<typeof AlertDialogPrimitive.Content>): import("react").JSX.Element;
|
|
8
|
+
declare function AlertDialogContent({ className, onOpenAutoFocus, onCloseAutoFocus, onEscapeKeyDown, ref, ...props }: ComponentProps<typeof AlertDialogPrimitive.Content>): import("react").JSX.Element;
|
|
9
9
|
declare function AlertDialogHeader({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
10
10
|
declare function AlertDialogFooter({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
11
11
|
declare function AlertDialogTitle({ className, ...props }: ComponentProps<typeof AlertDialogPrimitive.Title>): import("react").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ToastProps } from '../toast';
|
|
2
|
+
/** The toast's `action` and, beside it, the small close (X) icon button. */
|
|
3
|
+
export declare function ToastActions({ id, action, dismissLabel, }: Pick<ToastProps, 'id' | 'action' | 'dismissLabel'>): import("react").JSX.Element | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { ExternalToast, toast as sonnerToast
|
|
2
|
+
import { ExternalToast, toast as sonnerToast } from 'sonner';
|
|
3
3
|
/**
|
|
4
4
|
* A toast's action: a labelled button that runs `onClick` and dismisses the
|
|
5
5
|
* toast, or a render function given `dismiss` for anything else.
|
|
@@ -15,10 +15,34 @@ export type ToastProps = {
|
|
|
15
15
|
icon?: ReactNode;
|
|
16
16
|
className?: string;
|
|
17
17
|
action?: ToastAction;
|
|
18
|
+
/**
|
|
19
|
+
* Live-region role of the toast. None by default: the Toaster's own
|
|
20
|
+
* `aria-live="polite"` region already announces every toast, and a role on
|
|
21
|
+
* each one nests a second live region (read twice by some screen readers).
|
|
22
|
+
* `toasts.error` sets `alert`, which interrupts. A Toast rendered outside a
|
|
23
|
+
* Toaster needs its own live region.
|
|
24
|
+
*/
|
|
25
|
+
role?: 'status' | 'alert';
|
|
26
|
+
/**
|
|
27
|
+
* Accessible name of the small close (X) icon button shown beside the
|
|
28
|
+
* `action`. `toast()` defaults it to the translated
|
|
29
|
+
* `material.toast.buttons.close` whenever an `action` is given; pass your
|
|
30
|
+
* own to rename it, or `''` to hide the button. Escape closes a toast
|
|
31
|
+
* whenever focus is inside it, with or without this button.
|
|
32
|
+
*/
|
|
33
|
+
dismissLabel?: string;
|
|
18
34
|
};
|
|
19
35
|
export type ToastMethodProps = Omit<ToastProps, 'id'> & {
|
|
20
36
|
options?: ExternalToast;
|
|
21
37
|
};
|
|
38
|
+
/**
|
|
39
|
+
* Shows a toast. One with an `action` stays until dismissed (WCAG 2.2.1: an
|
|
40
|
+
* auto-dismissed action cannot be reached by a keyboard or screen-reader user
|
|
41
|
+
* in time) unless `options.duration` says otherwise, and gets a close (X)
|
|
42
|
+
* button named by `dismissLabel`, by default the translated
|
|
43
|
+
* `material.toast.buttons.close`.
|
|
44
|
+
*/
|
|
22
45
|
declare function toast({ options, ...props }: ToastMethodProps): string | number;
|
|
23
|
-
export declare function Toast({ icon, title, description, action, className, id, }: ToastProps): import("react").JSX.Element;
|
|
24
|
-
export {
|
|
46
|
+
export declare function Toast({ icon, title, description, action, className, id, role, dismissLabel, }: ToastProps): import("react").JSX.Element;
|
|
47
|
+
export { Toaster, type ToasterProps } from './toaster';
|
|
48
|
+
export { sonnerToast, toast };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { Toaster as SonnerToaster } from 'sonner';
|
|
3
|
+
/** Sonner's `Toaster` props, `ref` included (it is a forwardRef component). */
|
|
4
|
+
export type ToasterProps = ComponentProps<typeof SonnerToaster>;
|
|
5
|
+
/**
|
|
6
|
+
* Sonner's `Toaster`, with every prop forwarded, and two changes for phones.
|
|
7
|
+
*
|
|
8
|
+
* - **Top on a phone.** Under 600px, with no `position` given, toasts show
|
|
9
|
+
* at the top (`top-center`): at the bottom, across the whole width, they
|
|
10
|
+
* covered what a form keeps there, its submit button first. A `position`
|
|
11
|
+
* applies on every screen. The server and the hydrating client render the
|
|
12
|
+
* desktop default (`bottom-right`); a phone moves on once hydrated.
|
|
13
|
+
* - **A tap does not pause.** A toast pauses while a mouse hovers it (WCAG
|
|
14
|
+
* 2.2.1); a tap on a phone reads as a mouse that arrives and never leaves,
|
|
15
|
+
* which paused the toast until the next tap elsewhere. The hover a tap
|
|
16
|
+
* emulates is ignored (`@nxgt/material-core/touch-hover`): the toast
|
|
17
|
+
* pauses while the finger is down, and its timer runs again once lifted.
|
|
18
|
+
*/
|
|
19
|
+
export declare function Toaster({ position, ...props }: ToasterProps): import("react").JSX.Element;
|
|
@@ -16,6 +16,9 @@ declare function dismiss(id?: string | number): string | number;
|
|
|
16
16
|
* toasts - Semantic toast helpers built on top of {@link toast}.
|
|
17
17
|
*
|
|
18
18
|
* Each variant ships a default FontAwesome duotone icon and color mapping.
|
|
19
|
+
* A caller's `action` is kept: `toast()` shows it with a close icon button
|
|
20
|
+
* beside it and keeps the toast until dismissed unless `options.duration`
|
|
21
|
+
* says otherwise.
|
|
19
22
|
* `success`/`info`/`error` default to a "Close" action button (sourced from
|
|
20
23
|
* `material.toast.buttons.close`); `success`/`error` also default their title
|
|
21
24
|
* to a translated "Success"/"Error" string. `loading` swaps the icon for
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { ReactNode, RefCallback } from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* Calls `onBlur` (React Hook Form's `field.onBlur`) when focus leaves the
|
|
4
4
|
* field rendered inside it and whatever overlay that field opened. The field
|
|
5
5
|
* marks its root with `useFieldBlurRoot()`. Renders no element of its own, so
|
|
6
6
|
* the form's layout is untouched. Not exported: the wrappers use it.
|
|
7
|
+
*
|
|
8
|
+
* `focusRef` (React Hook Form's `field.ref`) is what makes
|
|
9
|
+
* `shouldFocusError` and `setError(..., { shouldFocus: true })` work: see
|
|
10
|
+
* `useFieldBlur`.
|
|
7
11
|
*/
|
|
8
|
-
export declare function FieldBlur({ onBlur, children, }: {
|
|
12
|
+
export declare function FieldBlur({ onBlur, focusRef, children, }: {
|
|
9
13
|
onBlur: () => void;
|
|
14
|
+
focusRef?: RefCallback<unknown>;
|
|
10
15
|
children: ReactNode;
|
|
11
16
|
}): import("react").JSX.Element;
|
|
@@ -23,5 +23,12 @@ import { RefCallback } from 'react';
|
|
|
23
23
|
* Returns a ref callback for the field's root element(s): every element it is
|
|
24
24
|
* given counts as the field. `FieldBlur` hands it to the component through
|
|
25
25
|
* context (`useFieldBlurRoot`). Browser-only: nothing runs on the server.
|
|
26
|
+
*
|
|
27
|
+
* `focusRef` is React Hook Form's `field.ref`. React Hook Form focuses the
|
|
28
|
+
* first invalid field (`shouldFocusError`, `setError(..., { shouldFocus:
|
|
29
|
+
* true })`) by calling `focus()` on what that ref is given, and a field made
|
|
30
|
+
* of several controls has no one element to give it: it is given a handle
|
|
31
|
+
* that focuses the first control inside the field's roots, looked up when
|
|
32
|
+
* `focus()` is called.
|
|
26
33
|
*/
|
|
27
|
-
export declare function useFieldBlur(onBlur: () => void): RefCallback<Element>;
|
|
34
|
+
export declare function useFieldBlur(onBlur: () => void, focusRef?: RefCallback<unknown>): RefCallback<Element>;
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
export type ActivityContentTitleElement = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div';
|
|
2
3
|
export type ActivityContentProps = {
|
|
3
4
|
title?: ReactNode;
|
|
4
5
|
subtitle?: ReactNode;
|
|
5
6
|
actions?: ReactNode;
|
|
6
7
|
hideHeader?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* The element of the title. `'h1'` by default: a screen's title is the
|
|
10
|
+
* page's top heading — the shell around it renders none. Pass `'h2'` when
|
|
11
|
+
* the screen sits under a heading of your own, `'div'` for no heading.
|
|
12
|
+
*/
|
|
13
|
+
titleAs?: ActivityContentTitleElement;
|
|
7
14
|
/**
|
|
8
15
|
* Replaces the header entirely. Without it the header is built from
|
|
9
16
|
* `title`, `subtitle` and `actions`.
|
|
@@ -14,5 +21,7 @@ export type ActivityContentProps = {
|
|
|
14
21
|
* One screen inside {@link ActivityLayout}: a header card, then the content.
|
|
15
22
|
*
|
|
16
23
|
* Every leaf route renders this; the layout itself is mounted once, higher up.
|
|
24
|
+
* The header wraps: on a narrow screen the actions go under the title instead
|
|
25
|
+
* of squeezing it.
|
|
17
26
|
*/
|
|
18
|
-
export declare function ActivityContent({ title, subtitle, header, actions, hideHeader, children, className, ...props }: ActivityContentProps): import("react").JSX.Element;
|
|
27
|
+
export declare function ActivityContent({ title, subtitle, header, actions, hideHeader, titleAs: Title, children, className, ...props }: ActivityContentProps): import("react").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
-
import { MenuItem } from './types';
|
|
2
|
+
import { AppShellLinkComponent, MenuItem } from './types';
|
|
3
3
|
export type ActivityLayoutProps = {
|
|
4
4
|
items: MenuItem[];
|
|
5
5
|
/** Passed to the sidebar header. */
|
|
@@ -8,6 +8,26 @@ export type ActivityLayoutProps = {
|
|
|
8
8
|
headerActions?: ReactNode;
|
|
9
9
|
/** Passed to the header. An image URL, or a whole node. */
|
|
10
10
|
avatar?: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* The link each menu entry renders, given its `href`. Defaults to React
|
|
13
|
+
* Router's `Link`; pass another for a different router.
|
|
14
|
+
*/
|
|
15
|
+
linkComponent?: AppShellLinkComponent;
|
|
16
|
+
/**
|
|
17
|
+
* The element of the content region. `'main'` (the default) makes it the
|
|
18
|
+
* page's `<main>` landmark; pass `'div'` when your app renders its own
|
|
19
|
+
* `<main>` around or inside the shell — a page has only one.
|
|
20
|
+
*/
|
|
21
|
+
contentAs?: 'main' | 'div';
|
|
22
|
+
/**
|
|
23
|
+
* Who scrolls. `'document'` (the default): the page grows with its content
|
|
24
|
+
* and the browser scrolls it, the header and the sidebar staying in view.
|
|
25
|
+
* `'container'`: the shell is exactly one screen high and the content
|
|
26
|
+
* region scrolls inside it — for a screen that manages its own height
|
|
27
|
+
* (a full-height map, a kanban board). The region then starts each new
|
|
28
|
+
* location at the top, and Back returns to where that page was left.
|
|
29
|
+
*/
|
|
30
|
+
scroll?: 'document' | 'container';
|
|
11
31
|
} & ComponentProps<'div'>;
|
|
12
32
|
/**
|
|
13
33
|
* The application chrome: sidebar, header, breadcrumbs, and the routed content.
|
|
@@ -18,5 +38,9 @@ export type ActivityLayoutProps = {
|
|
|
18
38
|
* `items` is a prop rather than a hook call so the shell holds no opinion
|
|
19
39
|
* about how an app builds or filters its menu — which is exactly what kept
|
|
20
40
|
* this component copied into three apps instead of shared.
|
|
41
|
+
*
|
|
42
|
+
* Sized `100%` wide and at least `100dvh` high: `100lvw` counted the
|
|
43
|
+
* scrollbar (a page a few pixels too wide) and `100lvh` the height behind a
|
|
44
|
+
* phone's toolbar (the bottom of the screen hidden).
|
|
21
45
|
*/
|
|
22
|
-
export declare function ActivityLayout({ items, brand, headerActions, avatar, children, className, ...props }: ActivityLayoutProps): import("react").JSX.Element;
|
|
46
|
+
export declare function ActivityLayout({ items, brand, headerActions, avatar, linkComponent, contentAs: Content, scroll, children, className, ...props }: ActivityLayoutProps): import("react").JSX.Element;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
|
-
import { MenuItem } from './types';
|
|
2
|
+
import { AppShellLinkComponent, MenuItem } from './types';
|
|
3
3
|
export type AppHeaderProps = {
|
|
4
4
|
className?: string;
|
|
5
5
|
showMenuIcon?: boolean;
|
|
6
6
|
items: MenuItem[];
|
|
7
|
+
/** The link of each menu entry; see {@link AppShellLinkComponent}. */
|
|
8
|
+
linkComponent?: AppShellLinkComponent;
|
|
7
9
|
/** Rendered before the avatar — notifications, help, a theme toggle. */
|
|
8
10
|
actions?: ReactNode;
|
|
9
11
|
/** An image URL, or a whole node when the app renders its own. */
|
|
@@ -17,5 +19,9 @@ export type AppHeaderProps = {
|
|
|
17
19
|
* `avatar` and `actions` are props rather than an auth hook — the shell has no
|
|
18
20
|
* opinion about where a session comes from, and the two apps that will consume
|
|
19
21
|
* it get theirs from entirely different places.
|
|
22
|
+
*
|
|
23
|
+
* It needs a React Router context, even used on its own outside
|
|
24
|
+
* {@link ActivityLayout}: the menu sheet reads the location to close when it
|
|
25
|
+
* changes, and `useLocation` throws outside a router.
|
|
20
26
|
*/
|
|
21
|
-
export declare function AppHeader({ items, className, children, actions, avatar, showMenuIcon, }: AppHeaderProps): import("react").JSX.Element;
|
|
27
|
+
export declare function AppHeader({ items, linkComponent, className, children, actions, avatar, showMenuIcon, }: AppHeaderProps): import("react").JSX.Element;
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { SidebarProps } from '../sidebar/sidebar';
|
|
2
|
-
import { MenuItem } from './types';
|
|
2
|
+
import { AppShellLinkComponent, MenuItem } from './types';
|
|
3
3
|
export type AppSidebarProps = {
|
|
4
4
|
items: MenuItem[];
|
|
5
5
|
/** Replaces the header block entirely — a logo, a product name, both. */
|
|
6
6
|
brand?: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* The link each entry renders, given its `href`. Defaults to React Router's
|
|
9
|
+
* `Link` (client-side navigation, router `basename`). Pass another to use a
|
|
10
|
+
* different router; see {@link AppShellLinkComponent}.
|
|
11
|
+
*/
|
|
12
|
+
linkComponent?: AppShellLinkComponent;
|
|
7
13
|
} & SidebarProps;
|
|
8
14
|
/**
|
|
9
15
|
* The application sidebar: a navigation entry per {@link MenuItem}, with the
|
|
@@ -14,4 +20,4 @@ export type AppSidebarProps = {
|
|
|
14
20
|
* {@link findActiveMenuItem} for why that cannot be decided one entry at a
|
|
15
21
|
* time once a menu is mounted anywhere but `/`.
|
|
16
22
|
*/
|
|
17
|
-
export declare function AppSidebar({ items, brand, className, withToggleIcon, expanded, onExpandedChange, ...props }: AppSidebarProps): import("react").JSX.Element;
|
|
23
|
+
export declare function AppSidebar({ items, brand, linkComponent, className, withToggleIcon, expanded, onExpandedChange, ...props }: AppSidebarProps): import("react").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { IconName } from '../../primitives/icon/icon';
|
|
3
|
+
import { LinkComponent } from '../../primitives/link/link-component';
|
|
3
4
|
/**
|
|
4
5
|
* One entry in the application sidebar.
|
|
5
6
|
*
|
|
@@ -22,3 +23,5 @@ export type MenuItem = {
|
|
|
22
23
|
*/
|
|
23
24
|
footer?: boolean;
|
|
24
25
|
};
|
|
26
|
+
/** The link of a menu entry: one contract with the sidebar's, see {@link LinkComponent}. */
|
|
27
|
+
export type AppShellLinkComponent = LinkComponent;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The scroll position of the content region when it is the one that scrolls
|
|
4
|
+
* (`scroll="container"`). That box outlives navigations, so without this a new
|
|
5
|
+
* screen opens at the previous one's position — and React Router's
|
|
6
|
+
* `ScrollRestoration` only handles the window. A new pathname starts at the
|
|
7
|
+
* top (a query or hash change — a filter, a tab, an anchor — keeps the
|
|
8
|
+
* position); Back and Forward (a `POP`) return to where that entry was left.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useContentScroll(box: RefObject<HTMLElement | null>, enabled: boolean): void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The open state of the header's menu sheet. It closes when a link inside it
|
|
4
|
+
* is followed and when the location changes (Back, a redirect), and focus then
|
|
5
|
+
* goes to `<main>`; closed by Escape, the close button or the overlay, focus
|
|
6
|
+
* returns to the menu button as usual.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useNavigationSheet(): {
|
|
9
|
+
open: boolean;
|
|
10
|
+
setOpen: import('react').Dispatch<import('react').SetStateAction<boolean>>;
|
|
11
|
+
/**
|
|
12
|
+
* On the sheet's content: a followed link closes it. Not
|
|
13
|
+
* `defaultPrevented`: a router's link prevents the default to navigate
|
|
14
|
+
* on the client. A modified click opens a new tab and leaves it open.
|
|
15
|
+
*/
|
|
16
|
+
onClick(event: MouseEvent<HTMLElement>): void;
|
|
17
|
+
/** On the sheet's content: after a navigation, focus goes to `<main>`. */
|
|
18
|
+
onCloseAutoFocus(event: Event): void;
|
|
19
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether the enclosing `Sidebar` is expanded. An entry of an expanded
|
|
3
|
+
* sidebar shows its label, so it needs no tooltip repeating it — and one that
|
|
4
|
+
* opened on the first entry as a sheet moves focus in would cover the menu.
|
|
5
|
+
*/
|
|
6
|
+
export declare const SidebarExpandedContext: import('react').Context<boolean>;
|
|
7
|
+
export declare function useSidebarExpanded(): boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/** The entry, wrapped in its tooltip when it has one (see `tooltip`). */
|
|
3
|
+
export declare function MenuItemTooltip({ tooltip, label, children, }: {
|
|
4
|
+
tooltip?: ReactNode;
|
|
5
|
+
label?: ReactNode;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}): string | number | bigint | boolean | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { LinkComponent, LinkComponentProps } from '../../primitives/link/link-component';
|
|
3
|
+
/**
|
|
4
|
+
* What the link of a `SidebarMenuItem` receives: the anchor's props plus the
|
|
5
|
+
* `href`. It is the neutral {@link LinkComponentProps} contract: spread every
|
|
6
|
+
* prop (the tooltip's handlers, `data-state`, ...) and forward `ref`. A link
|
|
7
|
+
* that forwards only a table's `DataTableLinkProps` is not enough here.
|
|
8
|
+
*/
|
|
9
|
+
export type SidebarLinkProps = LinkComponentProps;
|
|
10
|
+
export type SidebarLinkComponent = LinkComponent;
|
|
11
|
+
type SidebarMenuItemOwnProps = {
|
|
12
|
+
icon?: ReactNode;
|
|
13
|
+
active?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Shown on hover and focus. Defaults to the label while the sidebar is
|
|
16
|
+
* collapsed, where the label is small; an expanded sidebar shows the label
|
|
17
|
+
* itself, so it gets no tooltip unless one is passed.
|
|
18
|
+
*/
|
|
19
|
+
tooltip?: ReactNode;
|
|
20
|
+
};
|
|
21
|
+
export type SidebarMenuItemProps = SidebarMenuItemOwnProps & ((ComponentProps<'button'> & {
|
|
22
|
+
href?: undefined;
|
|
23
|
+
linkComponent?: undefined;
|
|
24
|
+
}) | (Omit<ComponentProps<'a'>, 'href'> & {
|
|
25
|
+
/** Renders a real link instead of a `<button>`. */
|
|
26
|
+
href: string;
|
|
27
|
+
/** The link element; a plain `<a>` by default. */
|
|
28
|
+
linkComponent?: SidebarLinkComponent;
|
|
29
|
+
}));
|
|
30
|
+
export declare function SidebarMenuItem(props: SidebarMenuItemProps): import("react").JSX.Element;
|
|
31
|
+
export {};
|
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
import { ComponentProps
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
2
|
export type SidebarProps = {
|
|
3
3
|
expanded?: boolean;
|
|
4
4
|
onExpandedChange?: (expanded: boolean) => void;
|
|
5
5
|
withToggleIcon?: boolean;
|
|
6
6
|
} & ComponentProps<'div'>;
|
|
7
7
|
export declare function Sidebar({ expanded, children, className, onExpandedChange, withToggleIcon, ...props }: SidebarProps): import("react").JSX.Element;
|
|
8
|
-
export declare function SidebarContent({ children, className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
9
|
-
export declare function SidebarHeader({ children, className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
10
|
-
export declare function SidebarFooter({ children, className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
11
|
-
export declare function SidebarMenuLabel({ children, className, actions, ...props }: {
|
|
12
|
-
actions?: ReactNode;
|
|
13
|
-
} & ComponentProps<'div'>): import("react").JSX.Element;
|
|
14
|
-
export declare function SidebarMenuItem({ icon, children, className, active, tooltip, ...props }: {
|
|
15
|
-
icon?: ReactNode;
|
|
16
|
-
active?: boolean;
|
|
17
|
-
tooltip?: ReactNode;
|
|
18
|
-
} & ComponentProps<'button'>): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ContextMenu as ContextMenuPrimitive } from 'radix-ui';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
declare function ContextMenuRadioGroup({ ...props }: ComponentProps<typeof ContextMenuPrimitive.RadioGroup>): import("react").JSX.Element;
|
|
4
|
+
declare function ContextMenuItem({ className, inset, variant, ...props }: ComponentProps<typeof ContextMenuPrimitive.Item> & {
|
|
5
|
+
inset?: boolean;
|
|
6
|
+
variant?: 'default' | 'error';
|
|
7
|
+
}): import("react").JSX.Element;
|
|
8
|
+
declare function ContextMenuCheckboxItem({ className, children, checked, ...props }: ComponentProps<typeof ContextMenuPrimitive.CheckboxItem>): import("react").JSX.Element;
|
|
9
|
+
declare function ContextMenuRadioItem({ className, children, ...props }: ComponentProps<typeof ContextMenuPrimitive.RadioItem>): import("react").JSX.Element;
|
|
10
|
+
export { ContextMenuCheckboxItem, ContextMenuItem, ContextMenuRadioGroup, ContextMenuRadioItem, };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ContextMenu as ContextMenuPrimitive } from 'radix-ui';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
declare function ContextMenuSub({ ...props }: ComponentProps<typeof ContextMenuPrimitive.Sub>): import("react").JSX.Element;
|
|
4
|
+
declare function ContextMenuSubTrigger({ className, inset, children, ...props }: ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {
|
|
5
|
+
inset?: boolean;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
declare function ContextMenuSubContent({ className, ...props }: ComponentProps<typeof ContextMenuPrimitive.SubContent>): import("react").JSX.Element;
|
|
8
|
+
export { ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger };
|
|
@@ -4,22 +4,12 @@ declare function ContextMenu({ ...props }: ComponentProps<typeof ContextMenuPrim
|
|
|
4
4
|
declare function ContextMenuTrigger({ ...props }: ComponentProps<typeof ContextMenuPrimitive.Trigger>): import("react").JSX.Element;
|
|
5
5
|
declare function ContextMenuGroup({ ...props }: ComponentProps<typeof ContextMenuPrimitive.Group>): import("react").JSX.Element;
|
|
6
6
|
declare function ContextMenuPortal({ ...props }: ComponentProps<typeof ContextMenuPrimitive.Portal>): import("react").JSX.Element;
|
|
7
|
-
declare function
|
|
8
|
-
declare function ContextMenuRadioGroup({ ...props }: ComponentProps<typeof ContextMenuPrimitive.RadioGroup>): import("react").JSX.Element;
|
|
9
|
-
declare function ContextMenuSubTrigger({ className, inset, children, ...props }: ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {
|
|
10
|
-
inset?: boolean;
|
|
11
|
-
}): import("react").JSX.Element;
|
|
12
|
-
declare function ContextMenuSubContent({ className, ...props }: ComponentProps<typeof ContextMenuPrimitive.SubContent>): import("react").JSX.Element;
|
|
13
|
-
declare function ContextMenuContent({ className, ...props }: ComponentProps<typeof ContextMenuPrimitive.Content>): import("react").JSX.Element;
|
|
14
|
-
declare function ContextMenuItem({ className, inset, variant, ...props }: ComponentProps<typeof ContextMenuPrimitive.Item> & {
|
|
15
|
-
inset?: boolean;
|
|
16
|
-
variant?: 'default' | 'error';
|
|
17
|
-
}): import("react").JSX.Element;
|
|
18
|
-
declare function ContextMenuCheckboxItem({ className, children, checked, ...props }: ComponentProps<typeof ContextMenuPrimitive.CheckboxItem>): import("react").JSX.Element;
|
|
19
|
-
declare function ContextMenuRadioItem({ className, children, ...props }: ComponentProps<typeof ContextMenuPrimitive.RadioItem>): import("react").JSX.Element;
|
|
7
|
+
declare function ContextMenuContent({ className, ref, ...props }: ComponentProps<typeof ContextMenuPrimitive.Content>): import("react").JSX.Element;
|
|
20
8
|
declare function ContextMenuLabel({ className, inset, ...props }: ComponentProps<typeof ContextMenuPrimitive.Label> & {
|
|
21
9
|
inset?: boolean;
|
|
22
10
|
}): import("react").JSX.Element;
|
|
23
11
|
declare function ContextMenuSeparator({ className, ...props }: ComponentProps<typeof ContextMenuPrimitive.Separator>): import("react").JSX.Element;
|
|
24
12
|
declare function ContextMenuShortcut({ className, ...props }: ComponentProps<'span'>): import("react").JSX.Element;
|
|
25
|
-
export {
|
|
13
|
+
export { ContextMenuCheckboxItem, ContextMenuItem, ContextMenuRadioGroup, ContextMenuRadioItem, } from './context-menu-items';
|
|
14
|
+
export { ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, } from './context-menu-sub';
|
|
15
|
+
export { ContextMenu, ContextMenuContent, ContextMenuGroup, ContextMenuLabel, ContextMenuPortal, ContextMenuSeparator, ContextMenuShortcut, ContextMenuTrigger, };
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
import { Dialog as DialogPrimitive } from 'radix-ui';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
1
3
|
/**
|
|
2
4
|
* A combobox inside a dialog portals its list outside the dialog's content;
|
|
3
5
|
* a pointer or focus landing there is not "outside" and must not close it.
|
|
4
6
|
*/
|
|
5
7
|
export declare function keepComboboxOverlay(event: Pick<Event, 'target' | 'preventDefault'>): void;
|
|
8
|
+
type Outside = Pick<ComponentProps<typeof DialogPrimitive.Content>, 'onPointerDownOutside' | 'onFocusOutside' | 'onInteractOutside'>;
|
|
9
|
+
/** `handlers`, each outside handler preceded by `keepComboboxOverlay`. */
|
|
10
|
+
export declare function withComboboxOverlay<H extends Outside>(handlers: H): H;
|
|
11
|
+
export {};
|
|
@@ -5,5 +5,5 @@ import { ComponentProps } from 'react';
|
|
|
5
5
|
* and the content sits in it with a margin, instead of being clipped at the
|
|
6
6
|
* viewport. It renders its own close button (top right).
|
|
7
7
|
*/
|
|
8
|
-
declare function DialogScrollContent({ className, children, onInteractOutside, onPointerDownOutside, onFocusOutside, onOpenAutoFocus, onCloseAutoFocus, ...props }: ComponentProps<typeof DialogPrimitive.Content>): import("react").JSX.Element;
|
|
8
|
+
declare function DialogScrollContent({ className, children, onInteractOutside, onPointerDownOutside, onFocusOutside, onOpenAutoFocus, onCloseAutoFocus, onEscapeKeyDown, ref, ...props }: ComponentProps<typeof DialogPrimitive.Content>): import("react").JSX.Element;
|
|
9
9
|
export { DialogScrollContent };
|
|
@@ -6,7 +6,7 @@ declare function DialogTrigger({ asChild, ...props }: ComponentProps<typeof Dial
|
|
|
6
6
|
declare function DialogPortal({ ...props }: ComponentProps<typeof DialogPrimitive.Portal>): import("react").JSX.Element;
|
|
7
7
|
declare function DialogClose({ className, color, children, type, variant, ...props }: ComponentProps<typeof DialogPrimitive.Close> & Partial<Pick<IconButtonProps, 'variant' | 'color'>>): import("react").JSX.Element;
|
|
8
8
|
declare function DialogOverlay({ className, ...props }: ComponentProps<typeof DialogPrimitive.Overlay>): import("react").JSX.Element;
|
|
9
|
-
declare function DialogContent({ className, children, onInteractOutside, onPointerDownOutside, onFocusOutside, onOpenAutoFocus, onCloseAutoFocus, ...props }: ComponentProps<typeof DialogPrimitive.Content>): import("react").JSX.Element;
|
|
9
|
+
declare function DialogContent({ className, children, onInteractOutside, onPointerDownOutside, onFocusOutside, onOpenAutoFocus, onCloseAutoFocus, onEscapeKeyDown, ref, ...props }: ComponentProps<typeof DialogPrimitive.Content>): import("react").JSX.Element;
|
|
10
10
|
declare function DialogHeader({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
11
11
|
declare function DialogFooter({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
12
12
|
declare function DialogTitle({ className, ...props }: ComponentProps<typeof DialogPrimitive.Title>): import("react").JSX.Element;
|
|
@@ -7,8 +7,9 @@ type AutoFocusHandler = (event: Event) => void;
|
|
|
7
7
|
* Opening moves focus into the overlay, as a modal must: Radix focuses the
|
|
8
8
|
* first element Tab reaches, or the content itself (it has `tabIndex={-1}`)
|
|
9
9
|
* when there is none; `AlertDialogContent` focuses its Cancel. An
|
|
10
|
-
* `onOpenAutoFocus` of yours that calls `event.preventDefault()`
|
|
11
|
-
*
|
|
10
|
+
* `onOpenAutoFocus` of yours that calls `event.preventDefault()` stops Radix
|
|
11
|
+
* moving it: focus what you want in the handler. Left on the page behind a
|
|
12
|
+
* modal one, which is inert, focus goes to the content (`inertOthers`). With `focusFallback`, focus that is still outside the content
|
|
12
13
|
* once Radix is done (an `AlertDialogContent` with no Cancel, whose Radix
|
|
13
14
|
* handler prevents the default and focuses nothing) goes to the first
|
|
14
15
|
* element Tab reaches in it, or to the content.
|
|
@@ -6,7 +6,7 @@ declare function DrawerTrigger({ ...props }: ComponentProps<typeof DrawerPrimiti
|
|
|
6
6
|
declare function DrawerPortal({ ...props }: ComponentProps<typeof DrawerPrimitive.Portal>): import("react").JSX.Element;
|
|
7
7
|
declare function DrawerClose({ className, color, children, type, variant, ...props }: ComponentProps<typeof DrawerPrimitive.Close> & Pick<IconButtonProps, 'variant' | 'color'>): import("react").JSX.Element;
|
|
8
8
|
declare function DrawerOverlay({ className, ...props }: ComponentProps<typeof DrawerPrimitive.Overlay>): import("react").JSX.Element;
|
|
9
|
-
declare function DrawerContent({ className, children, onOpenAutoFocus, onCloseAutoFocus, ...props }: ComponentProps<typeof DrawerPrimitive.Content>): import("react").JSX.Element;
|
|
9
|
+
declare function DrawerContent({ className, children, onOpenAutoFocus, onCloseAutoFocus, onEscapeKeyDown, ref, ...props }: ComponentProps<typeof DrawerPrimitive.Content>): import("react").JSX.Element;
|
|
10
10
|
declare function DrawerHeader({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
11
11
|
declare function DrawerFooter({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
12
12
|
declare function DrawerTitle({ className, ...props }: ComponentProps<typeof DrawerPrimitive.Title>): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
declare function DropdownMenuItem({ className, inset, variant, active, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
4
|
+
active?: boolean;
|
|
5
|
+
inset?: boolean;
|
|
6
|
+
variant?: 'default' | 'error';
|
|
7
|
+
}): import("react").JSX.Element;
|
|
8
|
+
declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): import("react").JSX.Element;
|
|
9
|
+
declare function DropdownMenuRadioGroup({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): import("react").JSX.Element;
|
|
10
|
+
declare function DropdownMenuRadioItem({ className, children, ...props }: ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): import("react").JSX.Element;
|
|
11
|
+
export { DropdownMenuCheckboxItem, DropdownMenuItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
declare function DropdownMenuSub({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Sub>): import("react").JSX.Element;
|
|
4
|
+
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
5
|
+
inset?: boolean;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
declare function DropdownMenuSubContent({ className, ...props }: ComponentProps<typeof DropdownMenuPrimitive.SubContent>): import("react").JSX.Element;
|
|
8
|
+
export { DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger };
|
|
@@ -1,33 +1,18 @@
|
|
|
1
1
|
import { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui';
|
|
2
2
|
import { ComponentProps } from 'react';
|
|
3
|
-
declare function DropdownMenu(
|
|
3
|
+
declare function DropdownMenu(props: ComponentProps<typeof DropdownMenuPrimitive.Root>): import("react").JSX.Element;
|
|
4
4
|
declare function DropdownMenuPortal({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Portal>): import("react").JSX.Element;
|
|
5
5
|
declare function DropdownMenuTrigger({ className, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Trigger>): import("react").JSX.Element;
|
|
6
|
-
declare function DropdownMenuContent({ className, sideOffset, container, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Content> & {
|
|
7
|
-
/**
|
|
8
|
-
* Where the menu is portalled; `document.body` by default. Pass the
|
|
9
|
-
* fullscreen element for a menu opened in fullscreen, which shows nothing
|
|
10
|
-
* outside it.
|
|
11
|
-
*/
|
|
6
|
+
declare function DropdownMenuContent({ className, sideOffset, container, ref, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Content> & {
|
|
7
|
+
/** Where the menu is portalled (`document.body` by default), e.g. a fullscreen element. */
|
|
12
8
|
container?: ComponentProps<typeof DropdownMenuPrimitive.Portal>['container'];
|
|
13
9
|
}): import("react").JSX.Element;
|
|
14
10
|
declare function DropdownMenuGroup({ className, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Group>): import("react").JSX.Element;
|
|
15
|
-
declare function DropdownMenuItem({ className, inset, variant, active, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
16
|
-
active?: boolean;
|
|
17
|
-
inset?: boolean;
|
|
18
|
-
variant?: 'default' | 'error';
|
|
19
|
-
}): import("react").JSX.Element;
|
|
20
|
-
declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): import("react").JSX.Element;
|
|
21
|
-
declare function DropdownMenuRadioGroup({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): import("react").JSX.Element;
|
|
22
|
-
declare function DropdownMenuRadioItem({ className, children, ...props }: ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): import("react").JSX.Element;
|
|
23
11
|
declare function DropdownMenuLabel({ className, inset, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
24
12
|
inset?: boolean;
|
|
25
13
|
}): import("react").JSX.Element;
|
|
26
14
|
declare function DropdownMenuSeparator({ className, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Separator>): import("react").JSX.Element;
|
|
27
15
|
declare function DropdownMenuShortcut({ className, ...props }: ComponentProps<'span'>): import("react").JSX.Element;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}): import("react").JSX.Element;
|
|
32
|
-
declare function DropdownMenuSubContent({ className, ...props }: ComponentProps<typeof DropdownMenuPrimitive.SubContent>): import("react").JSX.Element;
|
|
33
|
-
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, };
|
|
16
|
+
export { DropdownMenuCheckboxItem, DropdownMenuItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, } from './dropdown-menu-items';
|
|
17
|
+
export { DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, } from './dropdown-menu-sub';
|
|
18
|
+
export { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger, };
|
|
@@ -2,6 +2,6 @@ import { Popover as PopoverPrimitive } from 'radix-ui';
|
|
|
2
2
|
import { ComponentProps } from 'react';
|
|
3
3
|
declare function Popover({ ...props }: ComponentProps<typeof PopoverPrimitive.Root>): import("react").JSX.Element;
|
|
4
4
|
declare function PopoverTrigger({ ...props }: ComponentProps<typeof PopoverPrimitive.Trigger>): import("react").JSX.Element;
|
|
5
|
-
declare function PopoverContent({ className, align, sideOffset, ...props }: ComponentProps<typeof PopoverPrimitive.Content>): import("react").JSX.Element;
|
|
5
|
+
declare function PopoverContent({ className, align, sideOffset, ref, ...props }: ComponentProps<typeof PopoverPrimitive.Content>): import("react").JSX.Element;
|
|
6
6
|
declare function PopoverAnchor({ ...props }: ComponentProps<typeof PopoverPrimitive.Anchor>): import("react").JSX.Element;
|
|
7
7
|
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
|
|
@@ -4,7 +4,7 @@ import { IconButtonProps } from '../../actions/icon-button/icon-button';
|
|
|
4
4
|
declare function Sheet({ ...props }: ComponentProps<typeof SheetPrimitive.Root>): import("react").JSX.Element;
|
|
5
5
|
declare function SheetTrigger({ ...props }: ComponentProps<typeof SheetPrimitive.Trigger>): import("react").JSX.Element;
|
|
6
6
|
declare function SheetClose({ className, color, children, type, variant, ...props }: ComponentProps<typeof SheetPrimitive.Close> & Pick<IconButtonProps, 'variant' | 'color'>): import("react").JSX.Element;
|
|
7
|
-
declare function SheetContent({ className, children, side, withCloseButton, onOpenAutoFocus, onCloseAutoFocus, ...props }: ComponentProps<typeof SheetPrimitive.Content> & {
|
|
7
|
+
declare function SheetContent({ className, children, side, withCloseButton, onOpenAutoFocus, onCloseAutoFocus, onEscapeKeyDown, ref, ...props }: ComponentProps<typeof SheetPrimitive.Content> & {
|
|
8
8
|
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
9
9
|
withCloseButton?: boolean;
|
|
10
10
|
}): import("react").JSX.Element;
|