@choco-vanille/components 0.0.0-stage → 0.1.0-dev.2
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/LICENSE +21 -0
- package/README.md +480 -2
- package/dist/components/_common/components/decorative-icon/DecorativeIcon.cjs +2 -0
- package/dist/components/_common/components/decorative-icon/DecorativeIcon.cjs.map +1 -0
- package/dist/components/_common/components/decorative-icon/DecorativeIcon.js +11 -0
- package/dist/components/_common/components/decorative-icon/DecorativeIcon.js.map +1 -0
- package/dist/components/_common/trigger-base/constants/index.cjs +2 -0
- package/dist/components/_common/trigger-base/constants/index.cjs.map +1 -0
- package/dist/components/_common/trigger-base/constants/index.js +8 -0
- package/dist/components/_common/trigger-base/constants/index.js.map +1 -0
- package/dist/components/_common/trigger-base/utils/getTriggerBaseElementProps.utils.cjs +2 -0
- package/dist/components/_common/trigger-base/utils/getTriggerBaseElementProps.utils.cjs.map +1 -0
- package/dist/components/_common/trigger-base/utils/getTriggerBaseElementProps.utils.js +17 -0
- package/dist/components/_common/trigger-base/utils/getTriggerBaseElementProps.utils.js.map +1 -0
- package/dist/components/_common/utils/attachRef.utils.cjs +2 -0
- package/dist/components/_common/utils/attachRef.utils.cjs.map +1 -0
- package/dist/components/_common/utils/attachRef.utils.js +18 -0
- package/dist/components/_common/utils/attachRef.utils.js.map +1 -0
- package/dist/components/_common/utils/cancelEvent.utils.cjs +2 -0
- package/dist/components/_common/utils/cancelEvent.utils.cjs.map +1 -0
- package/dist/components/_common/utils/cancelEvent.utils.js +7 -0
- package/dist/components/_common/utils/cancelEvent.utils.js.map +1 -0
- package/dist/components/_common/utils/get-label-slot-child/getLabelSlotChild.utils.cjs +2 -0
- package/dist/components/_common/utils/get-label-slot-child/getLabelSlotChild.utils.cjs.map +1 -0
- package/dist/components/_common/utils/get-label-slot-child/getLabelSlotChild.utils.js +10 -0
- package/dist/components/_common/utils/get-label-slot-child/getLabelSlotChild.utils.js.map +1 -0
- package/dist/components/_common/utils/get-state-flag-attributes/getStateFlagAttributes.utils.cjs +2 -0
- package/dist/components/_common/utils/get-state-flag-attributes/getStateFlagAttributes.utils.cjs.map +1 -0
- package/dist/components/_common/utils/get-state-flag-attributes/getStateFlagAttributes.utils.js +10 -0
- package/dist/components/_common/utils/get-state-flag-attributes/getStateFlagAttributes.utils.js.map +1 -0
- package/dist/components/_common/utils/getLengthValue.utils.cjs +2 -0
- package/dist/components/_common/utils/getLengthValue.utils.cjs.map +1 -0
- package/dist/components/_common/utils/getLengthValue.utils.js +5 -0
- package/dist/components/_common/utils/getLengthValue.utils.js.map +1 -0
- package/dist/components/_common/utils/hasRenderableContent.utils.cjs +2 -0
- package/dist/components/_common/utils/hasRenderableContent.utils.cjs.map +1 -0
- package/dist/components/_common/utils/hasRenderableContent.utils.js +5 -0
- package/dist/components/_common/utils/hasRenderableContent.utils.js.map +1 -0
- package/dist/components/_common/utils/mergeClassNames.utils.cjs +2 -0
- package/dist/components/_common/utils/mergeClassNames.utils.cjs.map +1 -0
- package/dist/components/_common/utils/mergeClassNames.utils.js +5 -0
- package/dist/components/_common/utils/mergeClassNames.utils.js.map +1 -0
- package/dist/components/_common/utils/resolveBoxSpacingProps.utils.cjs +2 -0
- package/dist/components/_common/utils/resolveBoxSpacingProps.utils.cjs.map +1 -0
- package/dist/components/_common/utils/resolveBoxSpacingProps.utils.js +25 -0
- package/dist/components/_common/utils/resolveBoxSpacingProps.utils.js.map +1 -0
- package/dist/components/_common/utils/splitBoxStyleProps.utils.cjs +2 -0
- package/dist/components/_common/utils/splitBoxStyleProps.utils.cjs.map +1 -0
- package/dist/components/_common/utils/splitBoxStyleProps.utils.js +14 -0
- package/dist/components/_common/utils/splitBoxStyleProps.utils.js.map +1 -0
- package/dist/components/actions/_common/button-base/buttonBase.css.cjs +2 -0
- package/dist/components/actions/_common/button-base/buttonBase.css.cjs.map +1 -0
- package/dist/components/actions/_common/button-base/buttonBase.css.js +30 -0
- package/dist/components/actions/_common/button-base/buttonBase.css.js.map +1 -0
- package/dist/components/actions/_common/button-base/constants/index.cjs +2 -0
- package/dist/components/actions/_common/button-base/constants/index.cjs.map +1 -0
- package/dist/components/actions/_common/button-base/constants/index.js +13 -0
- package/dist/components/actions/_common/button-base/constants/index.js.map +1 -0
- package/dist/components/actions/_common/button-base/utils/getButtonBaseProps.utils.cjs +2 -0
- package/dist/components/actions/_common/button-base/utils/getButtonBaseProps.utils.cjs.map +1 -0
- package/dist/components/actions/_common/button-base/utils/getButtonBaseProps.utils.js +31 -0
- package/dist/components/actions/_common/button-base/utils/getButtonBaseProps.utils.js.map +1 -0
- package/dist/components/actions/button/Button.cjs +2 -0
- package/dist/components/actions/button/Button.cjs.map +1 -0
- package/dist/components/actions/button/Button.css.cjs +2 -0
- package/dist/components/actions/button/Button.css.cjs.map +1 -0
- package/dist/components/actions/button/Button.css.js +19 -0
- package/dist/components/actions/button/Button.css.js.map +1 -0
- package/dist/components/actions/button/Button.js +46 -0
- package/dist/components/actions/button/Button.js.map +1 -0
- package/dist/components/actions/button/constants/index.cjs +2 -0
- package/dist/components/actions/button/constants/index.cjs.map +1 -0
- package/dist/components/actions/button/constants/index.js +29 -0
- package/dist/components/actions/button/constants/index.js.map +1 -0
- package/dist/components/actions/button/utils/getButtonLabelClassName.utils.cjs +2 -0
- package/dist/components/actions/button/utils/getButtonLabelClassName.utils.cjs.map +1 -0
- package/dist/components/actions/button/utils/getButtonLabelClassName.utils.js +6 -0
- package/dist/components/actions/button/utils/getButtonLabelClassName.utils.js.map +1 -0
- package/dist/components/actions/button/utils/getButtonParts.utils.cjs +2 -0
- package/dist/components/actions/button/utils/getButtonParts.utils.cjs.map +1 -0
- package/dist/components/actions/button/utils/getButtonParts.utils.js +31 -0
- package/dist/components/actions/button/utils/getButtonParts.utils.js.map +1 -0
- package/dist/components/actions/icon-button/IconButton.cjs +2 -0
- package/dist/components/actions/icon-button/IconButton.cjs.map +1 -0
- package/dist/components/actions/icon-button/IconButton.css.cjs +2 -0
- package/dist/components/actions/icon-button/IconButton.css.cjs.map +1 -0
- package/dist/components/actions/icon-button/IconButton.css.js +16 -0
- package/dist/components/actions/icon-button/IconButton.css.js.map +1 -0
- package/dist/components/actions/icon-button/IconButton.js +24 -0
- package/dist/components/actions/icon-button/IconButton.js.map +1 -0
- package/dist/components/data-display/badge/Badge.cjs +2 -0
- package/dist/components/data-display/badge/Badge.cjs.map +1 -0
- package/dist/components/data-display/badge/Badge.css.cjs +2 -0
- package/dist/components/data-display/badge/Badge.css.cjs.map +1 -0
- package/dist/components/data-display/badge/Badge.css.js +45 -0
- package/dist/components/data-display/badge/Badge.css.js.map +1 -0
- package/dist/components/data-display/badge/Badge.js +39 -0
- package/dist/components/data-display/badge/Badge.js.map +1 -0
- package/dist/components/data-display/badge/constants/index.cjs +2 -0
- package/dist/components/data-display/badge/constants/index.cjs.map +1 -0
- package/dist/components/data-display/badge/constants/index.js +20 -0
- package/dist/components/data-display/badge/constants/index.js.map +1 -0
- package/dist/components/data-display/badge/utils/getBadgeBoxProps.utils.cjs +2 -0
- package/dist/components/data-display/badge/utils/getBadgeBoxProps.utils.cjs.map +1 -0
- package/dist/components/data-display/badge/utils/getBadgeBoxProps.utils.js +12 -0
- package/dist/components/data-display/badge/utils/getBadgeBoxProps.utils.js.map +1 -0
- package/dist/components/data-display/table/Table.cjs +2 -0
- package/dist/components/data-display/table/Table.cjs.map +1 -0
- package/dist/components/data-display/table/Table.css.cjs +2 -0
- package/dist/components/data-display/table/Table.css.cjs.map +1 -0
- package/dist/components/data-display/table/Table.css.js +27 -0
- package/dist/components/data-display/table/Table.css.js.map +1 -0
- package/dist/components/data-display/table/Table.js +53 -0
- package/dist/components/data-display/table/Table.js.map +1 -0
- package/dist/components/data-display/table/components/_common/table-cell-base/constants/index.cjs +2 -0
- package/dist/components/data-display/table/components/_common/table-cell-base/constants/index.cjs.map +1 -0
- package/dist/components/data-display/table/components/_common/table-cell-base/constants/index.js +5 -0
- package/dist/components/data-display/table/components/_common/table-cell-base/constants/index.js.map +1 -0
- package/dist/components/data-display/table/components/_common/table-cell-base/tableCellBase.css.cjs +2 -0
- package/dist/components/data-display/table/components/_common/table-cell-base/tableCellBase.css.cjs.map +1 -0
- package/dist/components/data-display/table/components/_common/table-cell-base/tableCellBase.css.js +15 -0
- package/dist/components/data-display/table/components/_common/table-cell-base/tableCellBase.css.js.map +1 -0
- package/dist/components/data-display/table/components/_common/table-cell-base/utils/getTableCellClassName.utils.cjs +2 -0
- package/dist/components/data-display/table/components/_common/table-cell-base/utils/getTableCellClassName.utils.cjs.map +1 -0
- package/dist/components/data-display/table/components/_common/table-cell-base/utils/getTableCellClassName.utils.js +7 -0
- package/dist/components/data-display/table/components/_common/table-cell-base/utils/getTableCellClassName.utils.js.map +1 -0
- package/dist/components/data-display/table/components/table-body/TableBody.cjs +2 -0
- package/dist/components/data-display/table/components/table-body/TableBody.cjs.map +1 -0
- package/dist/components/data-display/table/components/table-body/TableBody.js +10 -0
- package/dist/components/data-display/table/components/table-body/TableBody.js.map +1 -0
- package/dist/components/data-display/table/components/table-caption/TableCaption.cjs +2 -0
- package/dist/components/data-display/table/components/table-caption/TableCaption.cjs.map +1 -0
- package/dist/components/data-display/table/components/table-caption/TableCaption.css.cjs +2 -0
- package/dist/components/data-display/table/components/table-caption/TableCaption.css.cjs.map +1 -0
- package/dist/components/data-display/table/components/table-caption/TableCaption.css.js +10 -0
- package/dist/components/data-display/table/components/table-caption/TableCaption.css.js.map +1 -0
- package/dist/components/data-display/table/components/table-caption/TableCaption.js +14 -0
- package/dist/components/data-display/table/components/table-caption/TableCaption.js.map +1 -0
- package/dist/components/data-display/table/components/table-caption/constants/index.cjs +2 -0
- package/dist/components/data-display/table/components/table-caption/constants/index.cjs.map +1 -0
- package/dist/components/data-display/table/components/table-caption/constants/index.js +5 -0
- package/dist/components/data-display/table/components/table-caption/constants/index.js.map +1 -0
- package/dist/components/data-display/table/components/table-cell/TableCell.cjs +2 -0
- package/dist/components/data-display/table/components/table-cell/TableCell.cjs.map +1 -0
- package/dist/components/data-display/table/components/table-cell/TableCell.js +14 -0
- package/dist/components/data-display/table/components/table-cell/TableCell.js.map +1 -0
- package/dist/components/data-display/table/components/table-column/TableColumn.cjs +2 -0
- package/dist/components/data-display/table/components/table-column/TableColumn.cjs.map +1 -0
- package/dist/components/data-display/table/components/table-column/TableColumn.js +6 -0
- package/dist/components/data-display/table/components/table-column/TableColumn.js.map +1 -0
- package/dist/components/data-display/table/components/table-column-group/TableColumnGroup.cjs +2 -0
- package/dist/components/data-display/table/components/table-column-group/TableColumnGroup.cjs.map +1 -0
- package/dist/components/data-display/table/components/table-column-group/TableColumnGroup.js +6 -0
- package/dist/components/data-display/table/components/table-column-group/TableColumnGroup.js.map +1 -0
- package/dist/components/data-display/table/components/table-empty/TableEmpty.cjs +2 -0
- package/dist/components/data-display/table/components/table-empty/TableEmpty.cjs.map +1 -0
- package/dist/components/data-display/table/components/table-empty/TableEmpty.css.cjs +2 -0
- package/dist/components/data-display/table/components/table-empty/TableEmpty.css.cjs.map +1 -0
- package/dist/components/data-display/table/components/table-empty/TableEmpty.css.js +9 -0
- package/dist/components/data-display/table/components/table-empty/TableEmpty.css.js.map +1 -0
- package/dist/components/data-display/table/components/table-empty/TableEmpty.js +11 -0
- package/dist/components/data-display/table/components/table-empty/TableEmpty.js.map +1 -0
- package/dist/components/data-display/table/components/table-footer/TableFooter.cjs +2 -0
- package/dist/components/data-display/table/components/table-footer/TableFooter.cjs.map +1 -0
- package/dist/components/data-display/table/components/table-footer/TableFooter.js +10 -0
- package/dist/components/data-display/table/components/table-footer/TableFooter.js.map +1 -0
- package/dist/components/data-display/table/components/table-header/TableHeader.cjs +2 -0
- package/dist/components/data-display/table/components/table-header/TableHeader.cjs.map +1 -0
- package/dist/components/data-display/table/components/table-header/TableHeader.css.cjs +2 -0
- package/dist/components/data-display/table/components/table-header/TableHeader.css.cjs.map +1 -0
- package/dist/components/data-display/table/components/table-header/TableHeader.css.js +8 -0
- package/dist/components/data-display/table/components/table-header/TableHeader.css.js.map +1 -0
- package/dist/components/data-display/table/components/table-header/TableHeader.js +15 -0
- package/dist/components/data-display/table/components/table-header/TableHeader.js.map +1 -0
- package/dist/components/data-display/table/components/table-header-cell/TableHeaderCell.cjs +2 -0
- package/dist/components/data-display/table/components/table-header-cell/TableHeaderCell.cjs.map +1 -0
- package/dist/components/data-display/table/components/table-header-cell/TableHeaderCell.js +26 -0
- package/dist/components/data-display/table/components/table-header-cell/TableHeaderCell.js.map +1 -0
- package/dist/components/data-display/table/components/table-header-cell/constants/index.cjs +2 -0
- package/dist/components/data-display/table/components/table-header-cell/constants/index.cjs.map +1 -0
- package/dist/components/data-display/table/components/table-header-cell/constants/index.js +9 -0
- package/dist/components/data-display/table/components/table-header-cell/constants/index.js.map +1 -0
- package/dist/components/data-display/table/components/table-header-cell/hooks/useTableSection.hook.cjs +2 -0
- package/dist/components/data-display/table/components/table-header-cell/hooks/useTableSection.hook.cjs.map +1 -0
- package/dist/components/data-display/table/components/table-header-cell/hooks/useTableSection.hook.js +7 -0
- package/dist/components/data-display/table/components/table-header-cell/hooks/useTableSection.hook.js.map +1 -0
- package/dist/components/data-display/table/components/table-header-cell/utils/getTableHeaderCellScope.utils.cjs +2 -0
- package/dist/components/data-display/table/components/table-header-cell/utils/getTableHeaderCellScope.utils.cjs.map +1 -0
- package/dist/components/data-display/table/components/table-header-cell/utils/getTableHeaderCellScope.utils.js +6 -0
- package/dist/components/data-display/table/components/table-header-cell/utils/getTableHeaderCellScope.utils.js.map +1 -0
- package/dist/components/data-display/table/components/table-row/TableRow.cjs +2 -0
- package/dist/components/data-display/table/components/table-row/TableRow.cjs.map +1 -0
- package/dist/components/data-display/table/components/table-row/TableRow.js +10 -0
- package/dist/components/data-display/table/components/table-row/TableRow.js.map +1 -0
- package/dist/components/data-display/table/components/table-scroll-container/TableScrollContainer.cjs +2 -0
- package/dist/components/data-display/table/components/table-scroll-container/TableScrollContainer.cjs.map +1 -0
- package/dist/components/data-display/table/components/table-scroll-container/TableScrollContainer.js +10 -0
- package/dist/components/data-display/table/components/table-scroll-container/TableScrollContainer.js.map +1 -0
- package/dist/components/data-display/table/components/table-sort-button/TableSortButton.cjs +2 -0
- package/dist/components/data-display/table/components/table-sort-button/TableSortButton.cjs.map +1 -0
- package/dist/components/data-display/table/components/table-sort-button/TableSortButton.css.cjs +2 -0
- package/dist/components/data-display/table/components/table-sort-button/TableSortButton.css.cjs.map +1 -0
- package/dist/components/data-display/table/components/table-sort-button/TableSortButton.css.js +10 -0
- package/dist/components/data-display/table/components/table-sort-button/TableSortButton.css.js.map +1 -0
- package/dist/components/data-display/table/components/table-sort-button/TableSortButton.js +21 -0
- package/dist/components/data-display/table/components/table-sort-button/TableSortButton.js.map +1 -0
- package/dist/components/data-display/table/components/table-sort-button/constants/index.cjs +2 -0
- package/dist/components/data-display/table/components/table-sort-button/constants/index.cjs.map +1 -0
- package/dist/components/data-display/table/components/table-sort-button/constants/index.js +10 -0
- package/dist/components/data-display/table/components/table-sort-button/constants/index.js.map +1 -0
- package/dist/components/data-display/table/components/table-sort-button/hooks/useTableSortButtonIcon.hook.cjs +2 -0
- package/dist/components/data-display/table/components/table-sort-button/hooks/useTableSortButtonIcon.hook.cjs.map +1 -0
- package/dist/components/data-display/table/components/table-sort-button/hooks/useTableSortButtonIcon.hook.js +12 -0
- package/dist/components/data-display/table/components/table-sort-button/hooks/useTableSortButtonIcon.hook.js.map +1 -0
- package/dist/components/data-display/table/constants/index.cjs +2 -0
- package/dist/components/data-display/table/constants/index.cjs.map +1 -0
- package/dist/components/data-display/table/constants/index.js +11 -0
- package/dist/components/data-display/table/constants/index.js.map +1 -0
- package/dist/components/data-display/table/contexts/TableSectionContext.cjs +2 -0
- package/dist/components/data-display/table/contexts/TableSectionContext.cjs.map +1 -0
- package/dist/components/data-display/table/contexts/TableSectionContext.js +6 -0
- package/dist/components/data-display/table/contexts/TableSectionContext.js.map +1 -0
- package/dist/components/data-display/table/contexts/TableSortDirectionContext.cjs +2 -0
- package/dist/components/data-display/table/contexts/TableSortDirectionContext.cjs.map +1 -0
- package/dist/components/data-display/table/contexts/TableSortDirectionContext.js +6 -0
- package/dist/components/data-display/table/contexts/TableSortDirectionContext.js.map +1 -0
- package/dist/components/data-display/table/utils/getTableClassName.utils.cjs +2 -0
- package/dist/components/data-display/table/utils/getTableClassName.utils.cjs.map +1 -0
- package/dist/components/data-display/table/utils/getTableClassName.utils.js +7 -0
- package/dist/components/data-display/table/utils/getTableClassName.utils.js.map +1 -0
- package/dist/components/feedback/skeleton/Skeleton.cjs +2 -0
- package/dist/components/feedback/skeleton/Skeleton.cjs.map +1 -0
- package/dist/components/feedback/skeleton/Skeleton.css.cjs +2 -0
- package/dist/components/feedback/skeleton/Skeleton.css.cjs.map +1 -0
- package/dist/components/feedback/skeleton/Skeleton.css.js +23 -0
- package/dist/components/feedback/skeleton/Skeleton.css.js.map +1 -0
- package/dist/components/feedback/skeleton/Skeleton.js +11 -0
- package/dist/components/feedback/skeleton/Skeleton.js.map +1 -0
- package/dist/components/feedback/skeleton/constants/index.cjs +2 -0
- package/dist/components/feedback/skeleton/constants/index.cjs.map +1 -0
- package/dist/components/feedback/skeleton/constants/index.js +25 -0
- package/dist/components/feedback/skeleton/constants/index.js.map +1 -0
- package/dist/components/feedback/skeleton/utils/getSkeletonBoxProps.utils.cjs +2 -0
- package/dist/components/feedback/skeleton/utils/getSkeletonBoxProps.utils.cjs.map +1 -0
- package/dist/components/feedback/skeleton/utils/getSkeletonBoxProps.utils.js +18 -0
- package/dist/components/feedback/skeleton/utils/getSkeletonBoxProps.utils.js.map +1 -0
- package/dist/components/feedback/spinner/Spinner.cjs +2 -0
- package/dist/components/feedback/spinner/Spinner.cjs.map +1 -0
- package/dist/components/feedback/spinner/Spinner.css.cjs +2 -0
- package/dist/components/feedback/spinner/Spinner.css.cjs.map +1 -0
- package/dist/components/feedback/spinner/Spinner.css.js +38 -0
- package/dist/components/feedback/spinner/Spinner.css.js.map +1 -0
- package/dist/components/feedback/spinner/Spinner.js +13 -0
- package/dist/components/feedback/spinner/Spinner.js.map +1 -0
- package/dist/components/feedback/spinner/utils/getSpinnerElementProps.utils.cjs +2 -0
- package/dist/components/feedback/spinner/utils/getSpinnerElementProps.utils.cjs.map +1 -0
- package/dist/components/feedback/spinner/utils/getSpinnerElementProps.utils.js +20 -0
- package/dist/components/feedback/spinner/utils/getSpinnerElementProps.utils.js.map +1 -0
- package/dist/components/feedback/spinner/utils/isSpinnerLabelled.utils.cjs +2 -0
- package/dist/components/feedback/spinner/utils/isSpinnerLabelled.utils.cjs.map +1 -0
- package/dist/components/feedback/spinner/utils/isSpinnerLabelled.utils.js +5 -0
- package/dist/components/feedback/spinner/utils/isSpinnerLabelled.utils.js.map +1 -0
- package/dist/components/forms/_common/form-base/constants/index.cjs +2 -0
- package/dist/components/forms/_common/form-base/constants/index.cjs.map +1 -0
- package/dist/components/forms/_common/form-base/constants/index.js +8 -0
- package/dist/components/forms/_common/form-base/constants/index.js.map +1 -0
- package/dist/components/forms/form-helper-text/FormHelperText.cjs +2 -0
- package/dist/components/forms/form-helper-text/FormHelperText.cjs.map +1 -0
- package/dist/components/forms/form-helper-text/FormHelperText.css.cjs +2 -0
- package/dist/components/forms/form-helper-text/FormHelperText.css.cjs.map +1 -0
- package/dist/components/forms/form-helper-text/FormHelperText.css.js +11 -0
- package/dist/components/forms/form-helper-text/FormHelperText.css.js.map +1 -0
- package/dist/components/forms/form-helper-text/FormHelperText.js +28 -0
- package/dist/components/forms/form-helper-text/FormHelperText.js.map +1 -0
- package/dist/components/forms/form-helper-text/constants/index.cjs +2 -0
- package/dist/components/forms/form-helper-text/constants/index.cjs.map +1 -0
- package/dist/components/forms/form-helper-text/constants/index.js +22 -0
- package/dist/components/forms/form-helper-text/constants/index.js.map +1 -0
- package/dist/components/forms/form-helper-text/utils/getFormHelperTextElementProps.utils.cjs +2 -0
- package/dist/components/forms/form-helper-text/utils/getFormHelperTextElementProps.utils.cjs.map +1 -0
- package/dist/components/forms/form-helper-text/utils/getFormHelperTextElementProps.utils.js +15 -0
- package/dist/components/forms/form-helper-text/utils/getFormHelperTextElementProps.utils.js.map +1 -0
- package/dist/components/forms/form-label/FormLabel.cjs +2 -0
- package/dist/components/forms/form-label/FormLabel.cjs.map +1 -0
- package/dist/components/forms/form-label/FormLabel.css.cjs +2 -0
- package/dist/components/forms/form-label/FormLabel.css.cjs.map +1 -0
- package/dist/components/forms/form-label/FormLabel.css.js +10 -0
- package/dist/components/forms/form-label/FormLabel.css.js.map +1 -0
- package/dist/components/forms/form-label/FormLabel.js +23 -0
- package/dist/components/forms/form-label/FormLabel.js.map +1 -0
- package/dist/components/forms/form-label/constants/index.cjs +2 -0
- package/dist/components/forms/form-label/constants/index.cjs.map +1 -0
- package/dist/components/forms/form-label/constants/index.js +22 -0
- package/dist/components/forms/form-label/constants/index.js.map +1 -0
- package/dist/components/forms/form-label/utils/createFormLabelMouseDownHandler.utils.cjs +2 -0
- package/dist/components/forms/form-label/utils/createFormLabelMouseDownHandler.utils.cjs.map +1 -0
- package/dist/components/forms/form-label/utils/createFormLabelMouseDownHandler.utils.js +7 -0
- package/dist/components/forms/form-label/utils/createFormLabelMouseDownHandler.utils.js.map +1 -0
- package/dist/components/forms/form-label/utils/getFormLabelElementProps.utils.cjs +2 -0
- package/dist/components/forms/form-label/utils/getFormLabelElementProps.utils.cjs.map +1 -0
- package/dist/components/forms/form-label/utils/getFormLabelElementProps.utils.js +14 -0
- package/dist/components/forms/form-label/utils/getFormLabelElementProps.utils.js.map +1 -0
- package/dist/components/forms/text-field/TextField.cjs +2 -0
- package/dist/components/forms/text-field/TextField.cjs.map +1 -0
- package/dist/components/forms/text-field/TextField.css.cjs +2 -0
- package/dist/components/forms/text-field/TextField.css.cjs.map +1 -0
- package/dist/components/forms/text-field/TextField.css.js +17 -0
- package/dist/components/forms/text-field/TextField.css.js.map +1 -0
- package/dist/components/forms/text-field/TextField.js +69 -0
- package/dist/components/forms/text-field/TextField.js.map +1 -0
- package/dist/components/forms/text-field/constants/index.cjs +2 -0
- package/dist/components/forms/text-field/constants/index.cjs.map +1 -0
- package/dist/components/forms/text-field/constants/index.js +20 -0
- package/dist/components/forms/text-field/constants/index.js.map +1 -0
- package/dist/components/forms/text-field/hooks/use-text-field/hooks/use-text-field-focus-modality/useTextFieldFocusModality.hook.cjs +2 -0
- package/dist/components/forms/text-field/hooks/use-text-field/hooks/use-text-field-focus-modality/useTextFieldFocusModality.hook.cjs.map +1 -0
- package/dist/components/forms/text-field/hooks/use-text-field/hooks/use-text-field-focus-modality/useTextFieldFocusModality.hook.js +28 -0
- package/dist/components/forms/text-field/hooks/use-text-field/hooks/use-text-field-focus-modality/useTextFieldFocusModality.hook.js.map +1 -0
- package/dist/components/forms/text-field/hooks/use-text-field/useTextField.hook.cjs +2 -0
- package/dist/components/forms/text-field/hooks/use-text-field/useTextField.hook.cjs.map +1 -0
- package/dist/components/forms/text-field/hooks/use-text-field/useTextField.hook.js +57 -0
- package/dist/components/forms/text-field/hooks/use-text-field/useTextField.hook.js.map +1 -0
- package/dist/components/forms/text-field/utils/getTextFieldElementProps.utils.cjs +2 -0
- package/dist/components/forms/text-field/utils/getTextFieldElementProps.utils.cjs.map +1 -0
- package/dist/components/forms/text-field/utils/getTextFieldElementProps.utils.js +14 -0
- package/dist/components/forms/text-field/utils/getTextFieldElementProps.utils.js.map +1 -0
- package/dist/components/forms/text-field/utils/getTextFieldFrameProps.utils.cjs +2 -0
- package/dist/components/forms/text-field/utils/getTextFieldFrameProps.utils.cjs.map +1 -0
- package/dist/components/forms/text-field/utils/getTextFieldFrameProps.utils.js +16 -0
- package/dist/components/forms/text-field/utils/getTextFieldFrameProps.utils.js.map +1 -0
- package/dist/components/forms/text-field/utils/isTextFieldPartTarget.utils.cjs +2 -0
- package/dist/components/forms/text-field/utils/isTextFieldPartTarget.utils.cjs.map +1 -0
- package/dist/components/forms/text-field/utils/isTextFieldPartTarget.utils.js +5 -0
- package/dist/components/forms/text-field/utils/isTextFieldPartTarget.utils.js.map +1 -0
- package/dist/components/forms/text-field/utils/shouldFocusTextFieldInput.utils.cjs +2 -0
- package/dist/components/forms/text-field/utils/shouldFocusTextFieldInput.utils.cjs.map +1 -0
- package/dist/components/forms/text-field/utils/shouldFocusTextFieldInput.utils.js +5 -0
- package/dist/components/forms/text-field/utils/shouldFocusTextFieldInput.utils.js.map +1 -0
- package/dist/components/layout/card/Card.cjs +2 -0
- package/dist/components/layout/card/Card.cjs.map +1 -0
- package/dist/components/layout/card/Card.js +17 -0
- package/dist/components/layout/card/Card.js.map +1 -0
- package/dist/components/layout/card/components/card-body/CardBody.cjs +2 -0
- package/dist/components/layout/card/components/card-body/CardBody.cjs.map +1 -0
- package/dist/components/layout/card/components/card-body/CardBody.js +13 -0
- package/dist/components/layout/card/components/card-body/CardBody.js.map +1 -0
- package/dist/components/layout/card/components/card-body/constants/index.cjs +2 -0
- package/dist/components/layout/card/components/card-body/constants/index.cjs.map +1 -0
- package/dist/components/layout/card/components/card-body/constants/index.js +8 -0
- package/dist/components/layout/card/components/card-body/constants/index.js.map +1 -0
- package/dist/components/layout/card/components/card-footer/CardFooter.cjs +2 -0
- package/dist/components/layout/card/components/card-footer/CardFooter.cjs.map +1 -0
- package/dist/components/layout/card/components/card-footer/CardFooter.js +13 -0
- package/dist/components/layout/card/components/card-footer/CardFooter.js.map +1 -0
- package/dist/components/layout/card/components/card-footer/constants/index.cjs +2 -0
- package/dist/components/layout/card/components/card-footer/constants/index.cjs.map +1 -0
- package/dist/components/layout/card/components/card-footer/constants/index.js +12 -0
- package/dist/components/layout/card/components/card-footer/constants/index.js.map +1 -0
- package/dist/components/layout/card/components/card-header/CardHeader.cjs +2 -0
- package/dist/components/layout/card/components/card-header/CardHeader.cjs.map +1 -0
- package/dist/components/layout/card/components/card-header/CardHeader.js +17 -0
- package/dist/components/layout/card/components/card-header/CardHeader.js.map +1 -0
- package/dist/components/layout/card/components/card-header/constants/index.cjs +2 -0
- package/dist/components/layout/card/components/card-header/constants/index.cjs.map +1 -0
- package/dist/components/layout/card/components/card-header/constants/index.js +20 -0
- package/dist/components/layout/card/components/card-header/constants/index.js.map +1 -0
- package/dist/components/layout/card/constants/index.cjs +2 -0
- package/dist/components/layout/card/constants/index.cjs.map +1 -0
- package/dist/components/layout/card/constants/index.js +15 -0
- package/dist/components/layout/card/constants/index.js.map +1 -0
- package/dist/components/layout/scroll-area/ScrollArea.cjs +2 -0
- package/dist/components/layout/scroll-area/ScrollArea.cjs.map +1 -0
- package/dist/components/layout/scroll-area/ScrollArea.css.cjs +2 -0
- package/dist/components/layout/scroll-area/ScrollArea.css.cjs.map +1 -0
- package/dist/components/layout/scroll-area/ScrollArea.css.js +12 -0
- package/dist/components/layout/scroll-area/ScrollArea.css.js.map +1 -0
- package/dist/components/layout/scroll-area/ScrollArea.js +37 -0
- package/dist/components/layout/scroll-area/ScrollArea.js.map +1 -0
- package/dist/components/layout/scroll-area/constants/index.cjs +2 -0
- package/dist/components/layout/scroll-area/constants/index.cjs.map +1 -0
- package/dist/components/layout/scroll-area/constants/index.js +14 -0
- package/dist/components/layout/scroll-area/constants/index.js.map +1 -0
- package/dist/components/media/image/Image.cjs +2 -0
- package/dist/components/media/image/Image.cjs.map +1 -0
- package/dist/components/media/image/Image.css.cjs +2 -0
- package/dist/components/media/image/Image.css.cjs.map +1 -0
- package/dist/components/media/image/Image.css.js +22 -0
- package/dist/components/media/image/Image.css.js.map +1 -0
- package/dist/components/media/image/Image.js +41 -0
- package/dist/components/media/image/Image.js.map +1 -0
- package/dist/components/media/image/constants/index.cjs +2 -0
- package/dist/components/media/image/constants/index.cjs.map +1 -0
- package/dist/components/media/image/constants/index.js +31 -0
- package/dist/components/media/image/constants/index.js.map +1 -0
- package/dist/components/media/image/hooks/use-image/hooks/useIsHydrating.hook.cjs +2 -0
- package/dist/components/media/image/hooks/use-image/hooks/useIsHydrating.hook.cjs.map +1 -0
- package/dist/components/media/image/hooks/use-image/hooks/useIsHydrating.hook.js +6 -0
- package/dist/components/media/image/hooks/use-image/hooks/useIsHydrating.hook.js.map +1 -0
- package/dist/components/media/image/hooks/use-image/useImage.hook.cjs +2 -0
- package/dist/components/media/image/hooks/use-image/useImage.hook.cjs.map +1 -0
- package/dist/components/media/image/hooks/use-image/useImage.hook.js +90 -0
- package/dist/components/media/image/hooks/use-image/useImage.hook.js.map +1 -0
- package/dist/components/media/image/utils/getFailedImageState.utils.cjs +2 -0
- package/dist/components/media/image/utils/getFailedImageState.utils.cjs.map +1 -0
- package/dist/components/media/image/utils/getFailedImageState.utils.js +19 -0
- package/dist/components/media/image/utils/getFailedImageState.utils.js.map +1 -0
- package/dist/components/media/image/utils/getImageContainerProps.utils.cjs +2 -0
- package/dist/components/media/image/utils/getImageContainerProps.utils.cjs.map +1 -0
- package/dist/components/media/image/utils/getImageContainerProps.utils.js +27 -0
- package/dist/components/media/image/utils/getImageContainerProps.utils.js.map +1 -0
- package/dist/components/media/image/utils/getImageElementProps.utils.cjs +2 -0
- package/dist/components/media/image/utils/getImageElementProps.utils.cjs.map +1 -0
- package/dist/components/media/image/utils/getImageElementProps.utils.js +22 -0
- package/dist/components/media/image/utils/getImageElementProps.utils.js.map +1 -0
- package/dist/components/media/image/utils/getInitialImageState.utils.cjs +2 -0
- package/dist/components/media/image/utils/getInitialImageState.utils.cjs.map +1 -0
- package/dist/components/media/image/utils/getInitialImageState.utils.js +20 -0
- package/dist/components/media/image/utils/getInitialImageState.utils.js.map +1 -0
- package/dist/components/media/image/utils/getNextImageState.utils.cjs +2 -0
- package/dist/components/media/image/utils/getNextImageState.utils.cjs.map +1 -0
- package/dist/components/media/image/utils/getNextImageState.utils.js +13 -0
- package/dist/components/media/image/utils/getNextImageState.utils.js.map +1 -0
- package/dist/components/media/image/utils/splitImageProps.utils.cjs +2 -0
- package/dist/components/media/image/utils/splitImageProps.utils.cjs.map +1 -0
- package/dist/components/media/image/utils/splitImageProps.utils.js +26 -0
- package/dist/components/media/image/utils/splitImageProps.utils.js.map +1 -0
- package/dist/components/navigation/_common/link-base/constants/index.cjs +2 -0
- package/dist/components/navigation/_common/link-base/constants/index.cjs.map +1 -0
- package/dist/components/navigation/_common/link-base/constants/index.js +11 -0
- package/dist/components/navigation/_common/link-base/constants/index.js.map +1 -0
- package/dist/components/navigation/_common/link-base/utils/createLinkClickHandler.utils.cjs +2 -0
- package/dist/components/navigation/_common/link-base/utils/createLinkClickHandler.utils.cjs.map +1 -0
- package/dist/components/navigation/_common/link-base/utils/createLinkClickHandler.utils.js +8 -0
- package/dist/components/navigation/_common/link-base/utils/createLinkClickHandler.utils.js.map +1 -0
- package/dist/components/navigation/_common/link-base/utils/getExternalLinkRel.utils.cjs +2 -0
- package/dist/components/navigation/_common/link-base/utils/getExternalLinkRel.utils.cjs.map +1 -0
- package/dist/components/navigation/_common/link-base/utils/getExternalLinkRel.utils.js +9 -0
- package/dist/components/navigation/_common/link-base/utils/getExternalLinkRel.utils.js.map +1 -0
- package/dist/components/navigation/_common/link-base/utils/getLinkBaseElementProps.utils.cjs +2 -0
- package/dist/components/navigation/_common/link-base/utils/getLinkBaseElementProps.utils.cjs.map +1 -0
- package/dist/components/navigation/_common/link-base/utils/getLinkBaseElementProps.utils.js +31 -0
- package/dist/components/navigation/_common/link-base/utils/getLinkBaseElementProps.utils.js.map +1 -0
- package/dist/components/navigation/_common/link-base/utils/getLinkBaseParts.utils.cjs +2 -0
- package/dist/components/navigation/_common/link-base/utils/getLinkBaseParts.utils.cjs.map +1 -0
- package/dist/components/navigation/_common/link-base/utils/getLinkBaseParts.utils.js +37 -0
- package/dist/components/navigation/_common/link-base/utils/getLinkBaseParts.utils.js.map +1 -0
- package/dist/components/navigation/_common/link-base/utils/isPlainLinkClick.utils.cjs +2 -0
- package/dist/components/navigation/_common/link-base/utils/isPlainLinkClick.utils.cjs.map +1 -0
- package/dist/components/navigation/_common/link-base/utils/isPlainLinkClick.utils.js +8 -0
- package/dist/components/navigation/_common/link-base/utils/isPlainLinkClick.utils.js.map +1 -0
- package/dist/components/navigation/drawer/Drawer.cjs +2 -0
- package/dist/components/navigation/drawer/Drawer.cjs.map +1 -0
- package/dist/components/navigation/drawer/Drawer.css.cjs +2 -0
- package/dist/components/navigation/drawer/Drawer.css.cjs.map +1 -0
- package/dist/components/navigation/drawer/Drawer.css.js +7 -0
- package/dist/components/navigation/drawer/Drawer.css.js.map +1 -0
- package/dist/components/navigation/drawer/Drawer.js +50 -0
- package/dist/components/navigation/drawer/Drawer.js.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-body/DrawerBody.cjs +2 -0
- package/dist/components/navigation/drawer/components/drawer-body/DrawerBody.cjs.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-body/DrawerBody.css.cjs +2 -0
- package/dist/components/navigation/drawer/components/drawer-body/DrawerBody.css.cjs.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-body/DrawerBody.css.js +10 -0
- package/dist/components/navigation/drawer/components/drawer-body/DrawerBody.css.js.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-body/DrawerBody.js +21 -0
- package/dist/components/navigation/drawer/components/drawer-body/DrawerBody.js.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-body/constants/index.cjs +2 -0
- package/dist/components/navigation/drawer/components/drawer-body/constants/index.cjs.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-body/constants/index.js +5 -0
- package/dist/components/navigation/drawer/components/drawer-body/constants/index.js.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-close/DrawerClose.cjs +2 -0
- package/dist/components/navigation/drawer/components/drawer-close/DrawerClose.cjs.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-close/DrawerClose.js +13 -0
- package/dist/components/navigation/drawer/components/drawer-close/DrawerClose.js.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-content/DrawerContent.cjs +2 -0
- package/dist/components/navigation/drawer/components/drawer-content/DrawerContent.cjs.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-content/DrawerContent.css.cjs +2 -0
- package/dist/components/navigation/drawer/components/drawer-content/DrawerContent.css.cjs.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-content/DrawerContent.css.js +27 -0
- package/dist/components/navigation/drawer/components/drawer-content/DrawerContent.css.js.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-content/DrawerContent.js +50 -0
- package/dist/components/navigation/drawer/components/drawer-content/DrawerContent.js.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-content/hooks/useDrawerContent.hook.cjs +2 -0
- package/dist/components/navigation/drawer/components/drawer-content/hooks/useDrawerContent.hook.cjs.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-content/hooks/useDrawerContent.hook.js +16 -0
- package/dist/components/navigation/drawer/components/drawer-content/hooks/useDrawerContent.hook.js.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-content/utils/getDrawerBorderDefaults.utils.cjs +2 -0
- package/dist/components/navigation/drawer/components/drawer-content/utils/getDrawerBorderDefaults.utils.cjs.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-content/utils/getDrawerBorderDefaults.utils.js +6 -0
- package/dist/components/navigation/drawer/components/drawer-content/utils/getDrawerBorderDefaults.utils.js.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-content/utils/getDrawerContentParts.utils.cjs +2 -0
- package/dist/components/navigation/drawer/components/drawer-content/utils/getDrawerContentParts.utils.cjs.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-content/utils/getDrawerContentParts.utils.js +34 -0
- package/dist/components/navigation/drawer/components/drawer-content/utils/getDrawerContentParts.utils.js.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-footer/DrawerFooter.cjs +2 -0
- package/dist/components/navigation/drawer/components/drawer-footer/DrawerFooter.cjs.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-footer/DrawerFooter.js +15 -0
- package/dist/components/navigation/drawer/components/drawer-footer/DrawerFooter.js.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-footer/constants/index.cjs +2 -0
- package/dist/components/navigation/drawer/components/drawer-footer/constants/index.cjs.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-footer/constants/index.js +10 -0
- package/dist/components/navigation/drawer/components/drawer-footer/constants/index.js.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-group/DrawerGroup.cjs +2 -0
- package/dist/components/navigation/drawer/components/drawer-group/DrawerGroup.cjs.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-group/DrawerGroup.css.cjs +2 -0
- package/dist/components/navigation/drawer/components/drawer-group/DrawerGroup.css.cjs.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-group/DrawerGroup.css.js +13 -0
- package/dist/components/navigation/drawer/components/drawer-group/DrawerGroup.css.js.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-group/DrawerGroup.js +29 -0
- package/dist/components/navigation/drawer/components/drawer-group/DrawerGroup.js.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-group/hooks/useDrawerGroup.hook.cjs +2 -0
- package/dist/components/navigation/drawer/components/drawer-group/hooks/useDrawerGroup.hook.cjs.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-group/hooks/useDrawerGroup.hook.js +8 -0
- package/dist/components/navigation/drawer/components/drawer-group/hooks/useDrawerGroup.hook.js.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-header/DrawerHeader.cjs +2 -0
- package/dist/components/navigation/drawer/components/drawer-header/DrawerHeader.cjs.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-header/DrawerHeader.js +15 -0
- package/dist/components/navigation/drawer/components/drawer-header/DrawerHeader.js.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-header/constants/index.cjs +2 -0
- package/dist/components/navigation/drawer/components/drawer-header/constants/index.cjs.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-header/constants/index.js +12 -0
- package/dist/components/navigation/drawer/components/drawer-header/constants/index.js.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-item/DrawerItem.cjs +2 -0
- package/dist/components/navigation/drawer/components/drawer-item/DrawerItem.cjs.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-item/DrawerItem.css.cjs +2 -0
- package/dist/components/navigation/drawer/components/drawer-item/DrawerItem.css.cjs.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-item/DrawerItem.css.js +15 -0
- package/dist/components/navigation/drawer/components/drawer-item/DrawerItem.css.js.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-item/DrawerItem.js +48 -0
- package/dist/components/navigation/drawer/components/drawer-item/DrawerItem.js.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-item/constants/index.cjs +2 -0
- package/dist/components/navigation/drawer/components/drawer-item/constants/index.cjs.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-item/constants/index.js +10 -0
- package/dist/components/navigation/drawer/components/drawer-item/constants/index.js.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-item/utils/getDrawerItemParts.utils.cjs +2 -0
- package/dist/components/navigation/drawer/components/drawer-item/utils/getDrawerItemParts.utils.cjs.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-item/utils/getDrawerItemParts.utils.js +57 -0
- package/dist/components/navigation/drawer/components/drawer-item/utils/getDrawerItemParts.utils.js.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-trigger/DrawerTrigger.cjs +2 -0
- package/dist/components/navigation/drawer/components/drawer-trigger/DrawerTrigger.cjs.map +1 -0
- package/dist/components/navigation/drawer/components/drawer-trigger/DrawerTrigger.js +14 -0
- package/dist/components/navigation/drawer/components/drawer-trigger/DrawerTrigger.js.map +1 -0
- package/dist/components/navigation/drawer/constants/index.cjs +2 -0
- package/dist/components/navigation/drawer/constants/index.cjs.map +1 -0
- package/dist/components/navigation/drawer/constants/index.js +62 -0
- package/dist/components/navigation/drawer/constants/index.js.map +1 -0
- package/dist/components/navigation/drawer/contexts/DrawerContext.cjs +2 -0
- package/dist/components/navigation/drawer/contexts/DrawerContext.cjs.map +1 -0
- package/dist/components/navigation/drawer/contexts/DrawerContext.js +6 -0
- package/dist/components/navigation/drawer/contexts/DrawerContext.js.map +1 -0
- package/dist/components/navigation/drawer/hooks/useDrawer.hook.cjs +2 -0
- package/dist/components/navigation/drawer/hooks/useDrawer.hook.cjs.map +1 -0
- package/dist/components/navigation/drawer/hooks/useDrawer.hook.js +9 -0
- package/dist/components/navigation/drawer/hooks/useDrawer.hook.js.map +1 -0
- package/dist/components/navigation/drawer/hooks/useDrawerContext.hook.cjs +2 -0
- package/dist/components/navigation/drawer/hooks/useDrawerContext.hook.cjs.map +1 -0
- package/dist/components/navigation/drawer/hooks/useDrawerContext.hook.js +11 -0
- package/dist/components/navigation/drawer/hooks/useDrawerContext.hook.js.map +1 -0
- package/dist/components/navigation/link/Link.cjs +2 -0
- package/dist/components/navigation/link/Link.cjs.map +1 -0
- package/dist/components/navigation/link/Link.css.cjs +2 -0
- package/dist/components/navigation/link/Link.css.cjs.map +1 -0
- package/dist/components/navigation/link/Link.css.js +33 -0
- package/dist/components/navigation/link/Link.css.js.map +1 -0
- package/dist/components/navigation/link/Link.js +33 -0
- package/dist/components/navigation/link/Link.js.map +1 -0
- package/dist/components/navigation/link/constants/index.cjs +2 -0
- package/dist/components/navigation/link/constants/index.cjs.map +1 -0
- package/dist/components/navigation/link/constants/index.js +13 -0
- package/dist/components/navigation/link/constants/index.js.map +1 -0
- package/dist/components/navigation/link/utils/getLinkClassName.utils.cjs +2 -0
- package/dist/components/navigation/link/utils/getLinkClassName.utils.cjs.map +1 -0
- package/dist/components/navigation/link/utils/getLinkClassName.utils.js +8 -0
- package/dist/components/navigation/link/utils/getLinkClassName.utils.js.map +1 -0
- package/dist/components/navigation/link/utils/getLinkParts.utils.cjs +2 -0
- package/dist/components/navigation/link/utils/getLinkParts.utils.cjs.map +1 -0
- package/dist/components/navigation/link/utils/getLinkParts.utils.js +15 -0
- package/dist/components/navigation/link/utils/getLinkParts.utils.js.map +1 -0
- package/dist/components/navigation/tabs/Tabs.cjs +2 -0
- package/dist/components/navigation/tabs/Tabs.cjs.map +1 -0
- package/dist/components/navigation/tabs/Tabs.css.cjs +2 -0
- package/dist/components/navigation/tabs/Tabs.css.cjs.map +1 -0
- package/dist/components/navigation/tabs/Tabs.css.js +25 -0
- package/dist/components/navigation/tabs/Tabs.css.js.map +1 -0
- package/dist/components/navigation/tabs/Tabs.js +32 -0
- package/dist/components/navigation/tabs/Tabs.js.map +1 -0
- package/dist/components/navigation/tabs/components/tabs-list/TabsList.cjs +2 -0
- package/dist/components/navigation/tabs/components/tabs-list/TabsList.cjs.map +1 -0
- package/dist/components/navigation/tabs/components/tabs-list/TabsList.css.cjs +2 -0
- package/dist/components/navigation/tabs/components/tabs-list/TabsList.css.cjs.map +1 -0
- package/dist/components/navigation/tabs/components/tabs-list/TabsList.css.js +25 -0
- package/dist/components/navigation/tabs/components/tabs-list/TabsList.css.js.map +1 -0
- package/dist/components/navigation/tabs/components/tabs-list/TabsList.js +37 -0
- package/dist/components/navigation/tabs/components/tabs-list/TabsList.js.map +1 -0
- package/dist/components/navigation/tabs/components/tabs-list/constants/index.cjs +2 -0
- package/dist/components/navigation/tabs/components/tabs-list/constants/index.cjs.map +1 -0
- package/dist/components/navigation/tabs/components/tabs-list/constants/index.js +30 -0
- package/dist/components/navigation/tabs/components/tabs-list/constants/index.js.map +1 -0
- package/dist/components/navigation/tabs/components/tabs-list/utils/getTabsListClassName.utils.cjs +2 -0
- package/dist/components/navigation/tabs/components/tabs-list/utils/getTabsListClassName.utils.cjs.map +1 -0
- package/dist/components/navigation/tabs/components/tabs-list/utils/getTabsListClassName.utils.js +7 -0
- package/dist/components/navigation/tabs/components/tabs-list/utils/getTabsListClassName.utils.js.map +1 -0
- package/dist/components/navigation/tabs/components/tabs-list/utils/getTabsListStyle.utils.cjs +2 -0
- package/dist/components/navigation/tabs/components/tabs-list/utils/getTabsListStyle.utils.cjs.map +1 -0
- package/dist/components/navigation/tabs/components/tabs-list/utils/getTabsListStyle.utils.js +15 -0
- package/dist/components/navigation/tabs/components/tabs-list/utils/getTabsListStyle.utils.js.map +1 -0
- package/dist/components/navigation/tabs/components/tabs-panel/TabsPanel.cjs +2 -0
- package/dist/components/navigation/tabs/components/tabs-panel/TabsPanel.cjs.map +1 -0
- package/dist/components/navigation/tabs/components/tabs-panel/TabsPanel.css.cjs +2 -0
- package/dist/components/navigation/tabs/components/tabs-panel/TabsPanel.css.cjs.map +1 -0
- package/dist/components/navigation/tabs/components/tabs-panel/TabsPanel.css.js +7 -0
- package/dist/components/navigation/tabs/components/tabs-panel/TabsPanel.css.js.map +1 -0
- package/dist/components/navigation/tabs/components/tabs-panel/TabsPanel.js +14 -0
- package/dist/components/navigation/tabs/components/tabs-panel/TabsPanel.js.map +1 -0
- package/dist/components/navigation/tabs/components/tabs-tab/TabsTab.cjs +2 -0
- package/dist/components/navigation/tabs/components/tabs-tab/TabsTab.cjs.map +1 -0
- package/dist/components/navigation/tabs/components/tabs-tab/TabsTab.css.cjs +2 -0
- package/dist/components/navigation/tabs/components/tabs-tab/TabsTab.css.cjs.map +1 -0
- package/dist/components/navigation/tabs/components/tabs-tab/TabsTab.css.js +18 -0
- package/dist/components/navigation/tabs/components/tabs-tab/TabsTab.css.js.map +1 -0
- package/dist/components/navigation/tabs/components/tabs-tab/TabsTab.js +35 -0
- package/dist/components/navigation/tabs/components/tabs-tab/TabsTab.js.map +1 -0
- package/dist/components/navigation/tabs/components/tabs-tab/hooks/useAssertInsideTabsList.hook.cjs +2 -0
- package/dist/components/navigation/tabs/components/tabs-tab/hooks/useAssertInsideTabsList.hook.cjs.map +1 -0
- package/dist/components/navigation/tabs/components/tabs-tab/hooks/useAssertInsideTabsList.hook.js +10 -0
- package/dist/components/navigation/tabs/components/tabs-tab/hooks/useAssertInsideTabsList.hook.js.map +1 -0
- package/dist/components/navigation/tabs/components/tabs-tab/utils/getTabsTabParts.utils.cjs +2 -0
- package/dist/components/navigation/tabs/components/tabs-tab/utils/getTabsTabParts.utils.cjs.map +1 -0
- package/dist/components/navigation/tabs/components/tabs-tab/utils/getTabsTabParts.utils.js +30 -0
- package/dist/components/navigation/tabs/components/tabs-tab/utils/getTabsTabParts.utils.js.map +1 -0
- package/dist/components/navigation/tabs/constants/index.cjs +2 -0
- package/dist/components/navigation/tabs/constants/index.cjs.map +1 -0
- package/dist/components/navigation/tabs/constants/index.js +17 -0
- package/dist/components/navigation/tabs/constants/index.js.map +1 -0
- package/dist/components/navigation/tabs/contexts/TabsContext.cjs +2 -0
- package/dist/components/navigation/tabs/contexts/TabsContext.cjs.map +1 -0
- package/dist/components/navigation/tabs/contexts/TabsContext.js +6 -0
- package/dist/components/navigation/tabs/contexts/TabsContext.js.map +1 -0
- package/dist/components/navigation/tabs/contexts/TabsListContext.cjs +2 -0
- package/dist/components/navigation/tabs/contexts/TabsListContext.cjs.map +1 -0
- package/dist/components/navigation/tabs/contexts/TabsListContext.js +6 -0
- package/dist/components/navigation/tabs/contexts/TabsListContext.js.map +1 -0
- package/dist/components/navigation/tabs/hooks/useTabsContext.hook.cjs +2 -0
- package/dist/components/navigation/tabs/hooks/useTabsContext.hook.cjs.map +1 -0
- package/dist/components/navigation/tabs/hooks/useTabsContext.hook.js +11 -0
- package/dist/components/navigation/tabs/hooks/useTabsContext.hook.js.map +1 -0
- package/dist/components/overlays/_common/dialog-base/constants/index.cjs +2 -0
- package/dist/components/overlays/_common/dialog-base/constants/index.cjs.map +1 -0
- package/dist/components/overlays/_common/dialog-base/constants/index.js +30 -0
- package/dist/components/overlays/_common/dialog-base/constants/index.js.map +1 -0
- package/dist/components/overlays/_common/dialog-base/dialogBase.css.cjs +2 -0
- package/dist/components/overlays/_common/dialog-base/dialogBase.css.cjs.map +1 -0
- package/dist/components/overlays/_common/dialog-base/dialogBase.css.js +29 -0
- package/dist/components/overlays/_common/dialog-base/dialogBase.css.js.map +1 -0
- package/dist/components/overlays/_common/dialog-base/utils/getDialogBaseContentStyle.utils.cjs +2 -0
- package/dist/components/overlays/_common/dialog-base/utils/getDialogBaseContentStyle.utils.cjs.map +1 -0
- package/dist/components/overlays/_common/dialog-base/utils/getDialogBaseContentStyle.utils.js +24 -0
- package/dist/components/overlays/_common/dialog-base/utils/getDialogBaseContentStyle.utils.js.map +1 -0
- package/dist/components/overlays/_common/popup-base/constants/index.cjs +2 -0
- package/dist/components/overlays/_common/popup-base/constants/index.cjs.map +1 -0
- package/dist/components/overlays/_common/popup-base/constants/index.js +35 -0
- package/dist/components/overlays/_common/popup-base/constants/index.js.map +1 -0
- package/dist/components/overlays/_common/popup-base/popupBase.css.cjs +2 -0
- package/dist/components/overlays/_common/popup-base/popupBase.css.cjs.map +1 -0
- package/dist/components/overlays/_common/popup-base/popupBase.css.js +18 -0
- package/dist/components/overlays/_common/popup-base/popupBase.css.js.map +1 -0
- package/dist/components/overlays/_common/popup-base/utils/getPopupBaseParts.utils.cjs +2 -0
- package/dist/components/overlays/_common/popup-base/utils/getPopupBaseParts.utils.cjs.map +1 -0
- package/dist/components/overlays/_common/popup-base/utils/getPopupBaseParts.utils.js +32 -0
- package/dist/components/overlays/_common/popup-base/utils/getPopupBaseParts.utils.js.map +1 -0
- package/dist/components/overlays/_common/text-part-base/utils/getTextPartBaseContent.utils.cjs +2 -0
- package/dist/components/overlays/_common/text-part-base/utils/getTextPartBaseContent.utils.cjs.map +1 -0
- package/dist/components/overlays/_common/text-part-base/utils/getTextPartBaseContent.utils.js +10 -0
- package/dist/components/overlays/_common/text-part-base/utils/getTextPartBaseContent.utils.js.map +1 -0
- package/dist/components/overlays/alert-dialog/AlertDialog.cjs +2 -0
- package/dist/components/overlays/alert-dialog/AlertDialog.cjs.map +1 -0
- package/dist/components/overlays/alert-dialog/AlertDialog.js +39 -0
- package/dist/components/overlays/alert-dialog/AlertDialog.js.map +1 -0
- package/dist/components/overlays/alert-dialog/components/alert-dialog-body/AlertDialogBody.cjs +2 -0
- package/dist/components/overlays/alert-dialog/components/alert-dialog-body/AlertDialogBody.cjs.map +1 -0
- package/dist/components/overlays/alert-dialog/components/alert-dialog-body/AlertDialogBody.js +27 -0
- package/dist/components/overlays/alert-dialog/components/alert-dialog-body/AlertDialogBody.js.map +1 -0
- package/dist/components/overlays/alert-dialog/components/alert-dialog-close/AlertDialogClose.cjs +2 -0
- package/dist/components/overlays/alert-dialog/components/alert-dialog-close/AlertDialogClose.cjs.map +1 -0
- package/dist/components/overlays/alert-dialog/components/alert-dialog-close/AlertDialogClose.js +10 -0
- package/dist/components/overlays/alert-dialog/components/alert-dialog-close/AlertDialogClose.js.map +1 -0
- package/dist/components/overlays/alert-dialog/components/alert-dialog-content/AlertDialogContent.cjs +2 -0
- package/dist/components/overlays/alert-dialog/components/alert-dialog-content/AlertDialogContent.cjs.map +1 -0
- package/dist/components/overlays/alert-dialog/components/alert-dialog-content/AlertDialogContent.js +41 -0
- package/dist/components/overlays/alert-dialog/components/alert-dialog-content/AlertDialogContent.js.map +1 -0
- package/dist/components/overlays/alert-dialog/components/alert-dialog-description/AlertDialogDescription.cjs +2 -0
- package/dist/components/overlays/alert-dialog/components/alert-dialog-description/AlertDialogDescription.cjs.map +1 -0
- package/dist/components/overlays/alert-dialog/components/alert-dialog-description/AlertDialogDescription.js +16 -0
- package/dist/components/overlays/alert-dialog/components/alert-dialog-description/AlertDialogDescription.js.map +1 -0
- package/dist/components/overlays/alert-dialog/components/alert-dialog-footer/AlertDialogFooter.cjs +2 -0
- package/dist/components/overlays/alert-dialog/components/alert-dialog-footer/AlertDialogFooter.cjs.map +1 -0
- package/dist/components/overlays/alert-dialog/components/alert-dialog-footer/AlertDialogFooter.js +15 -0
- package/dist/components/overlays/alert-dialog/components/alert-dialog-footer/AlertDialogFooter.js.map +1 -0
- package/dist/components/overlays/alert-dialog/components/alert-dialog-header/AlertDialogHeader.cjs +2 -0
- package/dist/components/overlays/alert-dialog/components/alert-dialog-header/AlertDialogHeader.cjs.map +1 -0
- package/dist/components/overlays/alert-dialog/components/alert-dialog-header/AlertDialogHeader.js +15 -0
- package/dist/components/overlays/alert-dialog/components/alert-dialog-header/AlertDialogHeader.js.map +1 -0
- package/dist/components/overlays/alert-dialog/components/alert-dialog-title/AlertDialogTitle.cjs +2 -0
- package/dist/components/overlays/alert-dialog/components/alert-dialog-title/AlertDialogTitle.cjs.map +1 -0
- package/dist/components/overlays/alert-dialog/components/alert-dialog-title/AlertDialogTitle.js +16 -0
- package/dist/components/overlays/alert-dialog/components/alert-dialog-title/AlertDialogTitle.js.map +1 -0
- package/dist/components/overlays/alert-dialog/components/alert-dialog-trigger/AlertDialogTrigger.cjs +2 -0
- package/dist/components/overlays/alert-dialog/components/alert-dialog-trigger/AlertDialogTrigger.cjs.map +1 -0
- package/dist/components/overlays/alert-dialog/components/alert-dialog-trigger/AlertDialogTrigger.js +14 -0
- package/dist/components/overlays/alert-dialog/components/alert-dialog-trigger/AlertDialogTrigger.js.map +1 -0
- package/dist/components/overlays/alert-dialog/constants/index.cjs +2 -0
- package/dist/components/overlays/alert-dialog/constants/index.cjs.map +1 -0
- package/dist/components/overlays/alert-dialog/constants/index.js +14 -0
- package/dist/components/overlays/alert-dialog/constants/index.js.map +1 -0
- package/dist/components/overlays/alert-dialog/contexts/AlertDialogContext.cjs +2 -0
- package/dist/components/overlays/alert-dialog/contexts/AlertDialogContext.cjs.map +1 -0
- package/dist/components/overlays/alert-dialog/contexts/AlertDialogContext.js +6 -0
- package/dist/components/overlays/alert-dialog/contexts/AlertDialogContext.js.map +1 -0
- package/dist/components/overlays/alert-dialog/hooks/useAssertAlertDialogTriggerPlacement.hook.cjs +2 -0
- package/dist/components/overlays/alert-dialog/hooks/useAssertAlertDialogTriggerPlacement.hook.cjs.map +1 -0
- package/dist/components/overlays/alert-dialog/hooks/useAssertAlertDialogTriggerPlacement.hook.js +10 -0
- package/dist/components/overlays/alert-dialog/hooks/useAssertAlertDialogTriggerPlacement.hook.js.map +1 -0
- package/dist/components/overlays/alert-dialog/hooks/useAssertInsideAlertDialog.hook.cjs +2 -0
- package/dist/components/overlays/alert-dialog/hooks/useAssertInsideAlertDialog.hook.cjs.map +1 -0
- package/dist/components/overlays/alert-dialog/hooks/useAssertInsideAlertDialog.hook.js +9 -0
- package/dist/components/overlays/alert-dialog/hooks/useAssertInsideAlertDialog.hook.js.map +1 -0
- package/dist/components/overlays/alert-dialog/utils/createAlertDialogHandle.utils.cjs +2 -0
- package/dist/components/overlays/alert-dialog/utils/createAlertDialogHandle.utils.cjs.map +1 -0
- package/dist/components/overlays/alert-dialog/utils/createAlertDialogHandle.utils.js +6 -0
- package/dist/components/overlays/alert-dialog/utils/createAlertDialogHandle.utils.js.map +1 -0
- package/dist/components/overlays/dialog/Dialog.cjs +2 -0
- package/dist/components/overlays/dialog/Dialog.cjs.map +1 -0
- package/dist/components/overlays/dialog/Dialog.js +42 -0
- package/dist/components/overlays/dialog/Dialog.js.map +1 -0
- package/dist/components/overlays/dialog/components/dialog-body/DialogBody.cjs +2 -0
- package/dist/components/overlays/dialog/components/dialog-body/DialogBody.cjs.map +1 -0
- package/dist/components/overlays/dialog/components/dialog-body/DialogBody.js +27 -0
- package/dist/components/overlays/dialog/components/dialog-body/DialogBody.js.map +1 -0
- package/dist/components/overlays/dialog/components/dialog-close/DialogClose.cjs +2 -0
- package/dist/components/overlays/dialog/components/dialog-close/DialogClose.cjs.map +1 -0
- package/dist/components/overlays/dialog/components/dialog-close/DialogClose.js +10 -0
- package/dist/components/overlays/dialog/components/dialog-close/DialogClose.js.map +1 -0
- package/dist/components/overlays/dialog/components/dialog-content/DialogContent.cjs +2 -0
- package/dist/components/overlays/dialog/components/dialog-content/DialogContent.cjs.map +1 -0
- package/dist/components/overlays/dialog/components/dialog-content/DialogContent.js +44 -0
- package/dist/components/overlays/dialog/components/dialog-content/DialogContent.js.map +1 -0
- package/dist/components/overlays/dialog/components/dialog-description/DialogDescription.cjs +2 -0
- package/dist/components/overlays/dialog/components/dialog-description/DialogDescription.cjs.map +1 -0
- package/dist/components/overlays/dialog/components/dialog-description/DialogDescription.js +16 -0
- package/dist/components/overlays/dialog/components/dialog-description/DialogDescription.js.map +1 -0
- package/dist/components/overlays/dialog/components/dialog-footer/DialogFooter.cjs +2 -0
- package/dist/components/overlays/dialog/components/dialog-footer/DialogFooter.cjs.map +1 -0
- package/dist/components/overlays/dialog/components/dialog-footer/DialogFooter.js +15 -0
- package/dist/components/overlays/dialog/components/dialog-footer/DialogFooter.js.map +1 -0
- package/dist/components/overlays/dialog/components/dialog-header/DialogHeader.cjs +2 -0
- package/dist/components/overlays/dialog/components/dialog-header/DialogHeader.cjs.map +1 -0
- package/dist/components/overlays/dialog/components/dialog-header/DialogHeader.js +15 -0
- package/dist/components/overlays/dialog/components/dialog-header/DialogHeader.js.map +1 -0
- package/dist/components/overlays/dialog/components/dialog-title/DialogTitle.cjs +2 -0
- package/dist/components/overlays/dialog/components/dialog-title/DialogTitle.cjs.map +1 -0
- package/dist/components/overlays/dialog/components/dialog-title/DialogTitle.js +16 -0
- package/dist/components/overlays/dialog/components/dialog-title/DialogTitle.js.map +1 -0
- package/dist/components/overlays/dialog/components/dialog-trigger/DialogTrigger.cjs +2 -0
- package/dist/components/overlays/dialog/components/dialog-trigger/DialogTrigger.cjs.map +1 -0
- package/dist/components/overlays/dialog/components/dialog-trigger/DialogTrigger.js +14 -0
- package/dist/components/overlays/dialog/components/dialog-trigger/DialogTrigger.js.map +1 -0
- package/dist/components/overlays/dialog/constants/index.cjs +2 -0
- package/dist/components/overlays/dialog/constants/index.cjs.map +1 -0
- package/dist/components/overlays/dialog/constants/index.js +14 -0
- package/dist/components/overlays/dialog/constants/index.js.map +1 -0
- package/dist/components/overlays/dialog/contexts/DialogContext.cjs +2 -0
- package/dist/components/overlays/dialog/contexts/DialogContext.cjs.map +1 -0
- package/dist/components/overlays/dialog/contexts/DialogContext.js +6 -0
- package/dist/components/overlays/dialog/contexts/DialogContext.js.map +1 -0
- package/dist/components/overlays/dialog/hooks/useAssertDialogTriggerPlacement.hook.cjs +2 -0
- package/dist/components/overlays/dialog/hooks/useAssertDialogTriggerPlacement.hook.cjs.map +1 -0
- package/dist/components/overlays/dialog/hooks/useAssertDialogTriggerPlacement.hook.js +10 -0
- package/dist/components/overlays/dialog/hooks/useAssertDialogTriggerPlacement.hook.js.map +1 -0
- package/dist/components/overlays/dialog/hooks/useAssertInsideDialog.hook.cjs +2 -0
- package/dist/components/overlays/dialog/hooks/useAssertInsideDialog.hook.cjs.map +1 -0
- package/dist/components/overlays/dialog/hooks/useAssertInsideDialog.hook.js +11 -0
- package/dist/components/overlays/dialog/hooks/useAssertInsideDialog.hook.js.map +1 -0
- package/dist/components/overlays/dialog/utils/createDialogHandle.utils.cjs +2 -0
- package/dist/components/overlays/dialog/utils/createDialogHandle.utils.cjs.map +1 -0
- package/dist/components/overlays/dialog/utils/createDialogHandle.utils.js +6 -0
- package/dist/components/overlays/dialog/utils/createDialogHandle.utils.js.map +1 -0
- package/dist/components/overlays/dropdown-menu/DropdownMenu.cjs +2 -0
- package/dist/components/overlays/dropdown-menu/DropdownMenu.cjs.map +1 -0
- package/dist/components/overlays/dropdown-menu/DropdownMenu.js +33 -0
- package/dist/components/overlays/dropdown-menu/DropdownMenu.js.map +1 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-content/DropdownMenuContent.cjs +2 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-content/DropdownMenuContent.cjs.map +1 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-content/DropdownMenuContent.css.cjs +2 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-content/DropdownMenuContent.css.cjs.map +1 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-content/DropdownMenuContent.css.js +7 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-content/DropdownMenuContent.css.js.map +1 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-content/DropdownMenuContent.js +45 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-content/DropdownMenuContent.js.map +1 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-group/DropdownMenuGroup.cjs +2 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-group/DropdownMenuGroup.cjs.map +1 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-group/DropdownMenuGroup.css.cjs +2 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-group/DropdownMenuGroup.css.cjs.map +1 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-group/DropdownMenuGroup.css.js +7 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-group/DropdownMenuGroup.css.js.map +1 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-group/DropdownMenuGroup.js +16 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-group/DropdownMenuGroup.js.map +1 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-item/DropdownMenuItem.cjs +2 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-item/DropdownMenuItem.cjs.map +1 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-item/DropdownMenuItem.css.cjs +2 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-item/DropdownMenuItem.css.cjs.map +1 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-item/DropdownMenuItem.css.js +15 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-item/DropdownMenuItem.css.js.map +1 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-item/DropdownMenuItem.js +33 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-item/DropdownMenuItem.js.map +1 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-item/constants/index.cjs +2 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-item/constants/index.cjs.map +1 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-item/constants/index.js +8 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-item/constants/index.js.map +1 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-separator/DropdownMenuSeparator.cjs +2 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-separator/DropdownMenuSeparator.cjs.map +1 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-separator/DropdownMenuSeparator.css.cjs +2 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-separator/DropdownMenuSeparator.css.cjs.map +1 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-separator/DropdownMenuSeparator.css.js +7 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-separator/DropdownMenuSeparator.css.js.map +1 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-separator/DropdownMenuSeparator.js +14 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-separator/DropdownMenuSeparator.js.map +1 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-sub-menu/DropdownMenuSubMenu.cjs +2 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-sub-menu/DropdownMenuSubMenu.cjs.map +1 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-sub-menu/DropdownMenuSubMenu.js +20 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-sub-menu/DropdownMenuSubMenu.js.map +1 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-sub-menu-content/DropdownMenuSubMenuContent.cjs +2 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-sub-menu-content/DropdownMenuSubMenuContent.cjs.map +1 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-sub-menu-content/DropdownMenuSubMenuContent.js +18 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-sub-menu-content/DropdownMenuSubMenuContent.js.map +1 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-sub-menu-content/constants/index.cjs +2 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-sub-menu-content/constants/index.cjs.map +1 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-sub-menu-content/constants/index.js +10 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-sub-menu-content/constants/index.js.map +1 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-sub-menu-trigger/DropdownMenuSubMenuTrigger.cjs +2 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-sub-menu-trigger/DropdownMenuSubMenuTrigger.cjs.map +1 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-sub-menu-trigger/DropdownMenuSubMenuTrigger.css.cjs +2 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-sub-menu-trigger/DropdownMenuSubMenuTrigger.css.cjs.map +1 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-sub-menu-trigger/DropdownMenuSubMenuTrigger.css.js +7 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-sub-menu-trigger/DropdownMenuSubMenuTrigger.css.js.map +1 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-sub-menu-trigger/DropdownMenuSubMenuTrigger.js +38 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-sub-menu-trigger/DropdownMenuSubMenuTrigger.js.map +1 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-sub-menu-trigger/constants/index.cjs +2 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-sub-menu-trigger/constants/index.cjs.map +1 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-sub-menu-trigger/constants/index.js +5 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-sub-menu-trigger/constants/index.js.map +1 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-trigger/DropdownMenuTrigger.cjs +2 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-trigger/DropdownMenuTrigger.cjs.map +1 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-trigger/DropdownMenuTrigger.js +10 -0
- package/dist/components/overlays/dropdown-menu/components/dropdown-menu-trigger/DropdownMenuTrigger.js.map +1 -0
- package/dist/components/overlays/dropdown-menu/constants/index.cjs +2 -0
- package/dist/components/overlays/dropdown-menu/constants/index.cjs.map +1 -0
- package/dist/components/overlays/dropdown-menu/constants/index.js +16 -0
- package/dist/components/overlays/dropdown-menu/constants/index.js.map +1 -0
- package/dist/components/overlays/dropdown-menu/contexts/DropdownMenuContext.cjs +2 -0
- package/dist/components/overlays/dropdown-menu/contexts/DropdownMenuContext.cjs.map +1 -0
- package/dist/components/overlays/dropdown-menu/contexts/DropdownMenuContext.js +6 -0
- package/dist/components/overlays/dropdown-menu/contexts/DropdownMenuContext.js.map +1 -0
- package/dist/components/overlays/dropdown-menu/contexts/DropdownMenuSubMenuContext.cjs +2 -0
- package/dist/components/overlays/dropdown-menu/contexts/DropdownMenuSubMenuContext.cjs.map +1 -0
- package/dist/components/overlays/dropdown-menu/contexts/DropdownMenuSubMenuContext.js +6 -0
- package/dist/components/overlays/dropdown-menu/contexts/DropdownMenuSubMenuContext.js.map +1 -0
- package/dist/components/overlays/dropdown-menu/hooks/useAssertInsideDropdownMenu.hook.cjs +2 -0
- package/dist/components/overlays/dropdown-menu/hooks/useAssertInsideDropdownMenu.hook.cjs.map +1 -0
- package/dist/components/overlays/dropdown-menu/hooks/useAssertInsideDropdownMenu.hook.js +9 -0
- package/dist/components/overlays/dropdown-menu/hooks/useAssertInsideDropdownMenu.hook.js.map +1 -0
- package/dist/components/overlays/dropdown-menu/hooks/useAssertInsideDropdownMenuSubMenu.hook.cjs +2 -0
- package/dist/components/overlays/dropdown-menu/hooks/useAssertInsideDropdownMenuSubMenu.hook.cjs.map +1 -0
- package/dist/components/overlays/dropdown-menu/hooks/useAssertInsideDropdownMenuSubMenu.hook.js +9 -0
- package/dist/components/overlays/dropdown-menu/hooks/useAssertInsideDropdownMenuSubMenu.hook.js.map +1 -0
- package/dist/components/overlays/hover-card/HoverCard.cjs +2 -0
- package/dist/components/overlays/hover-card/HoverCard.cjs.map +1 -0
- package/dist/components/overlays/hover-card/HoverCard.js +20 -0
- package/dist/components/overlays/hover-card/HoverCard.js.map +1 -0
- package/dist/components/overlays/hover-card/components/hover-card-content/HoverCardContent.cjs +2 -0
- package/dist/components/overlays/hover-card/components/hover-card-content/HoverCardContent.cjs.map +1 -0
- package/dist/components/overlays/hover-card/components/hover-card-content/HoverCardContent.js +38 -0
- package/dist/components/overlays/hover-card/components/hover-card-content/HoverCardContent.js.map +1 -0
- package/dist/components/overlays/hover-card/components/hover-card-content/constants/index.cjs +2 -0
- package/dist/components/overlays/hover-card/components/hover-card-content/constants/index.cjs.map +1 -0
- package/dist/components/overlays/hover-card/components/hover-card-content/constants/index.js +5 -0
- package/dist/components/overlays/hover-card/components/hover-card-content/constants/index.js.map +1 -0
- package/dist/components/overlays/hover-card/components/hover-card-trigger/HoverCardTrigger.cjs +2 -0
- package/dist/components/overlays/hover-card/components/hover-card-trigger/HoverCardTrigger.cjs.map +1 -0
- package/dist/components/overlays/hover-card/components/hover-card-trigger/HoverCardTrigger.js +15 -0
- package/dist/components/overlays/hover-card/components/hover-card-trigger/HoverCardTrigger.js.map +1 -0
- package/dist/components/overlays/hover-card/components/hover-card-trigger/constants/index.cjs +2 -0
- package/dist/components/overlays/hover-card/components/hover-card-trigger/constants/index.cjs.map +1 -0
- package/dist/components/overlays/hover-card/components/hover-card-trigger/constants/index.js +8 -0
- package/dist/components/overlays/hover-card/components/hover-card-trigger/constants/index.js.map +1 -0
- package/dist/components/overlays/hover-card/constants/index.cjs +2 -0
- package/dist/components/overlays/hover-card/constants/index.cjs.map +1 -0
- package/dist/components/overlays/hover-card/constants/index.js +8 -0
- package/dist/components/overlays/hover-card/constants/index.js.map +1 -0
- package/dist/components/overlays/hover-card/contexts/HoverCardContext.cjs +2 -0
- package/dist/components/overlays/hover-card/contexts/HoverCardContext.cjs.map +1 -0
- package/dist/components/overlays/hover-card/contexts/HoverCardContext.js +6 -0
- package/dist/components/overlays/hover-card/contexts/HoverCardContext.js.map +1 -0
- package/dist/components/overlays/hover-card/hooks/useAssertInsideHoverCard.hook.cjs +2 -0
- package/dist/components/overlays/hover-card/hooks/useAssertInsideHoverCard.hook.cjs.map +1 -0
- package/dist/components/overlays/hover-card/hooks/useAssertInsideHoverCard.hook.js +9 -0
- package/dist/components/overlays/hover-card/hooks/useAssertInsideHoverCard.hook.js.map +1 -0
- package/dist/components/overlays/popover/Popover.cjs +2 -0
- package/dist/components/overlays/popover/Popover.cjs.map +1 -0
- package/dist/components/overlays/popover/Popover.js +27 -0
- package/dist/components/overlays/popover/Popover.js.map +1 -0
- package/dist/components/overlays/popover/components/popover-close/PopoverClose.cjs +2 -0
- package/dist/components/overlays/popover/components/popover-close/PopoverClose.cjs.map +1 -0
- package/dist/components/overlays/popover/components/popover-close/PopoverClose.js +10 -0
- package/dist/components/overlays/popover/components/popover-close/PopoverClose.js.map +1 -0
- package/dist/components/overlays/popover/components/popover-content/PopoverContent.cjs +2 -0
- package/dist/components/overlays/popover/components/popover-content/PopoverContent.cjs.map +1 -0
- package/dist/components/overlays/popover/components/popover-content/PopoverContent.js +39 -0
- package/dist/components/overlays/popover/components/popover-content/PopoverContent.js.map +1 -0
- package/dist/components/overlays/popover/components/popover-content/constants/index.cjs +2 -0
- package/dist/components/overlays/popover/components/popover-content/constants/index.cjs.map +1 -0
- package/dist/components/overlays/popover/components/popover-content/constants/index.js +5 -0
- package/dist/components/overlays/popover/components/popover-content/constants/index.js.map +1 -0
- package/dist/components/overlays/popover/components/popover-description/PopoverDescription.cjs +2 -0
- package/dist/components/overlays/popover/components/popover-description/PopoverDescription.cjs.map +1 -0
- package/dist/components/overlays/popover/components/popover-description/PopoverDescription.css.cjs +2 -0
- package/dist/components/overlays/popover/components/popover-description/PopoverDescription.css.cjs.map +1 -0
- package/dist/components/overlays/popover/components/popover-description/PopoverDescription.css.js +7 -0
- package/dist/components/overlays/popover/components/popover-description/PopoverDescription.css.js.map +1 -0
- package/dist/components/overlays/popover/components/popover-description/PopoverDescription.js +16 -0
- package/dist/components/overlays/popover/components/popover-description/PopoverDescription.js.map +1 -0
- package/dist/components/overlays/popover/components/popover-title/PopoverTitle.cjs +2 -0
- package/dist/components/overlays/popover/components/popover-title/PopoverTitle.cjs.map +1 -0
- package/dist/components/overlays/popover/components/popover-title/PopoverTitle.css.cjs +2 -0
- package/dist/components/overlays/popover/components/popover-title/PopoverTitle.css.cjs.map +1 -0
- package/dist/components/overlays/popover/components/popover-title/PopoverTitle.css.js +7 -0
- package/dist/components/overlays/popover/components/popover-title/PopoverTitle.css.js.map +1 -0
- package/dist/components/overlays/popover/components/popover-title/PopoverTitle.js +16 -0
- package/dist/components/overlays/popover/components/popover-title/PopoverTitle.js.map +1 -0
- package/dist/components/overlays/popover/components/popover-trigger/PopoverTrigger.cjs +2 -0
- package/dist/components/overlays/popover/components/popover-trigger/PopoverTrigger.cjs.map +1 -0
- package/dist/components/overlays/popover/components/popover-trigger/PopoverTrigger.js +10 -0
- package/dist/components/overlays/popover/components/popover-trigger/PopoverTrigger.js.map +1 -0
- package/dist/components/overlays/popover/constants/index.cjs +2 -0
- package/dist/components/overlays/popover/constants/index.cjs.map +1 -0
- package/dist/components/overlays/popover/constants/index.js +11 -0
- package/dist/components/overlays/popover/constants/index.js.map +1 -0
- package/dist/components/overlays/popover/contexts/PopoverContext.cjs +2 -0
- package/dist/components/overlays/popover/contexts/PopoverContext.cjs.map +1 -0
- package/dist/components/overlays/popover/contexts/PopoverContext.js +6 -0
- package/dist/components/overlays/popover/contexts/PopoverContext.js.map +1 -0
- package/dist/components/overlays/popover/hooks/useAssertInsidePopover.hook.cjs +2 -0
- package/dist/components/overlays/popover/hooks/useAssertInsidePopover.hook.cjs.map +1 -0
- package/dist/components/overlays/popover/hooks/useAssertInsidePopover.hook.js +9 -0
- package/dist/components/overlays/popover/hooks/useAssertInsidePopover.hook.js.map +1 -0
- package/dist/components/overlays/tooltip/Tooltip.cjs +2 -0
- package/dist/components/overlays/tooltip/Tooltip.cjs.map +1 -0
- package/dist/components/overlays/tooltip/Tooltip.css.cjs +2 -0
- package/dist/components/overlays/tooltip/Tooltip.css.cjs.map +1 -0
- package/dist/components/overlays/tooltip/Tooltip.css.js +37 -0
- package/dist/components/overlays/tooltip/Tooltip.css.js.map +1 -0
- package/dist/components/overlays/tooltip/Tooltip.js +52 -0
- package/dist/components/overlays/tooltip/Tooltip.js.map +1 -0
- package/dist/components/overlays/tooltip/components/tooltip-provider/TooltipProvider.cjs +2 -0
- package/dist/components/overlays/tooltip/components/tooltip-provider/TooltipProvider.cjs.map +1 -0
- package/dist/components/overlays/tooltip/components/tooltip-provider/TooltipProvider.js +17 -0
- package/dist/components/overlays/tooltip/components/tooltip-provider/TooltipProvider.js.map +1 -0
- package/dist/components/overlays/tooltip/constants/index.cjs +2 -0
- package/dist/components/overlays/tooltip/constants/index.cjs.map +1 -0
- package/dist/components/overlays/tooltip/constants/index.js +15 -0
- package/dist/components/overlays/tooltip/constants/index.js.map +1 -0
- package/dist/components/overlays/tooltip/contexts/TooltipProviderContext.cjs +2 -0
- package/dist/components/overlays/tooltip/contexts/TooltipProviderContext.cjs.map +1 -0
- package/dist/components/overlays/tooltip/contexts/TooltipProviderContext.js +6 -0
- package/dist/components/overlays/tooltip/contexts/TooltipProviderContext.js.map +1 -0
- package/dist/components/overlays/tooltip/hooks/use-tooltip/useTooltip.hook.cjs +2 -0
- package/dist/components/overlays/tooltip/hooks/use-tooltip/useTooltip.hook.cjs.map +1 -0
- package/dist/components/overlays/tooltip/hooks/use-tooltip/useTooltip.hook.js +15 -0
- package/dist/components/overlays/tooltip/hooks/use-tooltip/useTooltip.hook.js.map +1 -0
- package/dist/components/overlays/tooltip/utils/getTooltipTriggerElement.utils.cjs +2 -0
- package/dist/components/overlays/tooltip/utils/getTooltipTriggerElement.utils.cjs.map +1 -0
- package/dist/components/overlays/tooltip/utils/getTooltipTriggerElement.utils.js +10 -0
- package/dist/components/overlays/tooltip/utils/getTooltipTriggerElement.utils.js.map +1 -0
- package/dist/constants/boxMarginStylePropNames.const.cjs +2 -0
- package/dist/constants/boxMarginStylePropNames.const.cjs.map +1 -0
- package/dist/constants/boxMarginStylePropNames.const.js +13 -0
- package/dist/constants/boxMarginStylePropNames.const.js.map +1 -0
- package/dist/constants/boxPaddingStylePropNames.const.cjs +2 -0
- package/dist/constants/boxPaddingStylePropNames.const.cjs.map +1 -0
- package/dist/constants/boxPaddingStylePropNames.const.js +13 -0
- package/dist/constants/boxPaddingStylePropNames.const.js.map +1 -0
- package/dist/constants/boxSpacingPropChains.const.cjs +2 -0
- package/dist/constants/boxSpacingPropChains.const.cjs.map +1 -0
- package/dist/constants/boxSpacingPropChains.const.js +28 -0
- package/dist/constants/boxSpacingPropChains.const.js.map +1 -0
- package/dist/constants/controlSizes.const.cjs +2 -0
- package/dist/constants/controlSizes.const.cjs.map +1 -0
- package/dist/constants/controlSizes.const.js +23 -0
- package/dist/constants/controlSizes.const.js.map +1 -0
- package/dist/constants/iconRegistry.const.cjs +2 -0
- package/dist/constants/iconRegistry.const.cjs.map +1 -0
- package/dist/constants/iconRegistry.const.js +51 -0
- package/dist/constants/iconRegistry.const.js.map +1 -0
- package/dist/constants/stateFlags.const.cjs +2 -0
- package/dist/constants/stateFlags.const.cjs.map +1 -0
- package/dist/constants/stateFlags.const.js +18 -0
- package/dist/constants/stateFlags.const.js.map +1 -0
- package/dist/constants/toneColors.const.cjs +2 -0
- package/dist/constants/toneColors.const.cjs.map +1 -0
- package/dist/constants/toneColors.const.js +15 -0
- package/dist/constants/toneColors.const.js.map +1 -0
- package/dist/constants/tones.const.cjs +2 -0
- package/dist/constants/tones.const.cjs.map +1 -0
- package/dist/constants/tones.const.js +14 -0
- package/dist/constants/tones.const.js.map +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +3560 -0
- package/dist/index.d.ts +3560 -0
- package/dist/index.js +23 -0
- package/dist/styles.css +2 -0
- package/package.json +91 -3
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,3560 @@
|
|
|
1
|
+
import { AlertDialog as AlertDialog_2 } from '@base-ui/react/alert-dialog';
|
|
2
|
+
import { BoxAsChildProps } from '@choco-vanille/primitives';
|
|
3
|
+
import { BoxProps } from '@choco-vanille/primitives';
|
|
4
|
+
import { BoxStyleProps } from '@choco-vanille/primitives';
|
|
5
|
+
import { BoxTag } from '@choco-vanille/primitives';
|
|
6
|
+
import { ColgroupHTMLAttributes } from 'react';
|
|
7
|
+
import { Collapsible } from '@base-ui/react/collapsible';
|
|
8
|
+
import { ComponentPropsWithRef } from 'react';
|
|
9
|
+
import { CSSProperties } from 'react';
|
|
10
|
+
import { DetailedHTMLProps } from 'react';
|
|
11
|
+
import { Dialog as Dialog_2 } from '@base-ui/react/dialog';
|
|
12
|
+
import { Drawer as Drawer_2 } from '@base-ui/react/drawer';
|
|
13
|
+
import { FC } from 'react';
|
|
14
|
+
import { FontSizeToken } from '@choco-vanille/theme';
|
|
15
|
+
import { FontWeightToken } from '@choco-vanille/theme';
|
|
16
|
+
import { HTMLAttributes } from 'react';
|
|
17
|
+
import { IconData } from '@choco-vanille/primitives';
|
|
18
|
+
import { IconSize } from '@choco-vanille/primitives';
|
|
19
|
+
import { Menu } from '@base-ui/react/menu';
|
|
20
|
+
import { MouseEventHandler } from 'react';
|
|
21
|
+
import { Popover as Popover_2 } from '@base-ui/react/popover';
|
|
22
|
+
import { PreviewCard } from '@base-ui/react/preview-card';
|
|
23
|
+
import { ReactElement } from 'react';
|
|
24
|
+
import { ReactNode } from 'react';
|
|
25
|
+
import { Ref } from 'react';
|
|
26
|
+
import { RefObject } from 'react';
|
|
27
|
+
import { SpaceToken } from '@choco-vanille/theme';
|
|
28
|
+
import { Tabs as Tabs_2 } from '@base-ui/react/tabs';
|
|
29
|
+
import { Tooltip as Tooltip_2 } from '@base-ui/react/tooltip';
|
|
30
|
+
import { TypographyProps } from '@choco-vanille/primitives';
|
|
31
|
+
|
|
32
|
+
export declare const AlertDialog: (<Payload = unknown>({ actionsRef, children, defaultOpen, defaultTriggerId, handle, onOpenChange, onOpenChangeComplete, open, triggerId, }: AlertDialogProps<Payload>) => ReactElement) & {
|
|
33
|
+
Body: FC<AlertDialogBodyProps>;
|
|
34
|
+
Close: FC< AlertDialogCloseProps | AlertDialogCloseAsChildProps>;
|
|
35
|
+
Content: FC<AlertDialogContentProps>;
|
|
36
|
+
createHandle: <Payload = unknown>() => AlertDialogHandle<Payload>;
|
|
37
|
+
Description: FC< AlertDialogDescriptionProps | AlertDialogDescriptionAsChildProps>;
|
|
38
|
+
Footer: <Tag extends BoxTag = "div">(props: AlertDialogFooterAsChildProps | AlertDialogFooterProps<Tag>) => ReactElement;
|
|
39
|
+
Header: <Tag extends BoxTag = "div">(props: AlertDialogHeaderAsChildProps | AlertDialogHeaderProps<Tag>) => ReactElement;
|
|
40
|
+
Title: FC< AlertDialogTitleProps | AlertDialogTitleAsChildProps>;
|
|
41
|
+
Trigger: <Payload = unknown>({ handle, payload, ...props }: AlertDialogTriggerAsChildProps<Payload> | AlertDialogTriggerProps<Payload>) => ReactElement;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/** Actions of an `AlertDialog` its `actionsRef` receives: `close()`, and `unmount()` after `preventUnmountOnClose()`. */
|
|
45
|
+
export declare type AlertDialogActions = AlertDialog_2.Root.Actions;
|
|
46
|
+
|
|
47
|
+
/** Props an `AlertDialog.Body` handles itself, besides those of its `ScrollArea`. */
|
|
48
|
+
declare type AlertDialogBodyOwnProps = DialogBaseBodySpacingProps & Readonly<{
|
|
49
|
+
/** Content of the dialog, such as text, fields or a list. */
|
|
50
|
+
children?: ReactNode;
|
|
51
|
+
}>;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Props of an `AlertDialog.Body`: its content and paddings, then those of the
|
|
55
|
+
* `ScrollArea` it renders, its sizing props and `className` on its root,
|
|
56
|
+
* and the attributes, events and `ref` of its viewport, the `div` that
|
|
57
|
+
* scrolls, but its margin props: the dialog spaces its sections itself.
|
|
58
|
+
*/
|
|
59
|
+
export declare type AlertDialogBodyProps = AlertDialogBodyOwnProps & Readonly<Omit<ScrollAreaProps, keyof AlertDialogBodyOwnProps | keyof BoxMarginStyleProps>>;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Props of an `AlertDialog.Close` rendering its single child (`asChild`), such as
|
|
63
|
+
* a `Button` or an `IconButton`, which must render a native `button`: the
|
|
64
|
+
* attributes, events and `ref` of the close button, merged onto the child.
|
|
65
|
+
*/
|
|
66
|
+
export declare type AlertDialogCloseAsChildProps = TriggerBaseAsChildProps;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Props of an `AlertDialog.Close` rendering its own `button`: its content, then
|
|
70
|
+
* the attributes, events and `ref` of the `button`.
|
|
71
|
+
*/
|
|
72
|
+
export declare type AlertDialogCloseProps = TriggerBaseProps;
|
|
73
|
+
|
|
74
|
+
/** Props an `AlertDialog.Content` handles itself, besides those of its popup. */
|
|
75
|
+
declare type AlertDialogContentOwnProps = DialogBaseContentSizeProps & DialogBaseContentSpacingProps & Readonly<{
|
|
76
|
+
/** Content of the alert dialog: an `AlertDialog.Header`, an `AlertDialog.Body` and an `AlertDialog.Footer`, each one optional, stacked in a column. */
|
|
77
|
+
children?: ReactNode;
|
|
78
|
+
/** Element, shadow root or ref to one the alert dialog is rendered into, in a portal; the `body` when absent. */
|
|
79
|
+
container?: AlertDialog_2.Portal.Props['container'];
|
|
80
|
+
/** Keeps the closed alert dialog in the DOM, hidden, so its state is preserved until it opens again; unmounted once closed when absent or false. */
|
|
81
|
+
keepMounted?: boolean | undefined;
|
|
82
|
+
/** Element focused when the alert dialog opens, given to Base UI: `true` for the default, `false` to leave the focus where it is, a ref, such as that of the action that cancels, or a function of the interaction (`mouse`, `touch`, `pen`, `keyboard`) returning one of them; when absent, the first tabbable element, or the popup when opened by touch or without one. */
|
|
83
|
+
initialFocus?: AlertDialog_2.Popup.Props['initialFocus'];
|
|
84
|
+
/** Element focused when the alert dialog closes, given to Base UI: `true` for the trigger, `false` to leave the focus where it is, a ref, or a function of the interaction returning one of them; the trigger, or the element focused before the alert dialog opened, when absent. */
|
|
85
|
+
finalFocus?: AlertDialog_2.Popup.Props['finalFocus'];
|
|
86
|
+
/** Classes added after the generated ones, on the popup. */
|
|
87
|
+
className?: string | undefined;
|
|
88
|
+
/** Classes added after the generated ones, on the backdrop behind the alert dialog. */
|
|
89
|
+
backdropClassName?: string | undefined;
|
|
90
|
+
/** Inline styles of the popup, merged after the sizing and spacing variables, so they prevail. */
|
|
91
|
+
style?: CSSProperties | undefined;
|
|
92
|
+
}>;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Props of an `AlertDialog.Content`: its content, sizing and spacing props, portal
|
|
96
|
+
* `container` and `keepMounted`, focus targets and backdrop classes, then the attributes,
|
|
97
|
+
* events and `ref` of its popup, a `div` with the `alertdialog` role, named by
|
|
98
|
+
* its `AlertDialog.Title` or else by `aria-label`, but its content.
|
|
99
|
+
*/
|
|
100
|
+
export declare type AlertDialogContentProps = AlertDialogContentOwnProps & Readonly<Omit<ComponentPropsWithRef<'div'>, keyof AlertDialogContentOwnProps | 'dangerouslySetInnerHTML'>>;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Props of an `AlertDialog.Description` rendering its single child (`asChild`),
|
|
104
|
+
* such as a `div` holding several paragraphs: the attributes, events and
|
|
105
|
+
* `ref` of the description, merged onto the child.
|
|
106
|
+
*/
|
|
107
|
+
export declare type AlertDialogDescriptionAsChildProps = AlertDialogDescriptionElementProps & Readonly<{
|
|
108
|
+
/** Renders the single child, with the props of the description merged onto it. */
|
|
109
|
+
asChild: true;
|
|
110
|
+
/** Single element rendered as the description; its text describes the dialog. */
|
|
111
|
+
children: ReactElement;
|
|
112
|
+
}>;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Attributes, events and `ref` of the paragraph an `AlertDialog.Description`
|
|
116
|
+
* renders or merges onto its child, but its content.
|
|
117
|
+
*/
|
|
118
|
+
declare type AlertDialogDescriptionElementProps = Readonly<Omit<ComponentPropsWithRef<'p'>, 'children'>>;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Props of an `AlertDialog.Description` rendering its own `p`: its text, then the
|
|
122
|
+
* attributes, events and `ref` of the paragraph.
|
|
123
|
+
*/
|
|
124
|
+
export declare type AlertDialogDescriptionProps = AlertDialogDescriptionElementProps & Readonly<{
|
|
125
|
+
/** Renders the single child instead of a `p` when true; absent or false here. */
|
|
126
|
+
asChild?: false | undefined;
|
|
127
|
+
/** Text of the paragraph, which describes the dialog. */
|
|
128
|
+
children?: ReactNode;
|
|
129
|
+
}>;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Props of an `AlertDialog.Footer` rendering its single child (`asChild`) instead
|
|
133
|
+
* of an element: those of a `Box`, merged onto the child, with the same
|
|
134
|
+
* defaults as without `asChild`.
|
|
135
|
+
*/
|
|
136
|
+
export declare type AlertDialogFooterAsChildProps = BoxAsChildProps;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Props of an `AlertDialog.Footer` rendering `Tag`: those of a `Box` rendering
|
|
140
|
+
* it, `div` by default, any value given replacing the layout and spacing it
|
|
141
|
+
* defaults to, its paddings and gaps included.
|
|
142
|
+
*/
|
|
143
|
+
export declare type AlertDialogFooterProps<Tag extends BoxTag = 'div'> = BoxProps<Tag>;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Handle of an `AlertDialog`, made by `AlertDialog.createHandle()` and
|
|
147
|
+
* given to the alert dialog and to its triggers rendered outside it; it
|
|
148
|
+
* also opens it (`open(triggerId)`, `openWithPayload(payload)`), closes it
|
|
149
|
+
* (`close()`) and tells whether it is open (`isOpen`), outside the render.
|
|
150
|
+
*/
|
|
151
|
+
export declare type AlertDialogHandle<Payload = unknown> = AlertDialog_2.Handle<Payload>;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Props of an `AlertDialog.Header` rendering its single child (`asChild`) instead
|
|
155
|
+
* of an element: those of a `Box`, merged onto the child, with the same
|
|
156
|
+
* defaults as without `asChild`.
|
|
157
|
+
*/
|
|
158
|
+
export declare type AlertDialogHeaderAsChildProps = BoxAsChildProps;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Props of an `AlertDialog.Header` rendering `Tag`: those of a `Box` rendering
|
|
162
|
+
* it, `div` by default, any value given replacing the layout and spacing it
|
|
163
|
+
* defaults to, its paddings and gaps included.
|
|
164
|
+
*/
|
|
165
|
+
export declare type AlertDialogHeaderProps<Tag extends BoxTag = 'div'> = BoxProps<Tag>;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Details of an open state change of an `AlertDialog`, those of Base UI as
|
|
169
|
+
* they are: the cause of the change (`reason`, such as `trigger-press`,
|
|
170
|
+
* `escape-key`, `close-press` or `imperative-action`), the native `event`,
|
|
171
|
+
* the `trigger` element, `cancel()`, which keeps the current state, and
|
|
172
|
+
* `preventUnmountOnClose()`, which keeps the closing content mounted until
|
|
173
|
+
* `actionsRef` calls `unmount()`.
|
|
174
|
+
*/
|
|
175
|
+
export declare type AlertDialogOpenChangeDetails = AlertDialog_2.Root.ChangeEventDetails;
|
|
176
|
+
|
|
177
|
+
/** Children of an `AlertDialog` given as a function of the `payload` of the trigger that opened it. */
|
|
178
|
+
export declare type AlertDialogPayloadChildren<Payload> = (state: Readonly<{
|
|
179
|
+
/** `payload` of the trigger that opened the alert dialog; `undefined` without one, or when opened by `open`. */
|
|
180
|
+
payload: Payload | undefined;
|
|
181
|
+
}>) => ReactNode;
|
|
182
|
+
|
|
183
|
+
/** Props of an `AlertDialog`, which renders no element of its own and is always modal; `Payload` is the type of the `payload` of its triggers. */
|
|
184
|
+
export declare type AlertDialogProps<Payload = unknown> = Readonly<{
|
|
185
|
+
/** Parts of the alert dialog: an optional `AlertDialog.Trigger`, then an `AlertDialog.Content`, or a function of the `payload` of the trigger returning them. */
|
|
186
|
+
children?: ReactNode | AlertDialogPayloadChildren<Payload>;
|
|
187
|
+
/** Controlled open state; keep it always defined or absent, with `onOpenChange`. */
|
|
188
|
+
open?: boolean | undefined;
|
|
189
|
+
/** Initial open state of an uncontrolled alert dialog; `false` when absent. */
|
|
190
|
+
defaultOpen?: boolean | undefined;
|
|
191
|
+
/** Called with the requested open state and the details of the change, whose `cancel()` keeps the current state. */
|
|
192
|
+
onOpenChange?: ((open: boolean, eventDetails: AlertDialogOpenChangeDetails) => void) | undefined;
|
|
193
|
+
/** Called with the new open state once the alert dialog has finished opening or closing, its transitions included. */
|
|
194
|
+
onOpenChangeComplete?: ((open: boolean) => void) | undefined;
|
|
195
|
+
/** Ref receiving the actions of the alert dialog, to close it outside the render. */
|
|
196
|
+
actionsRef?: RefObject<AlertDialogActions | null> | undefined;
|
|
197
|
+
/** Handle from `AlertDialog.createHandle()` linking the alert dialog to triggers rendered outside it; none when absent. */
|
|
198
|
+
handle?: AlertDialogHandle<Payload> | undefined;
|
|
199
|
+
/** `id` of the trigger the controlled alert dialog is open for, with several triggers; set alongside `open`. */
|
|
200
|
+
triggerId?: string | null | undefined;
|
|
201
|
+
/** `id` of the trigger the alert dialog opens for initially, alongside `defaultOpen`. */
|
|
202
|
+
defaultTriggerId?: string | null | undefined;
|
|
203
|
+
}>;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Props of an `AlertDialog.Title` rendering its single child (`asChild`), such as
|
|
207
|
+
* a heading of another level: the attributes, events and `ref` of the
|
|
208
|
+
* title, merged onto the child.
|
|
209
|
+
*/
|
|
210
|
+
export declare type AlertDialogTitleAsChildProps = AlertDialogTitleElementProps & Readonly<{
|
|
211
|
+
/** Renders the single child, with the props of the title merged onto it. */
|
|
212
|
+
asChild: true;
|
|
213
|
+
/** Single element, such as an `h1`, rendered as the title; its text names the dialog. */
|
|
214
|
+
children: ReactElement;
|
|
215
|
+
}>;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Attributes, events and `ref` of the heading an `AlertDialog.Title` renders or
|
|
219
|
+
* merges onto its child, but its content.
|
|
220
|
+
*/
|
|
221
|
+
declare type AlertDialogTitleElementProps = Readonly<Omit<ComponentPropsWithRef<'h2'>, 'children'>>;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Props of an `AlertDialog.Title` rendering its own `h2`: its text, then the
|
|
225
|
+
* attributes, events and `ref` of the heading.
|
|
226
|
+
*/
|
|
227
|
+
export declare type AlertDialogTitleProps = AlertDialogTitleElementProps & Readonly<{
|
|
228
|
+
/** Renders the single child instead of an `h2` when true; absent or false here. */
|
|
229
|
+
asChild?: false | undefined;
|
|
230
|
+
/** Text of the heading, which names the dialog. */
|
|
231
|
+
children?: ReactNode;
|
|
232
|
+
}>;
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Props of an `AlertDialog.Trigger` rendering its single child
|
|
236
|
+
* (`asChild`), such as a `Button`, which must render a native `button`:
|
|
237
|
+
* its handle and payload, then the attributes, events and `ref` of the
|
|
238
|
+
* trigger, merged onto the child.
|
|
239
|
+
*/
|
|
240
|
+
export declare type AlertDialogTriggerAsChildProps<Payload = unknown> = AlertDialogTriggerOwnProps<Payload> & TriggerBaseAsChildProps;
|
|
241
|
+
|
|
242
|
+
/** Props an `AlertDialog.Trigger` handles itself, besides those of its `button`. */
|
|
243
|
+
declare type AlertDialogTriggerOwnProps<Payload = unknown> = Readonly<{
|
|
244
|
+
/** Handle from `AlertDialog.createHandle()` of the alert dialog it opens, so it can be rendered outside that `AlertDialog`; the enclosing `AlertDialog` when absent. */
|
|
245
|
+
handle?: AlertDialogHandle<Payload> | undefined;
|
|
246
|
+
/** Value the children function of the `AlertDialog` receives when this trigger opens it, such as the item to delete. */
|
|
247
|
+
payload?: Payload | undefined;
|
|
248
|
+
}>;
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Props of an `AlertDialog.Trigger` rendering its own `button`: its
|
|
252
|
+
* content, handle and payload, then the attributes, events and `ref` of
|
|
253
|
+
* the `button`, its `id` naming it for `triggerId`.
|
|
254
|
+
*/
|
|
255
|
+
export declare type AlertDialogTriggerProps<Payload = unknown> = AlertDialogTriggerOwnProps<Payload> & TriggerBaseProps;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Renders a short, non-interactive label, such as a status or a category:
|
|
259
|
+
* an inline `span` (a `Box`) showing its `label` in a `Typography` `span`,
|
|
260
|
+
* between optional decorative icons. The label stays on a single line,
|
|
261
|
+
* truncated with an ellipsis when the badge is narrower than its text, the
|
|
262
|
+
* icons keeping their size. `variant`, `tone`, `size` and `radius` set its
|
|
263
|
+
* colors, dimensions and corners; it has no hover, pressed nor focus style.
|
|
264
|
+
* The `dotted` variant draws a neutral badge with a dot of the color of the
|
|
265
|
+
* tone first, before the start icon.
|
|
266
|
+
*
|
|
267
|
+
* Its label is read in the flow of the surrounding content, in full even
|
|
268
|
+
* when truncated; the dot and the icons, given as icon data and drawn by
|
|
269
|
+
* `Icon`s at the icon size of the size, are hidden from assistive
|
|
270
|
+
* technologies. It has no role, so give it a context, such as the label of
|
|
271
|
+
* its row, when its text alone is not clear.
|
|
272
|
+
*
|
|
273
|
+
* The margin props of `Box` space it and its `maxWidth`, `100%` unless
|
|
274
|
+
* given, caps it before its label is truncated. Every other prop
|
|
275
|
+
* (attributes, events, `ref`) goes to the outer `span`; `className` comes
|
|
276
|
+
* after the generated classes and `style` after the generated variables.
|
|
277
|
+
* Its styles sit in the `cv.components` cascade layers, below any unlayered
|
|
278
|
+
* style of the consumer.
|
|
279
|
+
*
|
|
280
|
+
* @param props Label, icons, presentation, margin props, `maxWidth` and
|
|
281
|
+
* native props of the `span`.
|
|
282
|
+
* @param props.label Visible text of the badge, shown on one line.
|
|
283
|
+
* @param props.size Height, padding, font size, icon size, dot size and
|
|
284
|
+
* gap; `sm` when absent.
|
|
285
|
+
* @param props.variant Colors of the badge, and its dot for `dotted`;
|
|
286
|
+
* `subtleOutlined` when absent.
|
|
287
|
+
* @param props.startIcon Data of the decorative icon before the label; none
|
|
288
|
+
* when absent.
|
|
289
|
+
* @param props.endIcon Data of the decorative icon after the label; none
|
|
290
|
+
* when absent.
|
|
291
|
+
* @returns The badge.
|
|
292
|
+
*/
|
|
293
|
+
export declare const Badge: FC<BadgeProps>;
|
|
294
|
+
|
|
295
|
+
/** Name of a style prop of `Box` a `Badge` accepts. */
|
|
296
|
+
declare type BadgeBoxStylePropName = (typeof badgeBoxStylePropNames)[number];
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Style props of `Box` a `Badge` accepts and forwards to its outer `span`,
|
|
300
|
+
* as `Box` types and applies them: the margin props, shorthands included,
|
|
301
|
+
* and `maxWidth`, which caps the badge before its label is truncated.
|
|
302
|
+
* Single source of the `BadgeBoxStyleProps` type, in alphabetical order.
|
|
303
|
+
*/
|
|
304
|
+
declare const badgeBoxStylePropNames: readonly ["margin", "marginBottom", "marginLeft", "marginRight", "marginTop", "marginX", "marginY", "maxWidth"];
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Style props of `Box` a `Badge` accepts, applied as `Box` applies them:
|
|
308
|
+
* the margin props, shorthands included, which take space tokens of the
|
|
309
|
+
* theme, and `maxWidth`, which takes any CSS value, a number being a length
|
|
310
|
+
* in pixels; `100%` when absent, so the badge never exceeds its container.
|
|
311
|
+
*/
|
|
312
|
+
declare type BadgeBoxStyleProps = Pick<BoxStyleProps, BadgeBoxStylePropName>;
|
|
313
|
+
|
|
314
|
+
/** Props a `Badge` handles itself. */
|
|
315
|
+
declare type BadgeOwnProps = Readonly<{
|
|
316
|
+
/** Visible text of the badge, rendered in a `Typography` `span` on one line, truncated with an ellipsis when too long but read in full by assistive technologies. */
|
|
317
|
+
label: string;
|
|
318
|
+
/** Tinted fill with a tinted outline, solid fill, outline, tinted fill, or neutral outline with a dot of the tone; `subtleOutlined` when absent. */
|
|
319
|
+
variant?: BadgeVariant | undefined;
|
|
320
|
+
/** Color intent of the theme; `primary` when absent. */
|
|
321
|
+
tone?: BadgeTone | undefined;
|
|
322
|
+
/** Height, padding, font size, icon size, dot size and gap; `sm` when absent. */
|
|
323
|
+
size?: BadgeSize | undefined;
|
|
324
|
+
/** Square corners, slightly rounded corners or a pill, the same at every size; `default` when absent. */
|
|
325
|
+
radius?: BadgeRadius | undefined;
|
|
326
|
+
/** Data of the decorative icon before the label, drawn by an `Icon` at the icon size and hidden from assistive technologies; none when absent. */
|
|
327
|
+
startIcon?: IconData | undefined;
|
|
328
|
+
/** Data of the decorative icon after the label, drawn by an `Icon` at the icon size and hidden from assistive technologies; none when absent. */
|
|
329
|
+
endIcon?: IconData | undefined;
|
|
330
|
+
/** Classes added after the generated ones. */
|
|
331
|
+
className?: string | undefined;
|
|
332
|
+
/** Inline styles, merged after the generated variables, so they prevail. */
|
|
333
|
+
style?: CSSProperties | undefined;
|
|
334
|
+
}>;
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Props of a `Badge`: its own props and the margin props and `maxWidth` of
|
|
338
|
+
* `Box`, then the attributes, events and `ref` of the rendered `span`, but
|
|
339
|
+
* its content and the legacy `color` attribute.
|
|
340
|
+
*/
|
|
341
|
+
export declare type BadgeProps = BadgeOwnProps & BadgeBoxStyleProps & Readonly<Omit<ComponentPropsWithRef<'span'>, keyof BadgeOwnProps | keyof BadgeBoxStyleProps | BoxComponentExcludedAttribute>>;
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Corner radii a `Badge` takes, an ordered scale from the squarest to the
|
|
345
|
+
* roundest: square corners, slightly rounded corners, or a pill. `default`
|
|
346
|
+
* is the default.
|
|
347
|
+
*/
|
|
348
|
+
declare const badgeRadii: readonly ["none", "default", "full"];
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Corner radius of a `Badge`, the same at every size: square corners
|
|
352
|
+
* (`none`), slightly rounded corners (`default`), or a pill (`full`).
|
|
353
|
+
*/
|
|
354
|
+
declare type BadgeRadius = (typeof badgeRadii)[number];
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Size of a `Badge`, from the smallest to the largest: its minimum height
|
|
358
|
+
* (20, 24, 28 or 32px from `xs` to `lg`), with its padding, font size, icon
|
|
359
|
+
* size, dot size and gap.
|
|
360
|
+
*/
|
|
361
|
+
export declare type BadgeSize = (typeof badgeSizes)[number];
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* Sizes a `Badge` takes, an ordered scale from the smallest to the largest:
|
|
365
|
+
* 20, 24, 28 and 32px high. `sm` is the default.
|
|
366
|
+
*/
|
|
367
|
+
declare const badgeSizes: readonly ["xs", "sm", "md", "lg"];
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Tone of a `Badge`: the color intent of the theme its colors come from, of
|
|
371
|
+
* the same name, among the tones of `Button` and the accents of the theme.
|
|
372
|
+
*/
|
|
373
|
+
export declare type BadgeTone = (typeof extendedTones)[number];
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Variant of a `Badge`: a tinted fill with a tinted outline
|
|
377
|
+
* (`subtleOutlined`), a solid fill (`contained`), an outline
|
|
378
|
+
* (`outlined`), a tinted fill (`subtleContained`), or a neutral outline
|
|
379
|
+
* and text with a dot of the color of the tone before the label
|
|
380
|
+
* (`dotted`).
|
|
381
|
+
*/
|
|
382
|
+
export declare type BadgeVariant = (typeof badgeVariants)[number];
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Variants a `Badge` takes, the first being the default: a tinted fill
|
|
386
|
+
* with a tinted outline, a solid fill, an outline, a tinted fill, or a
|
|
387
|
+
* neutral outline with a dot of the color of the tone.
|
|
388
|
+
*/
|
|
389
|
+
declare const badgeVariants: readonly ["subtleOutlined", "contained", "outlined", "subtleContained", "dotted"];
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* Native attributes a component rendered by a `Box` with content of its own,
|
|
393
|
+
* such as `Button` or `Badge`, does not accept: it renders that content
|
|
394
|
+
* itself, and `color`, a legacy attribute, would be read by `Box` as its
|
|
395
|
+
* text color.
|
|
396
|
+
*/
|
|
397
|
+
declare type BoxComponentExcludedAttribute = 'children' | 'color' | 'dangerouslySetInnerHTML';
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* Margin props of `Box`, shorthands included, in alphabetical order, which
|
|
401
|
+
* the components rendered by a `Box` accept and forward to it, completed
|
|
402
|
+
* by each one with its own style props. Internal and never exported.
|
|
403
|
+
*/
|
|
404
|
+
declare const boxMarginStylePropNames: readonly ["margin", "marginBottom", "marginLeft", "marginRight", "marginTop", "marginX", "marginY"];
|
|
405
|
+
|
|
406
|
+
/** Margin props of `Box` a component accepts to space itself from its siblings: longhands and shorthands, each a step of the space scale or `auto`. */
|
|
407
|
+
declare type BoxMarginStyleProps = Pick<BoxStyleProps, (typeof boxMarginStylePropNames)[number]>;
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Renders a native `button` (a `Box`) showing its `label` in a `Typography`
|
|
411
|
+
* `span`, between optional decorative icons. `variant`, `tone` and `size`
|
|
412
|
+
* set its colors and dimensions; the width props of `Box` size it, its
|
|
413
|
+
* content staying centered. The label inherits the color of the button,
|
|
414
|
+
* wraps freely, or is truncated with an ellipsis after `maxLines` lines.
|
|
415
|
+
*
|
|
416
|
+
* `loading` hides the content behind a spinner, keeping the width and the
|
|
417
|
+
* name of the button, flags it with `data-loading`, `aria-busy` and
|
|
418
|
+
* `aria-disabled`, and cancels its clicks: `onClick` is not called and no
|
|
419
|
+
* form is submitted, but other handlers run and the button stays focusable.
|
|
420
|
+
* A given `selected` makes it a toggle button: `aria-pressed` exposes its
|
|
421
|
+
* state, and while `true` it keeps its pressed colors, hovered or loading,
|
|
422
|
+
* and is flagged with `data-selected`; disabled, it takes the disabled colors.
|
|
423
|
+
*
|
|
424
|
+
* The label names the button, or `aria-label` when the label is empty; the
|
|
425
|
+
* icons, given as icon data and drawn by `Icon`s at the icon size of the
|
|
426
|
+
* size, are hidden from assistive technologies. `type` is `button` unless
|
|
427
|
+
* given. `disabled` disables it natively and flags it with `data-disabled`.
|
|
428
|
+
* The focus ring shows on keyboard focus only.
|
|
429
|
+
*
|
|
430
|
+
* With `asChild`, it renders its single child instead, an element without
|
|
431
|
+
* content such as a router link, which carries the destination and keeps
|
|
432
|
+
* its own role: the classes, props, `ref` and handlers of the button are
|
|
433
|
+
* merged onto it, the child's handlers running first and its own values
|
|
434
|
+
* prevailing for any other prop, and the label and icons become its
|
|
435
|
+
* content. It then takes neither `type`, `disabled`, `loading` nor
|
|
436
|
+
* `selected`.
|
|
437
|
+
*
|
|
438
|
+
* The margin and width props of `Box` space and size it. Every other prop
|
|
439
|
+
* (attributes, events, `ref`) goes to the `button` or the child; `className`
|
|
440
|
+
* comes after the generated classes and `style` after the generated
|
|
441
|
+
* variables. Its styles sit in the `cv.components` cascade layers, below any
|
|
442
|
+
* unlayered style of the consumer.
|
|
443
|
+
*
|
|
444
|
+
* @param props Label, single child with `asChild`, presentation, icons,
|
|
445
|
+
* loading and selected states, margin and width props and native props of
|
|
446
|
+
* the `button`.
|
|
447
|
+
* @param props.label Visible text of the button, which names it.
|
|
448
|
+
* @param props.maxLines Lines after which the label is truncated; it wraps
|
|
449
|
+
* freely when absent.
|
|
450
|
+
* @param props.size Height, padding and font sizes; `md` when absent.
|
|
451
|
+
* @param props.startIcon Data of the decorative icon before the label; none
|
|
452
|
+
* when absent.
|
|
453
|
+
* @param props.endIcon Data of the decorative icon after the label; none
|
|
454
|
+
* when absent.
|
|
455
|
+
* @returns The button, or its child with `asChild`.
|
|
456
|
+
* @throws {Error} With `asChild`, when the children are not a single
|
|
457
|
+
* element, or have content of their own.
|
|
458
|
+
*/
|
|
459
|
+
export declare const Button: FC<ButtonAsChildProps | ButtonProps>;
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* Props of a `Button` rendering its single child (`asChild`), such as the
|
|
463
|
+
* link of a router, which renders the `a` and carries the destination: its
|
|
464
|
+
* own props, `label` included, the margin and width props of `Box`, then
|
|
465
|
+
* the global attributes, events and `ref` merged onto the child. It takes
|
|
466
|
+
* neither `type`, `disabled`, `loading` nor `selected`, which only a
|
|
467
|
+
* `button` honors.
|
|
468
|
+
*/
|
|
469
|
+
export declare type ButtonAsChildProps = ButtonOwnProps & ButtonBoxStyleProps & Readonly<{
|
|
470
|
+
/** Renders the single child, with the props, styles, label and icons of the button merged onto it. */
|
|
471
|
+
asChild: true;
|
|
472
|
+
/** Single element without content rendering an `a`, such as a router link, which receives the label and the icons. */
|
|
473
|
+
children: ReactElement;
|
|
474
|
+
/** Not accepted: a link has no disabled state; render a disabled `Button` without `asChild` instead. */
|
|
475
|
+
disabled?: never;
|
|
476
|
+
/** Not accepted: a link has no loading state. */
|
|
477
|
+
loading?: never;
|
|
478
|
+
/** Not accepted: `aria-pressed` makes a toggle button, which a link is not; mark the current link with `aria-current` instead. */
|
|
479
|
+
selected?: never;
|
|
480
|
+
/** Not accepted: the type of a `button` does not apply to its child. */
|
|
481
|
+
type?: never;
|
|
482
|
+
/** Ref composed with the ref of the child, receiving its element. */
|
|
483
|
+
ref?: Ref<HTMLAnchorElement> | undefined;
|
|
484
|
+
}> & Readonly<Omit<HTMLAttributes<HTMLAnchorElement>, keyof ButtonOwnProps | keyof ButtonBoxStyleProps | BoxComponentExcludedAttribute>>;
|
|
485
|
+
|
|
486
|
+
/** Size shared by `Button` and `IconButton`, from the smallest to the largest, on the height scale of the controls. */
|
|
487
|
+
declare type ButtonBaseSize = (typeof buttonBaseSizes)[number];
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* Sizes a `Button` and an `IconButton` take, the scale of the controls from
|
|
491
|
+
* the smallest to the largest, with the heights of `controlSizeTokens`.
|
|
492
|
+
* `md` is the default.
|
|
493
|
+
*/
|
|
494
|
+
declare const buttonBaseSizes: readonly ["xs", "sm", "md", "lg"];
|
|
495
|
+
|
|
496
|
+
/** Tone shared by `Button` and `IconButton`: the color intent of the theme their colors come from. */
|
|
497
|
+
declare type ButtonBaseTone = (typeof tones)[number];
|
|
498
|
+
|
|
499
|
+
/** Variant shared by `Button` and `IconButton`: a solid fill, a thin outline, or the content alone. */
|
|
500
|
+
declare type ButtonBaseVariant = (typeof buttonBaseVariants)[number];
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* Variants a `Button` and an `IconButton` take, the first being the
|
|
504
|
+
* default: a solid fill, a thin outline, or the content alone, tinted on
|
|
505
|
+
* hover.
|
|
506
|
+
*/
|
|
507
|
+
declare const buttonBaseVariants: readonly ["contained", "outlined", "ghost"];
|
|
508
|
+
|
|
509
|
+
/** Name of a style prop of `Box` a `Button` accepts. */
|
|
510
|
+
declare type ButtonBoxStylePropName = (typeof buttonBoxStylePropNames)[number];
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* Style props of `Box` a `Button` accepts and forwards to its `button`, as
|
|
514
|
+
* `Box` types and applies them: the margin and width props. Single source of
|
|
515
|
+
* the `ButtonBoxStyleProps` type, in alphabetical order.
|
|
516
|
+
*/
|
|
517
|
+
declare const buttonBoxStylePropNames: readonly ["margin", "marginBottom", "marginLeft", "marginRight", "marginTop", "marginX", "marginY", "maxWidth", "minWidth", "width"];
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* Style props of `Box` a `Button` accepts, applied as `Box` applies them:
|
|
521
|
+
* the margin props, steps of the space scale or `auto`, and the width props,
|
|
522
|
+
* which take any CSS value, a number being a length in pixels. Its content
|
|
523
|
+
* stays centered in a wider button.
|
|
524
|
+
*/
|
|
525
|
+
declare type ButtonBoxStyleProps = Pick<BoxStyleProps, ButtonBoxStylePropName>;
|
|
526
|
+
|
|
527
|
+
/** Props a `Button` handles itself, whether it renders its own `button` or its child. */
|
|
528
|
+
declare type ButtonOwnProps = Readonly<{
|
|
529
|
+
/** Visible text of the button, which names it, rendered in a `Typography` `span`. */
|
|
530
|
+
label: string;
|
|
531
|
+
/** Lines after which the label is truncated with an ellipsis, as the `maxLines` of `Typography`; it wraps freely when absent. */
|
|
532
|
+
maxLines?: TypographyProps<'span'>['maxLines'];
|
|
533
|
+
/** Fill, outline or text alone; `contained` when absent. */
|
|
534
|
+
variant?: ButtonVariant | undefined;
|
|
535
|
+
/** Color intent of the theme; `primary` when absent. */
|
|
536
|
+
tone?: ButtonTone | undefined;
|
|
537
|
+
/** Height, padding, font size and icon size; `md` when absent. */
|
|
538
|
+
size?: ButtonSize | undefined;
|
|
539
|
+
/** Data of the decorative icon before the label, drawn by an `Icon` at the icon size and hidden from assistive technologies; none when absent. */
|
|
540
|
+
startIcon?: IconData | undefined;
|
|
541
|
+
/** Data of the decorative icon after the label, drawn by an `Icon` at the icon size and hidden from assistive technologies; none when absent. */
|
|
542
|
+
endIcon?: IconData | undefined;
|
|
543
|
+
/** Classes added after the generated ones. */
|
|
544
|
+
className?: string | undefined;
|
|
545
|
+
/** Inline styles, merged after the generated variables, so they prevail. */
|
|
546
|
+
style?: CSSProperties | undefined;
|
|
547
|
+
}>;
|
|
548
|
+
|
|
549
|
+
/**
|
|
550
|
+
* Props of a `Button` rendering its own `button`: its own props, its loading
|
|
551
|
+
* and selected states and the margin and width props of `Box`, then the attributes, events
|
|
552
|
+
* and `ref` of the `button`, but its content (`label`) and the legacy
|
|
553
|
+
* `color` attribute, which `Box` would read as its text color.
|
|
554
|
+
*/
|
|
555
|
+
export declare type ButtonProps = ButtonOwnProps & ButtonBoxStyleProps & Readonly<{
|
|
556
|
+
/** Renders the single child instead of a `button` when true; absent or false here. */
|
|
557
|
+
asChild?: false | undefined;
|
|
558
|
+
/** Shows a spinner over the hidden content and ignores clicks, the button staying focusable; `false` when absent. */
|
|
559
|
+
loading?: boolean | undefined;
|
|
560
|
+
/** Makes it a toggle button, kept in its pressed colors while `true` and exposed by `aria-pressed`, which it overrides; `false` when absent, without `aria-pressed`. */
|
|
561
|
+
selected?: boolean | undefined;
|
|
562
|
+
}> & Readonly<Omit<ComponentPropsWithRef<'button'>, keyof ButtonOwnProps | keyof ButtonBoxStyleProps | BoxComponentExcludedAttribute>>;
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* Size of a `Button`, from the smallest to the largest: its height, on the
|
|
566
|
+
* scale of the controls, with its padding, font size and icon size.
|
|
567
|
+
*/
|
|
568
|
+
export declare type ButtonSize = ButtonBaseSize;
|
|
569
|
+
|
|
570
|
+
/**
|
|
571
|
+
* Tone of a `Button`: the color intent of the theme its colors come from,
|
|
572
|
+
* of the same name.
|
|
573
|
+
*/
|
|
574
|
+
export declare type ButtonTone = ButtonBaseTone;
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* Variant of a `Button`: a solid fill (`contained`), a thin outline
|
|
578
|
+
* (`outlined`), or text alone, tinted on hover (`ghost`).
|
|
579
|
+
*/
|
|
580
|
+
export declare type ButtonVariant = ButtonBaseVariant;
|
|
581
|
+
|
|
582
|
+
export declare const Card: (<Tag extends BoxTag = "div">(props: CardAsChildProps | CardProps<Tag>) => ReactElement) & {
|
|
583
|
+
Body: <Tag extends BoxTag = "div">(props: CardBodyAsChildProps | CardBodyProps<Tag>) => ReactElement;
|
|
584
|
+
Footer: <Tag extends BoxTag = "div">(props: CardFooterAsChildProps | CardFooterProps<Tag>) => ReactElement;
|
|
585
|
+
Header: FC<CardHeaderProps>;
|
|
586
|
+
};
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* Props of a `Card` rendering its single child (`asChild`) instead of an
|
|
590
|
+
* element: those of a `Box`, merged onto the child.
|
|
591
|
+
*/
|
|
592
|
+
export declare type CardAsChildProps = BoxAsChildProps;
|
|
593
|
+
|
|
594
|
+
/**
|
|
595
|
+
* Props of a `Card.Body` rendering its single child (`asChild`) instead of
|
|
596
|
+
* an element: those of a `Box`, merged onto the child.
|
|
597
|
+
*/
|
|
598
|
+
export declare type CardBodyAsChildProps = BoxAsChildProps;
|
|
599
|
+
|
|
600
|
+
/**
|
|
601
|
+
* Props of a `Card.Body` rendering `Tag`: those of a `Box` rendering it,
|
|
602
|
+
* `div` by default. The padding and layout it defaults to are `Box` props:
|
|
603
|
+
* any value given replaces its default.
|
|
604
|
+
*/
|
|
605
|
+
export declare type CardBodyProps<Tag extends BoxTag = 'div'> = BoxProps<Tag>;
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* Props of a `Card.Footer` rendering its single child (`asChild`) instead of
|
|
609
|
+
* an element: those of a `Box`, merged onto the child.
|
|
610
|
+
*/
|
|
611
|
+
export declare type CardFooterAsChildProps = BoxAsChildProps;
|
|
612
|
+
|
|
613
|
+
/**
|
|
614
|
+
* Props of a `Card.Footer` rendering `Tag`: those of a `Box` rendering it,
|
|
615
|
+
* `div` by default. The padding and layout it defaults to are `Box` props:
|
|
616
|
+
* any value given replaces its default.
|
|
617
|
+
*/
|
|
618
|
+
export declare type CardFooterProps<Tag extends BoxTag = 'div'> = BoxProps<Tag>;
|
|
619
|
+
|
|
620
|
+
/**
|
|
621
|
+
* Props of a `Card.Header`, a `div`: those of a `Box` rendering a `div`,
|
|
622
|
+
* without `as` and `asChild`, since the header renders its own element and
|
|
623
|
+
* content, and with `title`, the text of its heading, in place of the
|
|
624
|
+
* native attribute of the same name.
|
|
625
|
+
*/
|
|
626
|
+
export declare type CardHeaderProps = Omit<BoxProps<'div'>, 'as' | 'asChild' | 'title'> & Readonly<{
|
|
627
|
+
/** Text of the heading shown first in the header; no heading is rendered when absent or empty. */
|
|
628
|
+
title?: ReactNode;
|
|
629
|
+
}>;
|
|
630
|
+
|
|
631
|
+
/**
|
|
632
|
+
* Props of a `Card` rendering `Tag`: those of a `Box` rendering it, `div` by
|
|
633
|
+
* default. The border, radius, colors and layout a `Card` defaults to are
|
|
634
|
+
* `Box` props: any value given replaces its default.
|
|
635
|
+
*/
|
|
636
|
+
export declare type CardProps<Tag extends BoxTag = 'div'> = BoxProps<Tag>;
|
|
637
|
+
|
|
638
|
+
export declare const Dialog: (<Payload = unknown>({ actionsRef, children, defaultOpen, defaultTriggerId, disablePointerDismissal, handle, modal, onOpenChange, onOpenChangeComplete, open, triggerId, }: DialogProps<Payload>) => ReactElement) & {
|
|
639
|
+
Body: FC<DialogBodyProps>;
|
|
640
|
+
Close: FC< DialogCloseProps | DialogCloseAsChildProps>;
|
|
641
|
+
Content: FC<DialogContentProps>;
|
|
642
|
+
createHandle: <Payload = unknown>() => DialogHandle<Payload>;
|
|
643
|
+
Description: FC< DialogDescriptionProps | DialogDescriptionAsChildProps>;
|
|
644
|
+
Footer: <Tag extends BoxTag = "div">(props: DialogFooterAsChildProps | DialogFooterProps<Tag>) => ReactElement;
|
|
645
|
+
Header: <Tag extends BoxTag = "div">(props: DialogHeaderAsChildProps | DialogHeaderProps<Tag>) => ReactElement;
|
|
646
|
+
Title: FC< DialogTitleProps | DialogTitleAsChildProps>;
|
|
647
|
+
Trigger: <Payload = unknown>({ handle, payload, ...props }: DialogTriggerAsChildProps<Payload> | DialogTriggerProps<Payload>) => ReactElement;
|
|
648
|
+
};
|
|
649
|
+
|
|
650
|
+
/** Actions of a `Dialog` its `actionsRef` receives: `close()`, and `unmount()` after `preventUnmountOnClose()`. */
|
|
651
|
+
export declare type DialogActions = Dialog_2.Root.Actions;
|
|
652
|
+
|
|
653
|
+
/**
|
|
654
|
+
* Padding props of the body of a dialog, steps of the space scale set
|
|
655
|
+
* around its content, inside its scroll area, and resolved as those of
|
|
656
|
+
* `Box`, a side prevailing over its axis, which prevails over `padding`.
|
|
657
|
+
*/
|
|
658
|
+
declare type DialogBaseBodySpacingProps = Readonly<{
|
|
659
|
+
/** Space on every side of the content; `16` on the sides and `8` above and below when no padding prop is given. */
|
|
660
|
+
padding?: SpaceToken | undefined;
|
|
661
|
+
/** Space on the left and right of the content; `16` when absent. */
|
|
662
|
+
paddingX?: SpaceToken | undefined;
|
|
663
|
+
/** Space above and below the content; `8` when absent, which keeps focus rings inside the scroll area, a negative margin keeping the gaps around the body those of the content. */
|
|
664
|
+
paddingY?: SpaceToken | undefined;
|
|
665
|
+
/** Space above the content; `8` when absent. */
|
|
666
|
+
paddingTop?: SpaceToken | undefined;
|
|
667
|
+
/** Space on the right of the content; `16` when absent. */
|
|
668
|
+
paddingRight?: SpaceToken | undefined;
|
|
669
|
+
/** Space below the content; `8` when absent. */
|
|
670
|
+
paddingBottom?: SpaceToken | undefined;
|
|
671
|
+
/** Space on the left of the content; `16` when absent. */
|
|
672
|
+
paddingLeft?: SpaceToken | undefined;
|
|
673
|
+
}>;
|
|
674
|
+
|
|
675
|
+
/**
|
|
676
|
+
* Sizing props of the content of a dialog, any CSS length as the sizing
|
|
677
|
+
* props of `Box`, a number being pixels. Whatever the values, the dialog
|
|
678
|
+
* stays inside the viewport but its margin, its body scrolling beyond.
|
|
679
|
+
*/
|
|
680
|
+
declare type DialogBaseContentSizeProps = Readonly<{
|
|
681
|
+
/** Width of the dialog; `32rem` when absent. */
|
|
682
|
+
width?: BoxStyleProps['width'];
|
|
683
|
+
/** Height of the dialog, such as `100%` to fill the viewport; that of its content when absent. */
|
|
684
|
+
height?: BoxStyleProps['height'];
|
|
685
|
+
/** Narrowest the dialog gets; no minimum when absent. */
|
|
686
|
+
minWidth?: BoxStyleProps['minWidth'];
|
|
687
|
+
/** Widest the dialog grows; the viewport when absent. */
|
|
688
|
+
maxWidth?: BoxStyleProps['maxWidth'];
|
|
689
|
+
/** Shortest the dialog gets; no minimum when absent. */
|
|
690
|
+
minHeight?: BoxStyleProps['minHeight'];
|
|
691
|
+
/** Tallest the dialog grows before its body scrolls; the viewport when absent. */
|
|
692
|
+
maxHeight?: BoxStyleProps['maxHeight'];
|
|
693
|
+
}>;
|
|
694
|
+
|
|
695
|
+
/**
|
|
696
|
+
* Spacing props of the content of a dialog, steps of the space scale
|
|
697
|
+
* resolved as those of `Box`, a side prevailing over its axis, which
|
|
698
|
+
* prevails over `padding`. They space the popup alone, around and between
|
|
699
|
+
* its sections, each of which sets its own paddings.
|
|
700
|
+
*/
|
|
701
|
+
declare type DialogBaseContentSpacingProps = Readonly<{
|
|
702
|
+
/** Space on every side of the popup; `16` above and below and none on the sides when no padding prop is given. */
|
|
703
|
+
padding?: SpaceToken | undefined;
|
|
704
|
+
/** Space on the left and right of the popup, outside the sides of its sections; none when absent. */
|
|
705
|
+
paddingX?: SpaceToken | undefined;
|
|
706
|
+
/** Space above the first section and below the last one; `16` when absent. */
|
|
707
|
+
paddingY?: SpaceToken | undefined;
|
|
708
|
+
/** Space above the first section; `16` when absent. */
|
|
709
|
+
paddingTop?: SpaceToken | undefined;
|
|
710
|
+
/** Space on the right of the popup; none when absent. */
|
|
711
|
+
paddingRight?: SpaceToken | undefined;
|
|
712
|
+
/** Space below the last section; `16` when absent. */
|
|
713
|
+
paddingBottom?: SpaceToken | undefined;
|
|
714
|
+
/** Space on the left of the popup; none when absent. */
|
|
715
|
+
paddingLeft?: SpaceToken | undefined;
|
|
716
|
+
/** Space between two sections; `16` when absent. */
|
|
717
|
+
gap?: SpaceToken | undefined;
|
|
718
|
+
}>;
|
|
719
|
+
|
|
720
|
+
/** Props a `Dialog.Body` handles itself, besides those of its `ScrollArea`. */
|
|
721
|
+
declare type DialogBodyOwnProps = DialogBaseBodySpacingProps & Readonly<{
|
|
722
|
+
/** Content of the dialog, such as text, fields or a list. */
|
|
723
|
+
children?: ReactNode;
|
|
724
|
+
}>;
|
|
725
|
+
|
|
726
|
+
/**
|
|
727
|
+
* Props of a `Dialog.Body`: its content and paddings, then those of the
|
|
728
|
+
* `ScrollArea` it renders, its sizing props and `className` on its root,
|
|
729
|
+
* and the attributes, events and `ref` of its viewport, the `div` that
|
|
730
|
+
* scrolls, but its margin props: the dialog spaces its sections itself.
|
|
731
|
+
*/
|
|
732
|
+
export declare type DialogBodyProps = DialogBodyOwnProps & Readonly<Omit<ScrollAreaProps, keyof DialogBodyOwnProps | keyof BoxMarginStyleProps>>;
|
|
733
|
+
|
|
734
|
+
/**
|
|
735
|
+
* Props of a `Dialog.Close` rendering its single child (`asChild`), such as
|
|
736
|
+
* a `Button` or an `IconButton`, which must render a native `button`: the
|
|
737
|
+
* attributes, events and `ref` of the close button, merged onto the child.
|
|
738
|
+
*/
|
|
739
|
+
export declare type DialogCloseAsChildProps = TriggerBaseAsChildProps;
|
|
740
|
+
|
|
741
|
+
/**
|
|
742
|
+
* Props of a `Dialog.Close` rendering its own `button`: its content, then
|
|
743
|
+
* the attributes, events and `ref` of the `button`.
|
|
744
|
+
*/
|
|
745
|
+
export declare type DialogCloseProps = TriggerBaseProps;
|
|
746
|
+
|
|
747
|
+
/** Props a `Dialog.Content` handles itself, besides those of its popup. */
|
|
748
|
+
declare type DialogContentOwnProps = DialogBaseContentSizeProps & DialogBaseContentSpacingProps & Readonly<{
|
|
749
|
+
/** Content of the dialog: a `Dialog.Header`, a `Dialog.Body` and a `Dialog.Footer`, each one optional, stacked in a column. */
|
|
750
|
+
children?: ReactNode;
|
|
751
|
+
/** Element, shadow root or ref to one the dialog is rendered into, in a portal; the `body` when absent. */
|
|
752
|
+
container?: Dialog_2.Portal.Props['container'];
|
|
753
|
+
/** Keeps the closed dialog in the DOM, hidden, so its state, such as the input of a form, is preserved until it opens again; unmounted once closed when absent or false. */
|
|
754
|
+
keepMounted?: boolean | undefined;
|
|
755
|
+
/** Element focused when the dialog opens, given to Base UI: `true` for the default, `false` to leave the focus where it is, a ref, or a function of the interaction (`mouse`, `touch`, `pen`, `keyboard`) returning one of them; when absent, the first tabbable element, or the popup when opened by touch or without one. */
|
|
756
|
+
initialFocus?: Dialog_2.Popup.Props['initialFocus'];
|
|
757
|
+
/** Element focused when the dialog closes, given to Base UI: `true` for the trigger, `false` to leave the focus where it is, a ref, or a function of the interaction returning one of them; the trigger, or the element focused before the dialog opened, when absent. */
|
|
758
|
+
finalFocus?: Dialog_2.Popup.Props['finalFocus'];
|
|
759
|
+
/** Classes added after the generated ones, on the popup. */
|
|
760
|
+
className?: string | undefined;
|
|
761
|
+
/** Classes added after the generated ones, on the backdrop a `modal` dialog renders behind it. */
|
|
762
|
+
backdropClassName?: string | undefined;
|
|
763
|
+
/** Inline styles of the popup, merged after the sizing and spacing variables, so they prevail. */
|
|
764
|
+
style?: CSSProperties | undefined;
|
|
765
|
+
}>;
|
|
766
|
+
|
|
767
|
+
/**
|
|
768
|
+
* Props of a `Dialog.Content`: its content, sizing and spacing props, portal
|
|
769
|
+
* `container` and `keepMounted`, focus targets and backdrop classes, then the attributes,
|
|
770
|
+
* events and `ref` of its popup, a `div` with the `dialog` role, named by
|
|
771
|
+
* its `Dialog.Title` or else by `aria-label`, but its content.
|
|
772
|
+
*/
|
|
773
|
+
export declare type DialogContentProps = DialogContentOwnProps & Readonly<Omit<ComponentPropsWithRef<'div'>, keyof DialogContentOwnProps | 'dangerouslySetInnerHTML'>>;
|
|
774
|
+
|
|
775
|
+
/**
|
|
776
|
+
* Props of a `Dialog.Description` rendering its single child (`asChild`),
|
|
777
|
+
* such as a `div` holding several paragraphs: the attributes, events and
|
|
778
|
+
* `ref` of the description, merged onto the child.
|
|
779
|
+
*/
|
|
780
|
+
export declare type DialogDescriptionAsChildProps = DialogDescriptionElementProps & Readonly<{
|
|
781
|
+
/** Renders the single child, with the props of the description merged onto it. */
|
|
782
|
+
asChild: true;
|
|
783
|
+
/** Single element rendered as the description; its text describes the dialog. */
|
|
784
|
+
children: ReactElement;
|
|
785
|
+
}>;
|
|
786
|
+
|
|
787
|
+
/**
|
|
788
|
+
* Attributes, events and `ref` of the paragraph a `Dialog.Description`
|
|
789
|
+
* renders or merges onto its child, but its content.
|
|
790
|
+
*/
|
|
791
|
+
declare type DialogDescriptionElementProps = Readonly<Omit<ComponentPropsWithRef<'p'>, 'children'>>;
|
|
792
|
+
|
|
793
|
+
/**
|
|
794
|
+
* Props of a `Dialog.Description` rendering its own `p`: its text, then the
|
|
795
|
+
* attributes, events and `ref` of the paragraph.
|
|
796
|
+
*/
|
|
797
|
+
export declare type DialogDescriptionProps = DialogDescriptionElementProps & Readonly<{
|
|
798
|
+
/** Renders the single child instead of a `p` when true; absent or false here. */
|
|
799
|
+
asChild?: false | undefined;
|
|
800
|
+
/** Text of the paragraph, which describes the dialog. */
|
|
801
|
+
children?: ReactNode;
|
|
802
|
+
}>;
|
|
803
|
+
|
|
804
|
+
/**
|
|
805
|
+
* Props of a `Dialog.Footer` rendering its single child (`asChild`) instead
|
|
806
|
+
* of an element: those of a `Box`, merged onto the child, with the same
|
|
807
|
+
* defaults as without `asChild`.
|
|
808
|
+
*/
|
|
809
|
+
export declare type DialogFooterAsChildProps = BoxAsChildProps;
|
|
810
|
+
|
|
811
|
+
/**
|
|
812
|
+
* Props of a `Dialog.Footer` rendering `Tag`: those of a `Box` rendering
|
|
813
|
+
* it, `div` by default, any value given replacing the layout and spacing it
|
|
814
|
+
* defaults to, its paddings and gaps included.
|
|
815
|
+
*/
|
|
816
|
+
export declare type DialogFooterProps<Tag extends BoxTag = 'div'> = BoxProps<Tag>;
|
|
817
|
+
|
|
818
|
+
/**
|
|
819
|
+
* Handle of a `Dialog`, made by `Dialog.createHandle()` and given to the
|
|
820
|
+
* dialog and to its triggers rendered outside it; it also opens it
|
|
821
|
+
* (`open(triggerId)`, `openWithPayload(payload)`), closes it (`close()`)
|
|
822
|
+
* and tells whether it is open (`isOpen`), outside the render.
|
|
823
|
+
*/
|
|
824
|
+
export declare type DialogHandle<Payload = unknown> = Dialog_2.Handle<Payload>;
|
|
825
|
+
|
|
826
|
+
/**
|
|
827
|
+
* Props of a `Dialog.Header` rendering its single child (`asChild`) instead
|
|
828
|
+
* of an element: those of a `Box`, merged onto the child, with the same
|
|
829
|
+
* defaults as without `asChild`.
|
|
830
|
+
*/
|
|
831
|
+
export declare type DialogHeaderAsChildProps = BoxAsChildProps;
|
|
832
|
+
|
|
833
|
+
/**
|
|
834
|
+
* Props of a `Dialog.Header` rendering `Tag`: those of a `Box` rendering
|
|
835
|
+
* it, `div` by default, any value given replacing the layout and spacing it
|
|
836
|
+
* defaults to, its paddings and gaps included.
|
|
837
|
+
*/
|
|
838
|
+
export declare type DialogHeaderProps<Tag extends BoxTag = 'div'> = BoxProps<Tag>;
|
|
839
|
+
|
|
840
|
+
/**
|
|
841
|
+
* Modality of an open `Dialog`: `true` makes the rest of the page inert,
|
|
842
|
+
* traps the focus inside, locks the page scroll and dims the page behind a
|
|
843
|
+
* backdrop; `'trap-focus'` only traps the focus; `false` leaves the page
|
|
844
|
+
* usable, without backdrop.
|
|
845
|
+
*/
|
|
846
|
+
export declare type DialogModal = NonNullable<Dialog_2.Root.Props['modal']>;
|
|
847
|
+
|
|
848
|
+
/**
|
|
849
|
+
* Details of an open state change of a `Dialog`, those of Base UI as they
|
|
850
|
+
* are: the cause of the change (`reason`, such as `trigger-press`,
|
|
851
|
+
* `escape-key`, `outside-press`, `close-press` or `imperative-action`), the
|
|
852
|
+
* native `event`, the `trigger` element, `cancel()`, which keeps the current
|
|
853
|
+
* state, and `preventUnmountOnClose()`, which keeps the closing content
|
|
854
|
+
* mounted until `actionsRef` calls `unmount()`.
|
|
855
|
+
*/
|
|
856
|
+
export declare type DialogOpenChangeDetails = Dialog_2.Root.ChangeEventDetails;
|
|
857
|
+
|
|
858
|
+
/** Children of a `Dialog` given as a function of the `payload` of the trigger that opened it. */
|
|
859
|
+
export declare type DialogPayloadChildren<Payload> = (state: Readonly<{
|
|
860
|
+
/** `payload` of the trigger that opened the dialog; `undefined` without one, or when opened by `open`. */
|
|
861
|
+
payload: Payload | undefined;
|
|
862
|
+
}>) => ReactNode;
|
|
863
|
+
|
|
864
|
+
/** Props of a `Dialog`, which renders no element of its own; `Payload` is the type of the `payload` of its triggers. */
|
|
865
|
+
export declare type DialogProps<Payload = unknown> = Readonly<{
|
|
866
|
+
/** Parts of the dialog: an optional `Dialog.Trigger`, then a `Dialog.Content`, or a function of the `payload` of the trigger returning them. */
|
|
867
|
+
children?: ReactNode | DialogPayloadChildren<Payload>;
|
|
868
|
+
/** Controlled open state; keep it always defined or absent, with `onOpenChange`. */
|
|
869
|
+
open?: boolean | undefined;
|
|
870
|
+
/** Initial open state of an uncontrolled dialog; `false` when absent. */
|
|
871
|
+
defaultOpen?: boolean | undefined;
|
|
872
|
+
/** Called with the requested open state and the details of the change, whose `cancel()` keeps the current state. */
|
|
873
|
+
onOpenChange?: ((open: boolean, eventDetails: DialogOpenChangeDetails) => void) | undefined;
|
|
874
|
+
/** Called with the new open state once the dialog has finished opening or closing, its transitions included, such as to reset a form. */
|
|
875
|
+
onOpenChangeComplete?: ((open: boolean) => void) | undefined;
|
|
876
|
+
/** Modality of the open dialog; `true` when absent, as in Base UI. */
|
|
877
|
+
modal?: DialogModal | undefined;
|
|
878
|
+
/** Keeps the dialog open on a press outside, and on a focus leaving it when `modal` is `false`; Escape and `Dialog.Close` still close it. `false` when absent. */
|
|
879
|
+
disablePointerDismissal?: boolean | undefined;
|
|
880
|
+
/** Ref receiving the actions of the dialog, to close it outside the render. */
|
|
881
|
+
actionsRef?: RefObject<DialogActions | null> | undefined;
|
|
882
|
+
/** Handle from `Dialog.createHandle()` linking the dialog to triggers rendered outside it; none when absent. */
|
|
883
|
+
handle?: DialogHandle<Payload> | undefined;
|
|
884
|
+
/** `id` of the trigger the controlled dialog is open for, with several triggers; set alongside `open`. */
|
|
885
|
+
triggerId?: string | null | undefined;
|
|
886
|
+
/** `id` of the trigger the dialog opens for initially, alongside `defaultOpen`. */
|
|
887
|
+
defaultTriggerId?: string | null | undefined;
|
|
888
|
+
}>;
|
|
889
|
+
|
|
890
|
+
/**
|
|
891
|
+
* Props of a `Dialog.Title` rendering its single child (`asChild`), such as
|
|
892
|
+
* a heading of another level: the attributes, events and `ref` of the
|
|
893
|
+
* title, merged onto the child.
|
|
894
|
+
*/
|
|
895
|
+
export declare type DialogTitleAsChildProps = DialogTitleElementProps & Readonly<{
|
|
896
|
+
/** Renders the single child, with the props of the title merged onto it. */
|
|
897
|
+
asChild: true;
|
|
898
|
+
/** Single element, such as an `h1`, rendered as the title; its text names the dialog. */
|
|
899
|
+
children: ReactElement;
|
|
900
|
+
}>;
|
|
901
|
+
|
|
902
|
+
/**
|
|
903
|
+
* Attributes, events and `ref` of the heading a `Dialog.Title` renders or
|
|
904
|
+
* merges onto its child, but its content.
|
|
905
|
+
*/
|
|
906
|
+
declare type DialogTitleElementProps = Readonly<Omit<ComponentPropsWithRef<'h2'>, 'children'>>;
|
|
907
|
+
|
|
908
|
+
/**
|
|
909
|
+
* Props of a `Dialog.Title` rendering its own `h2`: its text, then the
|
|
910
|
+
* attributes, events and `ref` of the heading.
|
|
911
|
+
*/
|
|
912
|
+
export declare type DialogTitleProps = DialogTitleElementProps & Readonly<{
|
|
913
|
+
/** Renders the single child instead of an `h2` when true; absent or false here. */
|
|
914
|
+
asChild?: false | undefined;
|
|
915
|
+
/** Text of the heading, which names the dialog. */
|
|
916
|
+
children?: ReactNode;
|
|
917
|
+
}>;
|
|
918
|
+
|
|
919
|
+
/**
|
|
920
|
+
* Props of a `Dialog.Trigger` rendering its single child (`asChild`), such
|
|
921
|
+
* as a `Button`, which must render a native `button`: its handle and
|
|
922
|
+
* payload, then the attributes, events and `ref` of the trigger, merged
|
|
923
|
+
* onto the child.
|
|
924
|
+
*/
|
|
925
|
+
export declare type DialogTriggerAsChildProps<Payload = unknown> = DialogTriggerOwnProps<Payload> & TriggerBaseAsChildProps;
|
|
926
|
+
|
|
927
|
+
/** Props a `Dialog.Trigger` handles itself, besides those of its `button`. */
|
|
928
|
+
declare type DialogTriggerOwnProps<Payload = unknown> = Readonly<{
|
|
929
|
+
/** Handle from `Dialog.createHandle()` of the dialog it opens, so it can be rendered outside that `Dialog`; the enclosing `Dialog` when absent. */
|
|
930
|
+
handle?: DialogHandle<Payload> | undefined;
|
|
931
|
+
/** Value the children function of the `Dialog` receives when this trigger opens it, such as the item of a row. */
|
|
932
|
+
payload?: Payload | undefined;
|
|
933
|
+
}>;
|
|
934
|
+
|
|
935
|
+
/**
|
|
936
|
+
* Props of a `Dialog.Trigger` rendering its own `button`: its content,
|
|
937
|
+
* handle and payload, then the attributes, events and `ref` of the
|
|
938
|
+
* `button`, its `id` naming it for `triggerId`.
|
|
939
|
+
*/
|
|
940
|
+
export declare type DialogTriggerProps<Payload = unknown> = DialogTriggerOwnProps<Payload> & TriggerBaseProps;
|
|
941
|
+
|
|
942
|
+
export declare const Drawer: FC<Readonly<{
|
|
943
|
+
children?: ReactNode;
|
|
944
|
+
variant?: DrawerVariant | undefined;
|
|
945
|
+
side?: DrawerSide | undefined;
|
|
946
|
+
open?: boolean | undefined;
|
|
947
|
+
defaultOpen?: boolean | undefined;
|
|
948
|
+
onOpenChange?: ((open: boolean, eventDetails: DrawerOpenChangeDetails) => void) | undefined;
|
|
949
|
+
}>> & {
|
|
950
|
+
Body: FC< DrawerBodyProps>;
|
|
951
|
+
Close: FC< DrawerCloseProps | DrawerCloseAsChildProps>;
|
|
952
|
+
Content: FC< DrawerContentProps>;
|
|
953
|
+
Footer: <Tag extends BoxTag = "div">(props: DrawerFooterAsChildProps | DrawerFooterProps<Tag>) => ReactElement;
|
|
954
|
+
Group: FC< DrawerGroupProps>;
|
|
955
|
+
Header: <Tag extends BoxTag = "div">(props: DrawerHeaderAsChildProps | DrawerHeaderProps<Tag>) => ReactElement;
|
|
956
|
+
Item: FC< DrawerItemProps | DrawerItemLinkProps | DrawerItemAsChildProps>;
|
|
957
|
+
Trigger: FC< DrawerTriggerProps | DrawerTriggerAsChildProps>;
|
|
958
|
+
};
|
|
959
|
+
|
|
960
|
+
/** Props a `Drawer.Body` handles itself, besides those of its `ScrollArea`. */
|
|
961
|
+
declare type DrawerBodyOwnProps = Readonly<{
|
|
962
|
+
/** Content of the body: `Drawer.Item`s, optionally in `Drawer.Group`s, stacked in a column. */
|
|
963
|
+
children?: ReactNode;
|
|
964
|
+
/** Padding around the content, inside the scroll area, a step of the space scale as the `padding` of `Box`; `8` when absent. */
|
|
965
|
+
padding?: BoxStyleProps['padding'];
|
|
966
|
+
}>;
|
|
967
|
+
|
|
968
|
+
/**
|
|
969
|
+
* Props of a `Drawer.Body`: its content and padding, then those of the
|
|
970
|
+
* `ScrollArea` it renders, its sizing props and `className` on its root,
|
|
971
|
+
* and the attributes, events and `ref` of its viewport, the `div` that
|
|
972
|
+
* scrolls.
|
|
973
|
+
*/
|
|
974
|
+
export declare type DrawerBodyProps = DrawerBodyOwnProps & Readonly<Omit<ScrollAreaProps, keyof DrawerBodyOwnProps>>;
|
|
975
|
+
|
|
976
|
+
/** Name of a style prop of `Box` a `Drawer.Content` accepts. */
|
|
977
|
+
declare type DrawerBoxStylePropName = (typeof drawerBoxStylePropNames)[number];
|
|
978
|
+
|
|
979
|
+
/**
|
|
980
|
+
* Style props of `Box` a `Drawer` accepts on its panel, in alphabetical
|
|
981
|
+
* order within each group: its margins, its paddings and its borders
|
|
982
|
+
* (widths, style, color and corner radii), which take the theme tokens as
|
|
983
|
+
* `Box` does, but `borderColor`, which takes any CSS color.
|
|
984
|
+
*/
|
|
985
|
+
declare const drawerBoxStylePropNames: readonly ["margin", "marginBottom", "marginLeft", "marginRight", "marginTop", "marginX", "marginY", "padding", "paddingBottom", "paddingLeft", "paddingRight", "paddingTop", "paddingX", "paddingY", "borderBottomWidth", "borderLeftWidth", "borderRightWidth", "borderTopWidth", "borderWidth", "borderBottomLeftRadius", "borderBottomRightRadius", "borderColor", "borderRadius", "borderStyle", "borderTopLeftRadius", "borderTopRightRadius"];
|
|
986
|
+
|
|
987
|
+
/**
|
|
988
|
+
* Style props of `Box` a `Drawer.Content` accepts, applied as `Box` applies
|
|
989
|
+
* them: margins and paddings, steps of the space scale, border widths,
|
|
990
|
+
* style and corner radii, theme tokens, and `borderColor`, any CSS color.
|
|
991
|
+
* Without a border width, the drawer draws a thin subtle line on the edge
|
|
992
|
+
* facing the content.
|
|
993
|
+
*/
|
|
994
|
+
declare type DrawerBoxStyleProps = Pick<BoxStyleProps, DrawerBoxStylePropName>;
|
|
995
|
+
|
|
996
|
+
/**
|
|
997
|
+
* Props of a `Drawer.Close` rendering its single child (`asChild`), only
|
|
998
|
+
* for a `modal` drawer, nothing being rendered for an `inline` or `mini`
|
|
999
|
+
* one, such as a `Button` or an `IconButton`, which must render a native
|
|
1000
|
+
* `button`: the attributes, events and `ref` of the close button, merged
|
|
1001
|
+
* onto the child.
|
|
1002
|
+
*/
|
|
1003
|
+
export declare type DrawerCloseAsChildProps = TriggerBaseAsChildProps;
|
|
1004
|
+
|
|
1005
|
+
/**
|
|
1006
|
+
* Props of a `Drawer.Close` rendering its own `button`, only for a `modal`
|
|
1007
|
+
* drawer, nothing being rendered for an `inline` or `mini` one: its
|
|
1008
|
+
* content, then the attributes, events and `ref` of the `button`.
|
|
1009
|
+
*/
|
|
1010
|
+
export declare type DrawerCloseProps = TriggerBaseProps;
|
|
1011
|
+
|
|
1012
|
+
/**
|
|
1013
|
+
* Accessible name of a `Drawer.Content`, required: its navigation
|
|
1014
|
+
* landmark, or its dialog when `modal`, is named by `aria-label`, or by the
|
|
1015
|
+
* element `aria-labelledby` refers to, such as a heading of its
|
|
1016
|
+
* `Drawer.Header`.
|
|
1017
|
+
*/
|
|
1018
|
+
export declare type DrawerContentLabelProps = Readonly<{
|
|
1019
|
+
/** Name of the drawer, in the language of the page, such as `Main navigation`. */
|
|
1020
|
+
'aria-label': string;
|
|
1021
|
+
/** Identifiers of the elements naming the drawer, which prevail over `aria-label`. */
|
|
1022
|
+
'aria-labelledby'?: string | undefined;
|
|
1023
|
+
}> | Readonly<{
|
|
1024
|
+
/** Name of the drawer; none when `aria-labelledby` names it. */
|
|
1025
|
+
'aria-label'?: undefined;
|
|
1026
|
+
/** Identifiers of the elements naming the drawer, such as the `id` of a heading of its header. */
|
|
1027
|
+
'aria-labelledby': string;
|
|
1028
|
+
}>;
|
|
1029
|
+
|
|
1030
|
+
/** Props a `Drawer.Content` handles itself. */
|
|
1031
|
+
declare type DrawerContentOwnProps = Readonly<{
|
|
1032
|
+
/** Parts of the panel: a `Drawer.Header`, a `Drawer.Body` holding `Drawer.Group`s and `Drawer.Item`s, and a `Drawer.Footer`, each one optional. */
|
|
1033
|
+
children?: ReactNode;
|
|
1034
|
+
/** Width of the open drawer inside its border and padding, any CSS length, a number being a length in pixels as for `Box`; `16rem` (256px) when absent. */
|
|
1035
|
+
width?: BoxStyleProps['width'];
|
|
1036
|
+
/** Width of the rail of a closed `mini` drawer inside its border and padding, any CSS length, a number being a length in pixels; `3.25rem` (52px) when absent, the `2.25rem` square of the items between the `0.5rem` paddings of the body, so they are centered and keep their place; ignored by the other variants. */
|
|
1037
|
+
collapsedWidth?: BoxStyleProps['width'];
|
|
1038
|
+
/** Element, shadow root or ref to one a `modal` drawer is rendered into, in a portal; the `body` when absent; ignored by the other variants. */
|
|
1039
|
+
container?: Drawer_2.Portal.Props['container'];
|
|
1040
|
+
/** Classes added after the generated ones, on the panel. */
|
|
1041
|
+
className?: string | undefined;
|
|
1042
|
+
/** Inline styles of the panel, merged after the generated variables. */
|
|
1043
|
+
style?: CSSProperties | undefined;
|
|
1044
|
+
}>;
|
|
1045
|
+
|
|
1046
|
+
/**
|
|
1047
|
+
* Props of a `Drawer.Content`: its content, widths and portal `container`,
|
|
1048
|
+
* the style props of `Box` of its panel and its required accessible name,
|
|
1049
|
+
* then the attributes, events and `ref` of its panel, a `nav`, or a
|
|
1050
|
+
* `section` with the `dialog` role when `modal`, but its content and the
|
|
1051
|
+
* legacy `color` attribute.
|
|
1052
|
+
*/
|
|
1053
|
+
export declare type DrawerContentProps = DrawerContentOwnProps & DrawerBoxStyleProps & DrawerContentLabelProps & Readonly<Omit<ComponentPropsWithRef<'nav'>, keyof DrawerContentOwnProps | keyof DrawerBoxStyleProps | 'aria-label' | 'aria-labelledby' | BoxComponentExcludedAttribute>>;
|
|
1054
|
+
|
|
1055
|
+
/**
|
|
1056
|
+
* Props of a `Drawer.Footer` rendering its single child (`asChild`) instead
|
|
1057
|
+
* of an element: those of a `Box`, merged onto the child.
|
|
1058
|
+
*/
|
|
1059
|
+
export declare type DrawerFooterAsChildProps = BoxAsChildProps;
|
|
1060
|
+
|
|
1061
|
+
/**
|
|
1062
|
+
* Props of a `Drawer.Footer` rendering `Tag`: those of a `Box` rendering
|
|
1063
|
+
* it, `div` by default. The padding and layout it defaults to are `Box`
|
|
1064
|
+
* props: any value given replaces its default.
|
|
1065
|
+
*/
|
|
1066
|
+
export declare type DrawerFooterProps<Tag extends BoxTag = 'div'> = BoxProps<Tag>;
|
|
1067
|
+
|
|
1068
|
+
/** Props a `Drawer.Group` handles itself. */
|
|
1069
|
+
declare type DrawerGroupOwnProps = Readonly<{
|
|
1070
|
+
/** Visible title shown above the items, which names the group, on one line, cross-faded with a dash in a collapsed drawer. */
|
|
1071
|
+
label: string;
|
|
1072
|
+
/** Items of the group: `Drawer.Item`s. */
|
|
1073
|
+
children?: ReactNode;
|
|
1074
|
+
/** Classes added after the generated ones. */
|
|
1075
|
+
className?: string | undefined;
|
|
1076
|
+
/** Inline styles of the group. */
|
|
1077
|
+
style?: CSSProperties | undefined;
|
|
1078
|
+
}>;
|
|
1079
|
+
|
|
1080
|
+
/**
|
|
1081
|
+
* Props of a `Drawer.Group`: its own props, then the attributes, events and
|
|
1082
|
+
* `ref` of the rendered `div`, with the `group` role, but the legacy `color`
|
|
1083
|
+
* attribute and `aria-labelledby`, which always refers to its `label`.
|
|
1084
|
+
*/
|
|
1085
|
+
export declare type DrawerGroupProps = DrawerGroupOwnProps & Readonly<Omit<ComponentPropsWithRef<'div'>, keyof DrawerGroupOwnProps | BoxComponentExcludedAttribute | 'aria-labelledby'>>;
|
|
1086
|
+
|
|
1087
|
+
/**
|
|
1088
|
+
* Props of a `Drawer.Header` rendering its single child (`asChild`) instead
|
|
1089
|
+
* of an element: those of a `Box`, merged onto the child.
|
|
1090
|
+
*/
|
|
1091
|
+
export declare type DrawerHeaderAsChildProps = BoxAsChildProps;
|
|
1092
|
+
|
|
1093
|
+
/**
|
|
1094
|
+
* Props of a `Drawer.Header` rendering `Tag`: those of a `Box` rendering
|
|
1095
|
+
* it, `div` by default. The padding and layout it defaults to are `Box`
|
|
1096
|
+
* props: any value given replaces its default.
|
|
1097
|
+
*/
|
|
1098
|
+
export declare type DrawerHeaderProps<Tag extends BoxTag = 'div'> = BoxProps<Tag>;
|
|
1099
|
+
|
|
1100
|
+
/**
|
|
1101
|
+
* Props of a `Drawer.Item` rendering its single child (`asChild`), such as
|
|
1102
|
+
* the link of a router, which renders the `a` and carries the destination,
|
|
1103
|
+
* as a `Link` does: its own props and external state, then the global
|
|
1104
|
+
* attributes, events and `ref` merged onto the child.
|
|
1105
|
+
*/
|
|
1106
|
+
export declare type DrawerItemAsChildProps = DrawerItemOwnProps & LinkBaseExternalProps & Readonly<{
|
|
1107
|
+
/** Renders the single child, with the props, styles and content of the item merged onto it. */
|
|
1108
|
+
asChild: true;
|
|
1109
|
+
/** Single element without content rendering an `a`, such as a router link, which receives the label, the icons and the end slot. */
|
|
1110
|
+
children: ReactElement;
|
|
1111
|
+
/** No destination: the child carries it. */
|
|
1112
|
+
href?: never;
|
|
1113
|
+
/** Called on every click as the child's own `onClick`, after it, without cancelling it; never called while disabled. */
|
|
1114
|
+
onClick?: MouseEventHandler<HTMLAnchorElement> | undefined;
|
|
1115
|
+
/** Ref composed with the ref of the child, receiving its element. */
|
|
1116
|
+
ref?: Ref<HTMLAnchorElement> | undefined;
|
|
1117
|
+
}> & Readonly<Omit<HTMLAttributes<HTMLAnchorElement>, keyof DrawerItemOwnProps | BoxComponentExcludedAttribute | 'external' | 'externalLabel' | 'onClick'>>;
|
|
1118
|
+
|
|
1119
|
+
/**
|
|
1120
|
+
* Props of a `Drawer.Item` rendering an `a`, for a navigation, as a `Link`:
|
|
1121
|
+
* its own props, its required `href`, its external state, then the
|
|
1122
|
+
* attributes, events and `ref` of the `a`, but its content and the legacy
|
|
1123
|
+
* `color` attribute.
|
|
1124
|
+
*/
|
|
1125
|
+
export declare type DrawerItemLinkProps = DrawerItemOwnProps & LinkBaseExternalProps & Readonly<{
|
|
1126
|
+
/** Renders the single child instead when true; absent or false here. */
|
|
1127
|
+
asChild?: false | undefined;
|
|
1128
|
+
/** Destination of the item, kept for its accessibility, its preview and its context menu even when `onClick` handles the navigation. */
|
|
1129
|
+
href: string;
|
|
1130
|
+
/** Called on a plain click, Enter included, which then never follows `href`, as for a `Link`; never called on a modified, middle, new tab or download click, left to the browser. */
|
|
1131
|
+
onClick?: MouseEventHandler<HTMLAnchorElement> | undefined;
|
|
1132
|
+
}> & Readonly<Omit<LinkBaseAnchorAttributes, keyof DrawerItemOwnProps | 'external' | 'externalLabel' | 'href' | 'onClick'>>;
|
|
1133
|
+
|
|
1134
|
+
/** Props a `Drawer.Item` handles itself, whether it renders a `button`, an `a` or its child. */
|
|
1135
|
+
declare type DrawerItemOwnProps = Readonly<{
|
|
1136
|
+
/** Visible text of the item, which names it, and stays its name, faded out, in a collapsed drawer; kept on one line, truncated with an ellipsis. */
|
|
1137
|
+
label: string;
|
|
1138
|
+
/** Data of the decorative icon before the label, `1rem` high, in the icon column that a collapsed drawer shows alone; when absent, a dot in a `mini` drawer, expanded or collapsed, and no column in any other drawer. */
|
|
1139
|
+
startIcon?: IconData | undefined;
|
|
1140
|
+
/** Data of the decorative icon after the label, `1rem` high, hidden in a collapsed drawer; the external icon for an external link, none otherwise, when absent. */
|
|
1141
|
+
endIcon?: IconData | undefined;
|
|
1142
|
+
/** Content at the end of the item, after the end icon, such as a `Badge` counting unread messages, part of the name of the item and hidden in a collapsed drawer; none when absent. */
|
|
1143
|
+
endSlot?: ReactNode;
|
|
1144
|
+
/** Marks the item of the current page, with `aria-current="page"` and the tinted primary colors; `false` when absent. */
|
|
1145
|
+
active?: boolean | undefined;
|
|
1146
|
+
/** Disables the item: a native disabled `button`, or a link without destination ignoring clicks, as a disabled `Link`; `false` when absent. */
|
|
1147
|
+
disabled?: boolean | undefined;
|
|
1148
|
+
/** Classes added after the generated ones. */
|
|
1149
|
+
className?: string | undefined;
|
|
1150
|
+
/** Inline styles of the item, as given. */
|
|
1151
|
+
style?: CSSProperties | undefined;
|
|
1152
|
+
}>;
|
|
1153
|
+
|
|
1154
|
+
/**
|
|
1155
|
+
* Props of a `Drawer.Item` rendering a `button`, for an action without
|
|
1156
|
+
* destination: its own props, then the attributes, events and `ref` of the
|
|
1157
|
+
* `button`, of type `button` unless given, but its content and the legacy
|
|
1158
|
+
* `color` attribute.
|
|
1159
|
+
*/
|
|
1160
|
+
export declare type DrawerItemProps = DrawerItemOwnProps & Readonly<{
|
|
1161
|
+
/** Renders the single child instead when true; absent or false here. */
|
|
1162
|
+
asChild?: false | undefined;
|
|
1163
|
+
/** No destination: a `Drawer.Item` given an `href` renders a link. */
|
|
1164
|
+
href?: undefined;
|
|
1165
|
+
/** Not accepted: only a link opens in a new tab. */
|
|
1166
|
+
external?: never;
|
|
1167
|
+
/** Not accepted: only a link opens in a new tab. */
|
|
1168
|
+
externalLabel?: never;
|
|
1169
|
+
/** Called when the item is pressed, by a click, Enter or Space; not called while it is disabled. */
|
|
1170
|
+
onClick?: MouseEventHandler<HTMLButtonElement> | undefined;
|
|
1171
|
+
}> & Readonly<Omit<ComponentPropsWithRef<'button'>, keyof DrawerItemOwnProps | BoxComponentExcludedAttribute | 'href' | 'onClick'>>;
|
|
1172
|
+
|
|
1173
|
+
/**
|
|
1174
|
+
* Details of an open state change of a `Drawer`, given by Base UI as the
|
|
1175
|
+
* second argument of `onOpenChange`: the cause of the change (`reason`,
|
|
1176
|
+
* `trigger-press` for its `Drawer.Trigger`, and for a `modal` drawer
|
|
1177
|
+
* `escape-key`, `outside-press`, `swipe` or `close-press`), the native
|
|
1178
|
+
* `event` behind it, and `cancel()`, which keeps the current state, with
|
|
1179
|
+
* `isCanceled` telling whether it was called. Those of the `Collapsible`
|
|
1180
|
+
* of Base UI 1.9 for an `inline` or `mini` drawer, of its `Drawer` for a
|
|
1181
|
+
* `modal` one, passed as they are.
|
|
1182
|
+
*/
|
|
1183
|
+
export declare type DrawerOpenChangeDetails = Collapsible.Root.ChangeEventDetails | Drawer_2.Root.ChangeEventDetails;
|
|
1184
|
+
|
|
1185
|
+
/** Props of a `Drawer`, which holds its open state, rendering a `div` without box for an `inline` or `mini` drawer and no element for a `modal` one. */
|
|
1186
|
+
export declare type DrawerProps = Readonly<{
|
|
1187
|
+
/** Parts of the drawer: an optional `Drawer.Trigger`, then a `Drawer.Content` holding a `Drawer.Header`, a `Drawer.Body` and a `Drawer.Footer`, each one optional. */
|
|
1188
|
+
children?: ReactNode;
|
|
1189
|
+
/** Variant of the drawer; `inline` when absent. Changing it between `modal` and another variant mounts the drawer again, resetting an uncontrolled state to `defaultOpen`: control `open` to keep it. */
|
|
1190
|
+
variant?: DrawerVariant | undefined;
|
|
1191
|
+
/** Side of the page or the layout the drawer stands on, which places its border, and the edge a `modal` drawer slides from and is swiped to; `left` when absent. */
|
|
1192
|
+
side?: DrawerSide | undefined;
|
|
1193
|
+
/** Controlled open state: an `inline` drawer shown, a `mini` one expanded, a `modal` one over the page; keep it always defined or absent, with `onOpenChange`. */
|
|
1194
|
+
open?: boolean | undefined;
|
|
1195
|
+
/** Initial open state of an uncontrolled drawer; `false` when absent, as in Base UI. */
|
|
1196
|
+
defaultOpen?: boolean | undefined;
|
|
1197
|
+
/** Called with the requested open state and the details of the change, whose `cancel()` keeps the current state, when the drawer opens or closes, whatever the cause. */
|
|
1198
|
+
onOpenChange?: ((open: boolean, eventDetails: DrawerOpenChangeDetails) => void) | undefined;
|
|
1199
|
+
}>;
|
|
1200
|
+
|
|
1201
|
+
/** Side of the page or of the layout a `Drawer` stands on: `left` or `right`. */
|
|
1202
|
+
export declare type DrawerSide = (typeof drawerSides)[number];
|
|
1203
|
+
|
|
1204
|
+
/** Sides of the page or of the layout a `Drawer` stands on, the first being the default. */
|
|
1205
|
+
declare const drawerSides: readonly ["left", "right"];
|
|
1206
|
+
|
|
1207
|
+
/**
|
|
1208
|
+
* Props of a `Drawer.Trigger` rendering its single child (`asChild`), such
|
|
1209
|
+
* as a `Button` or an `IconButton`, which must render a native `button`:
|
|
1210
|
+
* the attributes, events and `ref` of the trigger, merged onto the child.
|
|
1211
|
+
*/
|
|
1212
|
+
export declare type DrawerTriggerAsChildProps = TriggerBaseAsChildProps;
|
|
1213
|
+
|
|
1214
|
+
/**
|
|
1215
|
+
* Props of a `Drawer.Trigger` rendering its own `button`: its content, then
|
|
1216
|
+
* the attributes, events and `ref` of the `button`.
|
|
1217
|
+
*/
|
|
1218
|
+
export declare type DrawerTriggerProps = TriggerBaseProps;
|
|
1219
|
+
|
|
1220
|
+
/**
|
|
1221
|
+
* Variant of a `Drawer`: `inline`, a panel in the layout, shown while open
|
|
1222
|
+
* and removed while closed; `modal`, a panel sliding over the page from its
|
|
1223
|
+
* edge, in a dialog, while open; `mini`, an inline panel that collapses
|
|
1224
|
+
* into a narrow rail showing the icons of its items while closed.
|
|
1225
|
+
*/
|
|
1226
|
+
export declare type DrawerVariant = (typeof drawerVariants)[number];
|
|
1227
|
+
|
|
1228
|
+
/**
|
|
1229
|
+
* Variants of a `Drawer`, the first being the default: `inline`, a panel
|
|
1230
|
+
* in the layout, shown while open and removed while closed; `modal`, a
|
|
1231
|
+
* panel sliding over the page from its edge, in a dialog, while open;
|
|
1232
|
+
* `mini`, an inline panel that collapses into a narrow rail showing the
|
|
1233
|
+
* icons of its items while closed.
|
|
1234
|
+
*/
|
|
1235
|
+
declare const drawerVariants: readonly ["inline", "modal", "mini"];
|
|
1236
|
+
|
|
1237
|
+
export declare const DropdownMenu: FC<Readonly<{
|
|
1238
|
+
children?: ReactNode;
|
|
1239
|
+
open?: boolean | undefined;
|
|
1240
|
+
defaultOpen?: boolean | undefined;
|
|
1241
|
+
onOpenChange?: ((open: boolean, eventDetails: DropdownMenuOpenChangeDetails) => void) | undefined;
|
|
1242
|
+
modal?: boolean | undefined;
|
|
1243
|
+
}>> & {
|
|
1244
|
+
Content: FC< DropdownMenuContentProps>;
|
|
1245
|
+
Group: FC< DropdownMenuGroupProps>;
|
|
1246
|
+
Item: FC< DropdownMenuItemProps>;
|
|
1247
|
+
Separator: FC< DropdownMenuSeparatorProps>;
|
|
1248
|
+
SubMenu: FC<Readonly<{
|
|
1249
|
+
children?: ReactNode;
|
|
1250
|
+
open?: boolean | undefined;
|
|
1251
|
+
defaultOpen?: boolean | undefined;
|
|
1252
|
+
onOpenChange?: ((open: boolean, eventDetails: DropdownMenuOpenChangeDetails) => void) | undefined;
|
|
1253
|
+
disabled?: boolean | undefined;
|
|
1254
|
+
closeParentOnEsc?: boolean | undefined;
|
|
1255
|
+
}>>;
|
|
1256
|
+
SubMenuContent: FC< DropdownMenuSubMenuContentProps>;
|
|
1257
|
+
SubMenuTrigger: FC< DropdownMenuSubMenuTriggerProps>;
|
|
1258
|
+
Trigger: FC< DropdownMenuTriggerProps | DropdownMenuTriggerAsChildProps>;
|
|
1259
|
+
};
|
|
1260
|
+
|
|
1261
|
+
/** Alignment of a `DropdownMenu.Content` along its side of the trigger: its start edge, its center or its end edge. */
|
|
1262
|
+
export declare type DropdownMenuContentAlign = PopupBaseAlign;
|
|
1263
|
+
|
|
1264
|
+
/**
|
|
1265
|
+
* Sizing props of `Box` a `DropdownMenu.Content` accepts, applied to its
|
|
1266
|
+
* popup as `Box` applies them: `width`, `height` and their `min` and `max`
|
|
1267
|
+
* bounds, which take any CSS value, a number being a length in pixels. Its
|
|
1268
|
+
* `minWidth` is the width of the trigger, but at least `12rem` (192px),
|
|
1269
|
+
* and its `maxWidth` and `maxHeight` the space left in the viewport,
|
|
1270
|
+
* unless given.
|
|
1271
|
+
*/
|
|
1272
|
+
declare type DropdownMenuContentBoxStyleProps = PopupBaseBoxStyleProps;
|
|
1273
|
+
|
|
1274
|
+
/** Props a `DropdownMenu.Content` handles itself, besides those of its floating popup. */
|
|
1275
|
+
declare type DropdownMenuContentOwnProps = Readonly<{
|
|
1276
|
+
/** Items of the menu: `DropdownMenu.Item`, `DropdownMenu.Group`, `DropdownMenu.Separator` and `DropdownMenu.SubMenu`. */
|
|
1277
|
+
children?: ReactNode;
|
|
1278
|
+
}>;
|
|
1279
|
+
|
|
1280
|
+
/**
|
|
1281
|
+
* Props of a `DropdownMenu.Content`: its items, its placement (`side`,
|
|
1282
|
+
* `align`, `alignOffset`, `sideOffset`, `collisionPadding`), its portal
|
|
1283
|
+
* `container` and the sizing props of `Box`, then the attributes, events
|
|
1284
|
+
* and `ref` of its popup, a `div` with the `menu` role, but its content and
|
|
1285
|
+
* the legacy `color` attribute.
|
|
1286
|
+
*/
|
|
1287
|
+
export declare type DropdownMenuContentProps = DropdownMenuContentOwnProps & PopupBaseProps;
|
|
1288
|
+
|
|
1289
|
+
/**
|
|
1290
|
+
* Side of the trigger a `DropdownMenu.Content` is placed against: below it
|
|
1291
|
+
* (`bottom`), above it (`top`), on its left (`left` or `inline-start`) or
|
|
1292
|
+
* on its right (`right` or `inline-end`). The menu moves to the opposite
|
|
1293
|
+
* side when it lacks room.
|
|
1294
|
+
*/
|
|
1295
|
+
export declare type DropdownMenuContentSide = PopupBaseSide;
|
|
1296
|
+
|
|
1297
|
+
/** Props a `DropdownMenu.Group` handles itself. */
|
|
1298
|
+
declare type DropdownMenuGroupOwnProps = Readonly<{
|
|
1299
|
+
/** Visible title shown above the items, which names the group. */
|
|
1300
|
+
label: string;
|
|
1301
|
+
/** Items of the group: `DropdownMenu.Item`. */
|
|
1302
|
+
children?: ReactNode;
|
|
1303
|
+
/** Classes added after the generated ones. */
|
|
1304
|
+
className?: string | undefined;
|
|
1305
|
+
/** Inline styles of the group. */
|
|
1306
|
+
style?: CSSProperties | undefined;
|
|
1307
|
+
}>;
|
|
1308
|
+
|
|
1309
|
+
/**
|
|
1310
|
+
* Props of a `DropdownMenu.Group`: its own props, then the attributes,
|
|
1311
|
+
* events and `ref` of the rendered `div`, with the `group` role, but the
|
|
1312
|
+
* legacy `color` attribute.
|
|
1313
|
+
*/
|
|
1314
|
+
export declare type DropdownMenuGroupProps = DropdownMenuGroupOwnProps & Readonly<Omit<ComponentPropsWithRef<'div'>, keyof DropdownMenuGroupOwnProps | BoxComponentExcludedAttribute>>;
|
|
1315
|
+
|
|
1316
|
+
/** Props a `DropdownMenu.Item` handles itself. */
|
|
1317
|
+
declare type DropdownMenuItemOwnProps = Readonly<{
|
|
1318
|
+
/** Visible text of the item, which names it and is matched by the typeahead. */
|
|
1319
|
+
label: string;
|
|
1320
|
+
/** Data of the decorative icon before the label, drawn by an `Icon` at the icon size of the items and hidden from assistive technologies; none when absent. */
|
|
1321
|
+
startIcon?: IconData | undefined;
|
|
1322
|
+
/** Data of the decorative icon after the label, at the end of the item, drawn by an `Icon` at the icon size of the items and hidden from assistive technologies; none when absent. */
|
|
1323
|
+
endIcon?: IconData | undefined;
|
|
1324
|
+
/** Text color of an ordinary or a destructive action; `neutral` when absent. */
|
|
1325
|
+
tone?: DropdownMenuItemTone | undefined;
|
|
1326
|
+
/** Grays the item and ignores its choice, the item staying reachable with the arrow keys; `false` when absent. */
|
|
1327
|
+
disabled?: boolean | undefined;
|
|
1328
|
+
/** Whether choosing the item closes the menu; `true` when absent. */
|
|
1329
|
+
closeOnClick?: boolean | undefined;
|
|
1330
|
+
/** Called when the item is chosen, by a click, Enter or Space; not called while it is disabled. */
|
|
1331
|
+
onClick?: MouseEventHandler<HTMLDivElement> | undefined;
|
|
1332
|
+
/** Classes added after the generated ones. */
|
|
1333
|
+
className?: string | undefined;
|
|
1334
|
+
/** Inline styles of the item. */
|
|
1335
|
+
style?: CSSProperties | undefined;
|
|
1336
|
+
}>;
|
|
1337
|
+
|
|
1338
|
+
/**
|
|
1339
|
+
* Props of a `DropdownMenu.Item`: its own props, then the attributes,
|
|
1340
|
+
* events and `ref` of the rendered `div`, with the `menuitem` role, but its
|
|
1341
|
+
* content (`label`) and the legacy `color` attribute.
|
|
1342
|
+
*/
|
|
1343
|
+
export declare type DropdownMenuItemProps = DropdownMenuItemOwnProps & Readonly<Omit<ComponentPropsWithRef<'div'>, keyof DropdownMenuItemOwnProps | BoxComponentExcludedAttribute>>;
|
|
1344
|
+
|
|
1345
|
+
/**
|
|
1346
|
+
* Tone of a `DropdownMenu.Item`: the text color of the menu for an ordinary
|
|
1347
|
+
* action (`neutral`), or the danger color of the theme for a destructive
|
|
1348
|
+
* one (`danger`).
|
|
1349
|
+
*/
|
|
1350
|
+
export declare type DropdownMenuItemTone = (typeof dropdownMenuItemTones)[number];
|
|
1351
|
+
|
|
1352
|
+
/**
|
|
1353
|
+
* Tones a `DropdownMenu.Item` takes, the first being the default: the text
|
|
1354
|
+
* color of the menu for an ordinary action (`neutral`), or the danger
|
|
1355
|
+
* color of the theme for a destructive one (`danger`).
|
|
1356
|
+
*/
|
|
1357
|
+
declare const dropdownMenuItemTones: readonly ["neutral", "danger"];
|
|
1358
|
+
|
|
1359
|
+
/**
|
|
1360
|
+
* Details of an open state change of a `DropdownMenu`, given by Base UI as
|
|
1361
|
+
* the second argument of `onOpenChange`: the cause of the change
|
|
1362
|
+
* (`reason`, such as `trigger-press`, `escape-key`, `outside-press` or
|
|
1363
|
+
* `item-press`), the native `event` behind it, the `trigger` element, and
|
|
1364
|
+
* `cancel()`, which keeps the current state, the menu staying open or
|
|
1365
|
+
* closed, with `isCanceled` telling whether it was called. Those of the
|
|
1366
|
+
* `Menu` of Base UI 1.9, passed as they are, also given by a
|
|
1367
|
+
* `DropdownMenu.SubMenu`, whose details are the same.
|
|
1368
|
+
*/
|
|
1369
|
+
export declare type DropdownMenuOpenChangeDetails = Menu.Root.ChangeEventDetails;
|
|
1370
|
+
|
|
1371
|
+
/** Props of a `DropdownMenu`, which renders no element of its own. */
|
|
1372
|
+
export declare type DropdownMenuProps = Readonly<{
|
|
1373
|
+
/** Parts of the menu: a `DropdownMenu.Trigger`, then a `DropdownMenu.Content` holding the items. */
|
|
1374
|
+
children?: ReactNode;
|
|
1375
|
+
/** Controlled open state; keep it always defined or absent, with `onOpenChange`. */
|
|
1376
|
+
open?: boolean | undefined;
|
|
1377
|
+
/** Initial open state of an uncontrolled menu; `false` when absent. */
|
|
1378
|
+
defaultOpen?: boolean | undefined;
|
|
1379
|
+
/** Called with the requested open state and the details of the change, whose `cancel()` keeps the current state, when the menu opens or closes, whatever the cause. */
|
|
1380
|
+
onOpenChange?: ((open: boolean, eventDetails: DropdownMenuOpenChangeDetails) => void) | undefined;
|
|
1381
|
+
/** Whether the open menu locks the page scroll and blocks outside pointer interactions; `true` when absent. */
|
|
1382
|
+
modal?: boolean | undefined;
|
|
1383
|
+
}>;
|
|
1384
|
+
|
|
1385
|
+
/** Props a `DropdownMenu.Separator` handles itself. */
|
|
1386
|
+
declare type DropdownMenuSeparatorOwnProps = Readonly<{
|
|
1387
|
+
/** Classes added after the generated ones. */
|
|
1388
|
+
className?: string | undefined;
|
|
1389
|
+
/** Inline styles of the separator. */
|
|
1390
|
+
style?: CSSProperties | undefined;
|
|
1391
|
+
}>;
|
|
1392
|
+
|
|
1393
|
+
/**
|
|
1394
|
+
* Props of a `DropdownMenu.Separator`: its own props, then the attributes,
|
|
1395
|
+
* events and `ref` of the rendered `div`, with the `separator` role, but
|
|
1396
|
+
* content, which a separator has none of, and the legacy `color` attribute.
|
|
1397
|
+
*/
|
|
1398
|
+
export declare type DropdownMenuSeparatorProps = DropdownMenuSeparatorOwnProps & Readonly<Omit<ComponentPropsWithRef<'div'>, keyof DropdownMenuSeparatorOwnProps | BoxComponentExcludedAttribute>>;
|
|
1399
|
+
|
|
1400
|
+
/** Props a `DropdownMenu.SubMenuContent` handles with defaults of its own. */
|
|
1401
|
+
declare type DropdownMenuSubMenuContentOwnProps = Readonly<{
|
|
1402
|
+
/** Items of the submenu: `DropdownMenu.Item`, `DropdownMenu.Group`, `DropdownMenu.Separator` and `DropdownMenu.SubMenu`. */
|
|
1403
|
+
children?: ReactNode;
|
|
1404
|
+
/** Side of the trigger the submenu is placed against, `inline-end` (right) or `inline-start` (left); `inline-end` when absent. */
|
|
1405
|
+
side?: DropdownMenuSubMenuContentSide | undefined;
|
|
1406
|
+
/** Alignment of the submenu along its side of the trigger; `start` when absent. */
|
|
1407
|
+
align?: DropdownMenuContentAlign | undefined;
|
|
1408
|
+
/** Shift of the submenu along its side of the trigger, in pixels, from the alignment; minus its padding and border when absent, lining up its first item with the trigger. */
|
|
1409
|
+
alignOffset?: number | undefined;
|
|
1410
|
+
/** Distance between the trigger and the submenu, in pixels; the padding and border of the parent menu plus a small gap when absent, so the two menus stand apart by that gap. */
|
|
1411
|
+
sideOffset?: number | undefined;
|
|
1412
|
+
/** Minimum width of the submenu, any CSS value, a number being a length in pixels; `12rem` (192px) when absent, as `DropdownMenu.Content`. */
|
|
1413
|
+
minWidth?: DropdownMenuContentBoxStyleProps['minWidth'];
|
|
1414
|
+
}>;
|
|
1415
|
+
|
|
1416
|
+
/**
|
|
1417
|
+
* Props of a `DropdownMenu.SubMenuContent`: those of a
|
|
1418
|
+
* `DropdownMenu.Content` (the sizing props of `Box`, `collisionPadding`,
|
|
1419
|
+
* `container`, then the
|
|
1420
|
+
* attributes, events and `ref` of its popup, a `div` with the `menu` role),
|
|
1421
|
+
* with the placement and the minimum width of a submenu by default, but
|
|
1422
|
+
* `arrow`: a submenu stands beside its trigger, inside the parent menu,
|
|
1423
|
+
* which an arrow would only overlap.
|
|
1424
|
+
*/
|
|
1425
|
+
export declare type DropdownMenuSubMenuContentProps = DropdownMenuSubMenuContentOwnProps & Readonly<Omit<DropdownMenuContentProps, keyof DropdownMenuSubMenuContentOwnProps | 'arrow'>>;
|
|
1426
|
+
|
|
1427
|
+
/**
|
|
1428
|
+
* Side of the trigger a `DropdownMenu.SubMenuContent` is placed against:
|
|
1429
|
+
* its right (`inline-end`) or its left (`inline-start`). The submenu moves
|
|
1430
|
+
* to the opposite side when it lacks room.
|
|
1431
|
+
*/
|
|
1432
|
+
export declare type DropdownMenuSubMenuContentSide = (typeof dropdownMenuSubMenuContentSides)[number];
|
|
1433
|
+
|
|
1434
|
+
/**
|
|
1435
|
+
* Sides of the trigger a `DropdownMenu.SubMenuContent` is placed against,
|
|
1436
|
+
* the first being the default: on its right, where its chevron points, or
|
|
1437
|
+
* on its left.
|
|
1438
|
+
*/
|
|
1439
|
+
declare const dropdownMenuSubMenuContentSides: readonly ["inline-end", "inline-start"];
|
|
1440
|
+
|
|
1441
|
+
/** Props of a `DropdownMenu.SubMenu`, which renders no element of its own. */
|
|
1442
|
+
export declare type DropdownMenuSubMenuProps = Readonly<{
|
|
1443
|
+
/** Parts of the submenu: a `DropdownMenu.SubMenuTrigger`, then a `DropdownMenu.SubMenuContent` holding its items. */
|
|
1444
|
+
children?: ReactNode;
|
|
1445
|
+
/** Controlled open state of the submenu; keep it always defined or absent, with `onOpenChange`. */
|
|
1446
|
+
open?: boolean | undefined;
|
|
1447
|
+
/** Initial open state of an uncontrolled submenu; `false` when absent. */
|
|
1448
|
+
defaultOpen?: boolean | undefined;
|
|
1449
|
+
/** Called with the requested open state of the submenu and the details of the change, whose `cancel()` keeps the current state, when it opens or closes, whatever the cause. */
|
|
1450
|
+
onOpenChange?: ((open: boolean, eventDetails: DropdownMenuOpenChangeDetails) => void) | undefined;
|
|
1451
|
+
/** Disables the trigger of the submenu, flagged by `aria-disabled` and still reachable with the arrow keys, and keeps the submenu closed; `false` when absent. */
|
|
1452
|
+
disabled?: boolean | undefined;
|
|
1453
|
+
/** Whether Escape in the submenu closes the whole menu, the focus going back to its trigger, rather than the submenu alone; `false` when absent. */
|
|
1454
|
+
closeParentOnEsc?: boolean | undefined;
|
|
1455
|
+
}>;
|
|
1456
|
+
|
|
1457
|
+
/** Props a `DropdownMenu.SubMenuTrigger` handles itself. */
|
|
1458
|
+
declare type DropdownMenuSubMenuTriggerOwnProps = Readonly<{
|
|
1459
|
+
/** Visible text of the item, which names it and is matched by the typeahead. */
|
|
1460
|
+
label: string;
|
|
1461
|
+
/** Data of the decorative icon before the label, drawn by an `Icon` at the icon size of the items and hidden from assistive technologies; none when absent. */
|
|
1462
|
+
startIcon?: IconData | undefined;
|
|
1463
|
+
/** Grays the item and keeps its submenu closed, the item staying reachable with the arrow keys; `false` when absent. */
|
|
1464
|
+
disabled?: boolean | undefined;
|
|
1465
|
+
/** Whether the pointer resting on the item opens its submenu, which a touch, a click or the keyboard opens anyway; `true` when absent. */
|
|
1466
|
+
openOnHover?: boolean | undefined;
|
|
1467
|
+
/** Time the pointer rests on the item before its submenu opens, in milliseconds; `0` when absent; ignored when `openOnHover` is `false`. */
|
|
1468
|
+
delay?: number | undefined;
|
|
1469
|
+
/** Time before a submenu opened on hover closes once the pointer leaves, in milliseconds; `0` when absent, as in Base UI; ignored when `openOnHover` is `false`. */
|
|
1470
|
+
closeDelay?: number | undefined;
|
|
1471
|
+
/** Classes added after the generated ones. */
|
|
1472
|
+
className?: string | undefined;
|
|
1473
|
+
/** Inline styles of the item. */
|
|
1474
|
+
style?: CSSProperties | undefined;
|
|
1475
|
+
}>;
|
|
1476
|
+
|
|
1477
|
+
/**
|
|
1478
|
+
* Props of a `DropdownMenu.SubMenuTrigger`: its own props, then the
|
|
1479
|
+
* attributes, events and `ref` of the rendered `div`, with the `menuitem`
|
|
1480
|
+
* role, but its content (`label`) and the legacy `color` attribute.
|
|
1481
|
+
*/
|
|
1482
|
+
export declare type DropdownMenuSubMenuTriggerProps = DropdownMenuSubMenuTriggerOwnProps & Readonly<Omit<ComponentPropsWithRef<'div'>, keyof DropdownMenuSubMenuTriggerOwnProps | BoxComponentExcludedAttribute>>;
|
|
1483
|
+
|
|
1484
|
+
/**
|
|
1485
|
+
* Props of a `DropdownMenu.Trigger` rendering its single child (`asChild`),
|
|
1486
|
+
* such as a `Button`, which must render a native `button`: the attributes,
|
|
1487
|
+
* events and `ref` of the trigger, merged onto the child.
|
|
1488
|
+
*/
|
|
1489
|
+
export declare type DropdownMenuTriggerAsChildProps = TriggerBaseAsChildProps;
|
|
1490
|
+
|
|
1491
|
+
/**
|
|
1492
|
+
* Props of a `DropdownMenu.Trigger` rendering its own `button`: its content,
|
|
1493
|
+
* then the attributes, events and `ref` of the `button`.
|
|
1494
|
+
*/
|
|
1495
|
+
export declare type DropdownMenuTriggerProps = TriggerBaseProps;
|
|
1496
|
+
|
|
1497
|
+
/**
|
|
1498
|
+
* Tones of the components that also take the decorative accents of the
|
|
1499
|
+
* theme, such as `Badge`, the first being the default: the `tones`, then the
|
|
1500
|
+
* accents, each one naming the color intent of the theme its colors come
|
|
1501
|
+
* from. Internal and never exported.
|
|
1502
|
+
*/
|
|
1503
|
+
declare const extendedTones: readonly ["primary", "secondary", "neutral", "warning", "danger", "success", "info", "accentOrange", "accentYellow", "accentLime", "accentCyan", "accentPurple", "accentPink"];
|
|
1504
|
+
|
|
1505
|
+
/** Size shared by the form components, from the smallest to the largest, aligned with the `sm`, `md` and `lg` sizes of `Button`. */
|
|
1506
|
+
declare type FormBaseSize = (typeof formBaseSizes)[number];
|
|
1507
|
+
|
|
1508
|
+
/**
|
|
1509
|
+
* Sizes the form components take, an ordered scale from the smallest to the
|
|
1510
|
+
* largest, the `sm`, `md` and `lg` sizes of the scale of the controls (32,
|
|
1511
|
+
* 36 and 44px high), so a field lines up with the `Button` of the same size.
|
|
1512
|
+
* `md` is the default.
|
|
1513
|
+
*/
|
|
1514
|
+
declare const formBaseSizes: readonly ["sm", "md", "lg"];
|
|
1515
|
+
|
|
1516
|
+
/**
|
|
1517
|
+
* Renders the text under a form field: a `p` (a `Typography`) showing its
|
|
1518
|
+
* `children` in the secondary text color of the theme, as a hint to fill
|
|
1519
|
+
* the field, or as its validation message when `invalid`. `size` sets its
|
|
1520
|
+
* font size, matching the field of the same size; it sets no margin, the
|
|
1521
|
+
* field composing it spaces it.
|
|
1522
|
+
*
|
|
1523
|
+
* Give it an `id` and reference it from the `aria-describedby` of the field:
|
|
1524
|
+
* assistive technologies then read it as the description of the field when
|
|
1525
|
+
* the field is focused. `invalid` shows the text in the danger text color of
|
|
1526
|
+
* the theme after a decorative alert icon, which keeps the error visible
|
|
1527
|
+
* without color, and flags it with `data-invalid`; the field carries
|
|
1528
|
+
* `aria-invalid="true"` itself, announced with its description. The text is
|
|
1529
|
+
* no live region: a message that appears is read when the field is focused,
|
|
1530
|
+
* so a form validated on submit moves the focus to the first invalid field.
|
|
1531
|
+
* The field composing it gives the `id`, the `aria-describedby` and the
|
|
1532
|
+
* `aria-invalid`, and renders the message in a live region of its own when
|
|
1533
|
+
* it must be announced while the focus stays elsewhere.
|
|
1534
|
+
*
|
|
1535
|
+
* `disabled` dims the text with the disabled text color of the theme, over
|
|
1536
|
+
* the validation color, and flags it with `data-disabled`, for a disabled
|
|
1537
|
+
* field. In forced colors, a disabled text takes the system gray text.
|
|
1538
|
+
*
|
|
1539
|
+
* The margin props of `Box` space it from its siblings. Every other prop
|
|
1540
|
+
* (attributes, events, `ref`) goes to the `p`;
|
|
1541
|
+
* `className` comes after the generated class and `style` after the
|
|
1542
|
+
* generated styles. Its styles sit in the `cv.components` cascade layers,
|
|
1543
|
+
* below any unlayered style of the consumer.
|
|
1544
|
+
*
|
|
1545
|
+
* @param props Content, states, size, margin props and native props of the
|
|
1546
|
+
* `p`.
|
|
1547
|
+
* @param props.children Help text or validation message, as phrasing
|
|
1548
|
+
* content.
|
|
1549
|
+
* @param props.disabled Whether the text is dimmed for a disabled field;
|
|
1550
|
+
* `false` when absent.
|
|
1551
|
+
* @param props.invalid Whether the text is a validation message; `false`
|
|
1552
|
+
* when absent.
|
|
1553
|
+
* @param props.size Font size; `md` when absent.
|
|
1554
|
+
* @returns The helper text.
|
|
1555
|
+
*/
|
|
1556
|
+
export declare const FormHelperText: FC<FormHelperTextProps>;
|
|
1557
|
+
|
|
1558
|
+
/**
|
|
1559
|
+
* Native attributes a `FormHelperText` does not accept: it renders its own
|
|
1560
|
+
* content from `children`, and `color`, a legacy attribute, would be read by
|
|
1561
|
+
* `Typography` as its text color.
|
|
1562
|
+
*/
|
|
1563
|
+
declare type FormHelperTextExcludedAttribute = 'color' | 'dangerouslySetInnerHTML';
|
|
1564
|
+
|
|
1565
|
+
/** Props a `FormHelperText` handles itself. */
|
|
1566
|
+
declare type FormHelperTextOwnProps = Readonly<{
|
|
1567
|
+
/** Text helping to fill the field, or its validation message when `invalid`, as phrasing content. */
|
|
1568
|
+
children: ReactNode;
|
|
1569
|
+
/** Shows the text as a validation message, in the danger text color of the theme after a decorative alert icon, flagged with `data-invalid`; `false` when absent. */
|
|
1570
|
+
invalid?: boolean | undefined;
|
|
1571
|
+
/** Dims the text with the disabled text color of the theme and flags it with `data-disabled`, for a disabled field; `false` when absent. */
|
|
1572
|
+
disabled?: boolean | undefined;
|
|
1573
|
+
/** Font size, matching the field of the same size; `md` when absent. */
|
|
1574
|
+
size?: FormHelperTextSize | undefined;
|
|
1575
|
+
/** Classes added after the generated one. */
|
|
1576
|
+
className?: string | undefined;
|
|
1577
|
+
/** Inline styles, merged after the generated ones, so they prevail. */
|
|
1578
|
+
style?: CSSProperties | undefined;
|
|
1579
|
+
}>;
|
|
1580
|
+
|
|
1581
|
+
/**
|
|
1582
|
+
* Props of a `FormHelperText`: its own props, the margin props of `Box`,
|
|
1583
|
+
* then the attributes, events and `ref` of the rendered `p`, `id` included,
|
|
1584
|
+
* but the legacy `color` attribute.
|
|
1585
|
+
*/
|
|
1586
|
+
export declare type FormHelperTextProps = FormHelperTextOwnProps & BoxMarginStyleProps & Readonly<Omit<ComponentPropsWithRef<'p'>, keyof FormHelperTextOwnProps | FormHelperTextExcludedAttribute>>;
|
|
1587
|
+
|
|
1588
|
+
/**
|
|
1589
|
+
* Size of a `FormHelperText`, from the smallest to the largest, matching the
|
|
1590
|
+
* field of the same size: its font size (12, 12 or 14px from `sm` to `lg`).
|
|
1591
|
+
*/
|
|
1592
|
+
export declare type FormHelperTextSize = FormBaseSize;
|
|
1593
|
+
|
|
1594
|
+
/**
|
|
1595
|
+
* Renders the visible label of a form field: a native `label` (a
|
|
1596
|
+
* `Typography`) showing its `children`, associated with the field through
|
|
1597
|
+
* `htmlFor`, so it names the field and a click on it focuses the field.
|
|
1598
|
+
* `size` sets its font size, matching the field of the same size; it sets no
|
|
1599
|
+
* margin, the field composing it spaces it. It is as wide as its text, at
|
|
1600
|
+
* most its container, even in a parent that stretches its children, so a
|
|
1601
|
+
* click beside the text does not focus the field; a long text wraps.
|
|
1602
|
+
*
|
|
1603
|
+
* A double or triple click does not select its text: from the second press
|
|
1604
|
+
* of a multiple click, its `mousedown` is prevented, after the `onMouseDown`
|
|
1605
|
+
* of the consumer, unless that one prevented it already. A single click
|
|
1606
|
+
* keeps its native behavior and focuses the field, and a drag still selects
|
|
1607
|
+
* the text to copy it.
|
|
1608
|
+
*
|
|
1609
|
+
* `required` adds an asterisk after the text, in the danger text color of
|
|
1610
|
+
* the theme and hidden from assistive technologies: the field carries
|
|
1611
|
+
* `required` itself, which they announce, and its name stays the text alone.
|
|
1612
|
+
* `disabled` dims the label with the disabled text color of the theme and
|
|
1613
|
+
* flags it with `data-disabled`, for a disabled field, which carries
|
|
1614
|
+
* `disabled` itself. In forced colors, a disabled label takes the system
|
|
1615
|
+
* gray text.
|
|
1616
|
+
*
|
|
1617
|
+
* The margin props of `Box` space it from its siblings. Every other prop
|
|
1618
|
+
* (attributes, events, `ref`) goes to the `label`, its
|
|
1619
|
+
* `onMouseDown` called first;
|
|
1620
|
+
* `className` comes after the generated class and `style` after the
|
|
1621
|
+
* generated styles. Its styles sit in the `cv.components` cascade layers,
|
|
1622
|
+
* below any unlayered style of the consumer.
|
|
1623
|
+
*
|
|
1624
|
+
* @param props Content, states, size, margin props and native props of the
|
|
1625
|
+
* `label`.
|
|
1626
|
+
* @param props.children Visible text of the label, which names the field.
|
|
1627
|
+
* @param props.disabled Whether the label is dimmed for a disabled field;
|
|
1628
|
+
* `false` when absent.
|
|
1629
|
+
* @param props.required Whether the asterisk of a required field is shown;
|
|
1630
|
+
* `false` when absent.
|
|
1631
|
+
* @param props.size Font size; `md` when absent.
|
|
1632
|
+
* @returns The label.
|
|
1633
|
+
*/
|
|
1634
|
+
export declare const FormLabel: FC<FormLabelProps>;
|
|
1635
|
+
|
|
1636
|
+
/**
|
|
1637
|
+
* Native attributes a `FormLabel` does not accept: it renders its own
|
|
1638
|
+
* content from `children`, and `color`, a legacy attribute, would be read by
|
|
1639
|
+
* `Typography` as its text color.
|
|
1640
|
+
*/
|
|
1641
|
+
declare type FormLabelExcludedAttribute = 'color' | 'dangerouslySetInnerHTML';
|
|
1642
|
+
|
|
1643
|
+
/** Props a `FormLabel` handles itself. */
|
|
1644
|
+
declare type FormLabelOwnProps = Readonly<{
|
|
1645
|
+
/** Visible text of the label, which names the field associated through `htmlFor`. */
|
|
1646
|
+
children: ReactNode;
|
|
1647
|
+
/** Shows an asterisk after the text, hidden from assistive technologies, the field carrying `required` itself; `false` when absent. */
|
|
1648
|
+
required?: boolean | undefined;
|
|
1649
|
+
/** Dims the label with the disabled text color of the theme and flags it with `data-disabled`, for a disabled field; `false` when absent. */
|
|
1650
|
+
disabled?: boolean | undefined;
|
|
1651
|
+
/** Font size, matching the field of the same size; `md` when absent. */
|
|
1652
|
+
size?: FormLabelSize | undefined;
|
|
1653
|
+
/** Classes added after the generated one. */
|
|
1654
|
+
className?: string | undefined;
|
|
1655
|
+
/** Inline styles, merged after the generated ones, so they prevail. */
|
|
1656
|
+
style?: CSSProperties | undefined;
|
|
1657
|
+
}>;
|
|
1658
|
+
|
|
1659
|
+
/**
|
|
1660
|
+
* Props of a `FormLabel`: its own props, the margin props of `Box`, then
|
|
1661
|
+
* the attributes, events and `ref` of the rendered `label`, `htmlFor`
|
|
1662
|
+
* included, but the legacy `color` attribute.
|
|
1663
|
+
*/
|
|
1664
|
+
export declare type FormLabelProps = FormLabelOwnProps & BoxMarginStyleProps & Readonly<Omit<ComponentPropsWithRef<'label'>, keyof FormLabelOwnProps | FormLabelExcludedAttribute>>;
|
|
1665
|
+
|
|
1666
|
+
/**
|
|
1667
|
+
* Size of a `FormLabel`, from the smallest to the largest, matching the
|
|
1668
|
+
* field of the same size: its font size (12, 14 or 16px from `sm` to `lg`).
|
|
1669
|
+
*/
|
|
1670
|
+
export declare type FormLabelSize = FormBaseSize;
|
|
1671
|
+
|
|
1672
|
+
export declare const HoverCard: FC<Readonly<{
|
|
1673
|
+
children?: ReactNode;
|
|
1674
|
+
open?: boolean | undefined;
|
|
1675
|
+
defaultOpen?: boolean | undefined;
|
|
1676
|
+
onOpenChange?: ((open: boolean, eventDetails: HoverCardOpenChangeDetails) => void) | undefined;
|
|
1677
|
+
}>> & {
|
|
1678
|
+
Content: FC< HoverCardContentProps>;
|
|
1679
|
+
Trigger: FC< HoverCardTriggerProps | HoverCardTriggerAsChildProps>;
|
|
1680
|
+
};
|
|
1681
|
+
|
|
1682
|
+
/** Alignment of a `HoverCard.Content` along its side of the trigger: its start edge, its center or its end edge. */
|
|
1683
|
+
export declare type HoverCardContentAlign = PopupBaseAlign;
|
|
1684
|
+
|
|
1685
|
+
/** Props a `HoverCard.Content` handles itself, besides those of its floating popup. */
|
|
1686
|
+
declare type HoverCardContentOwnProps = Readonly<{
|
|
1687
|
+
/** Preview shown in the card, such as an avatar, a name and a short text; a visual complement of the link, which keyboard and screen reader users do not reach. */
|
|
1688
|
+
children?: ReactNode;
|
|
1689
|
+
/** Padding around the content, inside the border, a step of the space scale as the `padding` of `Box`; `12` when absent. */
|
|
1690
|
+
padding?: BoxStyleProps['padding'];
|
|
1691
|
+
}>;
|
|
1692
|
+
|
|
1693
|
+
/**
|
|
1694
|
+
* Props of a `HoverCard.Content`: its content and padding, its arrow, its
|
|
1695
|
+
* placement (`side`, `align`, `alignOffset`, `sideOffset`,
|
|
1696
|
+
* `collisionPadding`), its portal `container` and the sizing props of
|
|
1697
|
+
* `Box`, then the attributes, events and `ref` of its popup, a `div`, but
|
|
1698
|
+
* its content and the legacy `color` attribute.
|
|
1699
|
+
*/
|
|
1700
|
+
export declare type HoverCardContentProps = HoverCardContentOwnProps & PopupBaseProps;
|
|
1701
|
+
|
|
1702
|
+
/**
|
|
1703
|
+
* Side of the trigger a `HoverCard.Content` is placed against: below it
|
|
1704
|
+
* (`bottom`), above it (`top`), on its left (`left` or `inline-start`) or
|
|
1705
|
+
* on its right (`right` or `inline-end`). The card moves to the opposite
|
|
1706
|
+
* side when it lacks room.
|
|
1707
|
+
*/
|
|
1708
|
+
export declare type HoverCardContentSide = PopupBaseSide;
|
|
1709
|
+
|
|
1710
|
+
/**
|
|
1711
|
+
* Details of an open state change of a `HoverCard`, given by Base UI as the
|
|
1712
|
+
* second argument of `onOpenChange`: the cause of the change (`reason`,
|
|
1713
|
+
* such as `trigger-hover`, `trigger-focus`, `outside-press` or
|
|
1714
|
+
* `escape-key`), the native `event` behind it, the `trigger` element, and
|
|
1715
|
+
* `cancel()`, which keeps the current state, with `isCanceled` telling
|
|
1716
|
+
* whether it was called. Those of the `PreviewCard` of Base UI 1.9, passed
|
|
1717
|
+
* as they are.
|
|
1718
|
+
*/
|
|
1719
|
+
export declare type HoverCardOpenChangeDetails = PreviewCard.Root.ChangeEventDetails;
|
|
1720
|
+
|
|
1721
|
+
/** Props of a `HoverCard`, which renders no element of its own. */
|
|
1722
|
+
export declare type HoverCardProps = Readonly<{
|
|
1723
|
+
/** Parts of the hover card: a `HoverCard.Trigger`, then a `HoverCard.Content` holding the preview. */
|
|
1724
|
+
children?: ReactNode;
|
|
1725
|
+
/** Controlled open state; keep it always defined or absent, with `onOpenChange`. */
|
|
1726
|
+
open?: boolean | undefined;
|
|
1727
|
+
/** Initial open state of an uncontrolled hover card; `false` when absent. */
|
|
1728
|
+
defaultOpen?: boolean | undefined;
|
|
1729
|
+
/** Called with the requested open state and the details of the change, whose `cancel()` keeps the current state, when the hover card opens or closes, whatever the cause. */
|
|
1730
|
+
onOpenChange?: ((open: boolean, eventDetails: HoverCardOpenChangeDetails) => void) | undefined;
|
|
1731
|
+
}>;
|
|
1732
|
+
|
|
1733
|
+
/**
|
|
1734
|
+
* Props of a `HoverCard.Trigger` rendering its single child (`asChild`),
|
|
1735
|
+
* such as a `Link` or the link of a router, which must render a native
|
|
1736
|
+
* `a`: its hover delays, then the attributes, events and `ref` of the
|
|
1737
|
+
* trigger, merged onto the child.
|
|
1738
|
+
*/
|
|
1739
|
+
export declare type HoverCardTriggerAsChildProps = HoverCardTriggerOwnProps & TriggerBaseAsChildProps<'a'>;
|
|
1740
|
+
|
|
1741
|
+
/** Hover delays a `HoverCard.Trigger` handles itself, whether it renders its own anchor or its child. */
|
|
1742
|
+
declare type HoverCardTriggerOwnProps = Readonly<{
|
|
1743
|
+
/** Time the pointer hovers the trigger, or the focus stays on it, before the card opens, in milliseconds; `600` when absent. */
|
|
1744
|
+
delay?: number | undefined;
|
|
1745
|
+
/** Time before the card closes once the pointer leaves the trigger and the card, in milliseconds; `300` when absent. */
|
|
1746
|
+
closeDelay?: number | undefined;
|
|
1747
|
+
}>;
|
|
1748
|
+
|
|
1749
|
+
/**
|
|
1750
|
+
* Props of a `HoverCard.Trigger` rendering its own `a`: its hover delays,
|
|
1751
|
+
* its content, which names the link, its required `href`, then the
|
|
1752
|
+
* attributes, events and `ref` of the anchor.
|
|
1753
|
+
*/
|
|
1754
|
+
export declare type HoverCardTriggerProps = HoverCardTriggerOwnProps & TriggerBaseProps<'a'> & Readonly<{
|
|
1755
|
+
/** Destination of the link, which holds what the card previews; required, since an anchor without it is neither a link nor focusable, so the keyboard could not open the card. */
|
|
1756
|
+
href: string;
|
|
1757
|
+
}>;
|
|
1758
|
+
|
|
1759
|
+
/**
|
|
1760
|
+
* Renders a square native `button` (a `Box`) drawing its decorative `icon`
|
|
1761
|
+
* data with an `Icon`, centered and hidden from assistive technologies.
|
|
1762
|
+
* `variant`, `tone` and `size` set its colors and dimensions as for a
|
|
1763
|
+
* `Button`: its side is the height of a `Button` of the same size, and its
|
|
1764
|
+
* icon is about half its side (14, 16, 20 or 24px from `xs` to `lg`), larger
|
|
1765
|
+
* than the icons of a `Button`.
|
|
1766
|
+
*
|
|
1767
|
+
* `loading` hides the icon behind a spinner at the icon size of a `Button`
|
|
1768
|
+
* of the same size, flags the button with `data-loading`, `aria-busy` and
|
|
1769
|
+
* `aria-disabled`, and cancels its clicks: `onClick` is not called and no
|
|
1770
|
+
* form is submitted, but other handlers run and the button stays focusable.
|
|
1771
|
+
* A given `selected` makes it a toggle button: `aria-pressed` exposes its
|
|
1772
|
+
* state, and while `true` it keeps its pressed colors, hovered or loading,
|
|
1773
|
+
* and is flagged with `data-selected`; disabled, it takes the disabled colors.
|
|
1774
|
+
*
|
|
1775
|
+
* The required `aria-label` names the button. `type` is `button` unless
|
|
1776
|
+
* given. `disabled` disables it natively and flags it with `data-disabled`. The focus ring shows on keyboard
|
|
1777
|
+
* focus only.
|
|
1778
|
+
*
|
|
1779
|
+
* The margin props of `Box` space it from its siblings. Every other prop
|
|
1780
|
+
* (attributes, events, `ref`) goes to the `button`; `className` comes after
|
|
1781
|
+
* the generated classes. Its styles sit in the `cv.components` cascade
|
|
1782
|
+
* layers, below any unlayered style of the consumer.
|
|
1783
|
+
*
|
|
1784
|
+
* @param props Icon, accessible name, presentation, loading and selected
|
|
1785
|
+
* states, margin props and native props of the `button`.
|
|
1786
|
+
* @param props.icon Data of the decorative icon shown in the button.
|
|
1787
|
+
* @param props.loading Whether the button is loading; `false` when absent.
|
|
1788
|
+
* @param props.size Side and icon size; `md` when absent.
|
|
1789
|
+
* @returns The button.
|
|
1790
|
+
*/
|
|
1791
|
+
export declare const IconButton: FC<IconButtonProps>;
|
|
1792
|
+
|
|
1793
|
+
/** Props an `IconButton` handles itself. */
|
|
1794
|
+
declare type IconButtonOwnProps = Readonly<{
|
|
1795
|
+
/** Data of the decorative icon shown in the button, drawn by an `Icon` at the icon size and hidden from assistive technologies. */
|
|
1796
|
+
icon: IconData;
|
|
1797
|
+
/** Accessible name of the button, required since its icon is hidden: the action it performs, such as `Delete`. */
|
|
1798
|
+
'aria-label': string;
|
|
1799
|
+
/** Fill, outline or icon alone; `contained` when absent. */
|
|
1800
|
+
variant?: IconButtonVariant | undefined;
|
|
1801
|
+
/** Color intent of the theme; `primary` when absent. */
|
|
1802
|
+
tone?: IconButtonTone | undefined;
|
|
1803
|
+
/** Side and icon size; `md` when absent. */
|
|
1804
|
+
size?: IconButtonSize | undefined;
|
|
1805
|
+
/** Shows a spinner over the hidden icon and ignores clicks, the button staying focusable; `false` when absent. */
|
|
1806
|
+
loading?: boolean | undefined;
|
|
1807
|
+
/** Makes it a toggle button, kept in its pressed colors while `true` and exposed by `aria-pressed`, which it overrides; `false` when absent, without `aria-pressed`. */
|
|
1808
|
+
selected?: boolean | undefined;
|
|
1809
|
+
/** Classes added after the generated ones. */
|
|
1810
|
+
className?: string | undefined;
|
|
1811
|
+
/** Inline styles of the `button`, as given. */
|
|
1812
|
+
style?: CSSProperties | undefined;
|
|
1813
|
+
}>;
|
|
1814
|
+
|
|
1815
|
+
/**
|
|
1816
|
+
* Props of an `IconButton`: its own props, the margin props of `Box`, then
|
|
1817
|
+
* the attributes, events and `ref` of the rendered `button`, but its content
|
|
1818
|
+
* (`icon`) and the legacy `color` attribute, which `Box` would read as its
|
|
1819
|
+
* text color.
|
|
1820
|
+
*/
|
|
1821
|
+
export declare type IconButtonProps = IconButtonOwnProps & BoxMarginStyleProps & Readonly<Omit<ComponentPropsWithRef<'button'>, keyof IconButtonOwnProps | BoxComponentExcludedAttribute>>;
|
|
1822
|
+
|
|
1823
|
+
/**
|
|
1824
|
+
* Size of an `IconButton`, from the smallest to the largest: its side, the
|
|
1825
|
+
* height of a `Button` of the same size, with its icon size.
|
|
1826
|
+
*/
|
|
1827
|
+
export declare type IconButtonSize = ButtonBaseSize;
|
|
1828
|
+
|
|
1829
|
+
/**
|
|
1830
|
+
* Tone of an `IconButton`: the color intent of the theme its colors come
|
|
1831
|
+
* from, of the same name.
|
|
1832
|
+
*/
|
|
1833
|
+
export declare type IconButtonTone = ButtonBaseTone;
|
|
1834
|
+
|
|
1835
|
+
/**
|
|
1836
|
+
* Variant of an `IconButton`: a solid fill (`contained`), a thin outline
|
|
1837
|
+
* (`outlined`), or the icon alone, tinted on hover (`ghost`).
|
|
1838
|
+
*/
|
|
1839
|
+
export declare type IconButtonVariant = ButtonBaseVariant;
|
|
1840
|
+
|
|
1841
|
+
/**
|
|
1842
|
+
* Displays a picture in a box that shows its loading state, written to
|
|
1843
|
+
* `data-state` on the box: `loading`, `loaded` or `error`.
|
|
1844
|
+
*
|
|
1845
|
+
* The server renders the picture visible, so it shows without JavaScript and
|
|
1846
|
+
* as soon as it arrives; hydration never hides it. A picture the client
|
|
1847
|
+
* mounts while it still loads is hidden behind a placeholder, a `Skeleton`
|
|
1848
|
+
* covering the box, then fades in once loaded; a picture already complete at
|
|
1849
|
+
* mount, cached or loaded before hydration, is never hidden. The animation
|
|
1850
|
+
* of the skeleton and the fade are dropped when reduced motion is preferred.
|
|
1851
|
+
* When `src` fails, or is empty without `srcSet` candidates,
|
|
1852
|
+
* `fallbackSrc` is loaded instead, without `srcSet` and `sizes`; an empty
|
|
1853
|
+
* `src` with a non-empty `srcSet` loads its candidates. When every source
|
|
1854
|
+
* fails, the `img` is removed and the box shows `fallback`, or by default a
|
|
1855
|
+
* broken image icon named by `alt`. With a non-empty `alt`, the fallback
|
|
1856
|
+
* content of the consumer, `null` included, is rendered as given, preceded
|
|
1857
|
+
* by a visually hidden image named by `alt`, so the failed picture keeps its
|
|
1858
|
+
* name whatever the content, whose text and controls stay accessible; with
|
|
1859
|
+
* an empty `alt`, the picture stays decorative. Each source mounts a new
|
|
1860
|
+
* `img`; new sources restart from loading.
|
|
1861
|
+
*
|
|
1862
|
+
* The box is a `Box` rendering an inline-block `span`. It takes the margin
|
|
1863
|
+
* and padding props of `Box`, space tokens, its sizing props, any CSS value,
|
|
1864
|
+
* a number being a length in pixels, and its corner radius props,
|
|
1865
|
+
* `borderRadius` and its longhands, radius tokens rounding the box and
|
|
1866
|
+
* clipping the picture. Its `maxWidth` is `100%` unless given, so it never
|
|
1867
|
+
* overflows its container. Without sizing props, it is as wide as the
|
|
1868
|
+
* picture. `width` and `height` size the box, not the `img`, so the browser
|
|
1869
|
+
* cannot reserve the room of the picture: `aspectRatio` sets the height of
|
|
1870
|
+
* the box from a definite width, keeping that room and avoiding a layout
|
|
1871
|
+
* shift. Without a definite width, given by `width`, `minWidth`, a class or
|
|
1872
|
+
* the layout of the parent, an inline-block box is as wide as its content
|
|
1873
|
+
* and `aspectRatio` reserves nothing before the picture loads. The picture
|
|
1874
|
+
* fills the box: `fit` (`cover` by default) and `objectPosition` place it.
|
|
1875
|
+
* The styles of the box sit in the `cv.components` cascade layers, above
|
|
1876
|
+
* those of `Box`, and set none of the properties its props set: unlayered
|
|
1877
|
+
* styles of the consumer override both.
|
|
1878
|
+
*
|
|
1879
|
+
* Every other prop (attributes, events, `ref`) is forwarded to the `img`,
|
|
1880
|
+
* lazily loaded and asynchronously decoded unless `loading` or `decoding`
|
|
1881
|
+
* says otherwise. Once every source failed, the `img` is gone, and with it
|
|
1882
|
+
* those attributes, such as `id`, `title`, `data-*` or ARIA attributes.
|
|
1883
|
+
* `onLoad` and `onError` are called whenever the `img` fires `load` or
|
|
1884
|
+
* `error`, for each source it requests while the `Image` is mounted; an
|
|
1885
|
+
* outcome found without event is not reported to them: a source loaded or
|
|
1886
|
+
* failed before hydration, or an empty `src` without `srcSet`, never
|
|
1887
|
+
* requested. `onStatusChange` is called with each new status, whatever
|
|
1888
|
+
* found it, but never with the initial `loading`. The `ref` receives each
|
|
1889
|
+
* `img` while it is rendered, and `null` once every source failed. A ref
|
|
1890
|
+
* that is neither a function nor an object holding `current` throws.
|
|
1891
|
+
* `className` and `style` apply to the box.
|
|
1892
|
+
*
|
|
1893
|
+
* @param props Sources, text alternative, presentation, spacing, sizing and
|
|
1894
|
+
* radius props, fallback, status callback and native props of the `img`.
|
|
1895
|
+
* @returns The picture in its box.
|
|
1896
|
+
*/
|
|
1897
|
+
declare const Image_2: FC<ImageProps>;
|
|
1898
|
+
export { Image_2 as Image }
|
|
1899
|
+
|
|
1900
|
+
/**
|
|
1901
|
+
* Ratio of the width to the height of the box of an `Image`: a number, such
|
|
1902
|
+
* as `1.5`, or a CSS ratio, such as `'16/9'` or `'16 / 9'`.
|
|
1903
|
+
*/
|
|
1904
|
+
export declare type ImageAspectRatio = number | `${number}/${number}` | `${number} / ${number}`;
|
|
1905
|
+
|
|
1906
|
+
/** Name of a style prop of `Box` an `Image` accepts. */
|
|
1907
|
+
declare type ImageBoxStylePropName = (typeof imageBoxStylePropNames)[number];
|
|
1908
|
+
|
|
1909
|
+
/**
|
|
1910
|
+
* Style props of `Box` an `Image` accepts and forwards to its box, as `Box`
|
|
1911
|
+
* types and applies them: the margin and padding props, shorthands
|
|
1912
|
+
* included, the sizing props, and the corner radius props, the
|
|
1913
|
+
* `borderRadius` shorthand and its four longhands. Single source of the
|
|
1914
|
+
* `ImageBoxStyleProps` type and of the split of the props, in alphabetical
|
|
1915
|
+
* order, the order the box receives them in.
|
|
1916
|
+
*/
|
|
1917
|
+
declare const imageBoxStylePropNames: readonly ["borderBottomLeftRadius", "borderBottomRightRadius", "borderRadius", "borderTopLeftRadius", "borderTopRightRadius", "height", "margin", "marginBottom", "marginLeft", "marginRight", "marginTop", "marginX", "marginY", "maxHeight", "maxWidth", "minHeight", "minWidth", "padding", "paddingBottom", "paddingLeft", "paddingRight", "paddingTop", "paddingX", "paddingY", "width"];
|
|
1918
|
+
|
|
1919
|
+
/**
|
|
1920
|
+
* Style props of `Box` an `Image` accepts, applied to its box as `Box`
|
|
1921
|
+
* applies them: the margin and padding props, shorthands included, which
|
|
1922
|
+
* take space tokens of the theme, the sizing props, which take any CSS
|
|
1923
|
+
* value, a number being a length in pixels, and the corner radius props,
|
|
1924
|
+
* `borderRadius` and its longhands, which take radius tokens of the theme
|
|
1925
|
+
* and round the box, clipping the picture. `maxWidth` is `100%` when
|
|
1926
|
+
* absent.
|
|
1927
|
+
*/
|
|
1928
|
+
declare type ImageBoxStyleProps = Pick<BoxStyleProps, ImageBoxStylePropName>;
|
|
1929
|
+
|
|
1930
|
+
/** Native attributes an `Image` does not accept, since an `img` has no content. */
|
|
1931
|
+
declare type ImageExcludedAttribute = 'children' | 'dangerouslySetInnerHTML';
|
|
1932
|
+
|
|
1933
|
+
/** How the picture fills its box, as the CSS `object-fit` property. */
|
|
1934
|
+
export declare type ImageFit = keyof typeof imageObjectFits;
|
|
1935
|
+
|
|
1936
|
+
/**
|
|
1937
|
+
* Values of the `fit` of an `Image`, keyed by value: how the picture fills
|
|
1938
|
+
* its box, as the CSS `object-fit` property of the same values.
|
|
1939
|
+
*/
|
|
1940
|
+
declare const imageObjectFits: {
|
|
1941
|
+
readonly contain: "contain";
|
|
1942
|
+
readonly cover: "cover";
|
|
1943
|
+
readonly fill: "fill";
|
|
1944
|
+
readonly none: "none";
|
|
1945
|
+
readonly 'scale-down': "scale-down";
|
|
1946
|
+
};
|
|
1947
|
+
|
|
1948
|
+
/** Props an `Image` handles itself. */
|
|
1949
|
+
declare type ImageOwnProps = Readonly<{
|
|
1950
|
+
/** URL of the picture; when empty, a non-empty `srcSet` gives the candidates, otherwise it fails at once. */
|
|
1951
|
+
src: string;
|
|
1952
|
+
/** Text alternative of the picture; an empty string marks it as decorative. */
|
|
1953
|
+
alt: string;
|
|
1954
|
+
/** URL loaded instead when `src` fails; without it, a failure shows the fallback content. */
|
|
1955
|
+
fallbackSrc?: string | undefined;
|
|
1956
|
+
/** Content shown when every source fails; a broken image icon named by `alt` when undefined. */
|
|
1957
|
+
fallback?: ReactNode;
|
|
1958
|
+
/** Ratio of the width to the height of the box, which needs a definite width; the picture sets it when absent. */
|
|
1959
|
+
aspectRatio?: ImageAspectRatio | undefined;
|
|
1960
|
+
/** How the picture fills its box; `cover` when absent. */
|
|
1961
|
+
fit?: ImageFit | undefined;
|
|
1962
|
+
/** Position of the picture in its box, as CSS `object-position`; centered when absent. */
|
|
1963
|
+
objectPosition?: string | undefined;
|
|
1964
|
+
/** Called after each change of the loading state, from an initial `loading`; never for that initial state. */
|
|
1965
|
+
onStatusChange?: ((status: ImageStatus) => void) | undefined;
|
|
1966
|
+
/** Classes added to the container after the generated ones. */
|
|
1967
|
+
className?: string | undefined;
|
|
1968
|
+
/** Inline styles of the container, merged with the generated variables. */
|
|
1969
|
+
style?: CSSProperties | undefined;
|
|
1970
|
+
}>;
|
|
1971
|
+
|
|
1972
|
+
/**
|
|
1973
|
+
* Props of an `Image`: its own props and the spacing, sizing and radius
|
|
1974
|
+
* props of its box, then the attributes, events and `ref` of the rendered
|
|
1975
|
+
* `img`. `className` and `style` apply to the box.
|
|
1976
|
+
*
|
|
1977
|
+
* `width` and `height` are sizing props of the box, CSS values, not the
|
|
1978
|
+
* native attributes of the `img`: the browser cannot reserve the ratio of
|
|
1979
|
+
* the picture before it loads, so the layout shifts when it does unless
|
|
1980
|
+
* `aspectRatio` is given with a definite width, which is recommended.
|
|
1981
|
+
*/
|
|
1982
|
+
export declare type ImageProps = ImageOwnProps & ImageBoxStyleProps & Readonly<Omit<ComponentPropsWithRef<'img'>, keyof ImageOwnProps | keyof ImageBoxStyleProps | ImageExcludedAttribute>>;
|
|
1983
|
+
|
|
1984
|
+
/**
|
|
1985
|
+
* Loading state of an `Image`, written to the `data-state` attribute of its
|
|
1986
|
+
* container: the picture is loading (placeholder shown), loaded (picture
|
|
1987
|
+
* shown), or failed for good (fallback shown).
|
|
1988
|
+
*/
|
|
1989
|
+
export declare type ImageStatus = 'loading' | 'loaded' | 'error';
|
|
1990
|
+
|
|
1991
|
+
/**
|
|
1992
|
+
* Renders a text link: a native `a` (a `Box`) with its `href`, showing its
|
|
1993
|
+
* `label`, which names it, or `aria-label` when the label is empty, between
|
|
1994
|
+
* optional decorative icons hidden from assistive technologies.
|
|
1995
|
+
*
|
|
1996
|
+
* With `onClick`, a plain click, Enter included, cancels the default action,
|
|
1997
|
+
* then calls it, so `href` is never followed, even if `onClick` throws, but
|
|
1998
|
+
* still gives the link its role, its preview and its context
|
|
1999
|
+
* menu. A modified or middle click, a `target` other than `_self` or a
|
|
2000
|
+
* `download` is left to the browser, without calling `onClick`.
|
|
2001
|
+
*
|
|
2002
|
+
* `external` sets `target="_blank"` unless given, adds `noopener noreferrer`
|
|
2003
|
+
* to `rel`, ends the link with an external icon unless `endIcon` is given,
|
|
2004
|
+
* and, when it opens in a new tab, appends `externalLabel`, required with
|
|
2005
|
+
* `external`, as visually hidden text to its name. `disabled` drops `href`,
|
|
2006
|
+
* and with it `target`, `rel` and the hidden `externalLabel`, so the link
|
|
2007
|
+
* leaves the tab order, keeps it exposed with `role="link"` and
|
|
2008
|
+
* `aria-disabled`, flags it with `data-disabled` and cancels its clicks and
|
|
2009
|
+
* middle clicks without calling `onClick` or `onAuxClick`.
|
|
2010
|
+
*
|
|
2011
|
+
* With `asChild`, it renders its single child instead, an element without
|
|
2012
|
+
* content such as a router link, which carries the destination: the props,
|
|
2013
|
+
* classes, `ref` and handlers of the link are merged onto it, the child's
|
|
2014
|
+
* handlers running first and its own values prevailing for any other prop,
|
|
2015
|
+
* and the label and icons become its content. Its `target` and `rel` are
|
|
2016
|
+
* resolved as those of the link: external, it opens in a new tab unless its
|
|
2017
|
+
* `target` says otherwise, and its `rel` gets `noopener noreferrer`
|
|
2018
|
+
* added. `onClick` runs as given,
|
|
2019
|
+
* without cancelling the navigation of the child; disabled, the child keeps
|
|
2020
|
+
* its `href` and stays focusable, but its clicks and middle clicks are
|
|
2021
|
+
* cancelled, which router links honor.
|
|
2022
|
+
*
|
|
2023
|
+
* The margin props of `Box` space it from its siblings; on an inline link,
|
|
2024
|
+
* only the horizontal ones apply. Every other prop (attributes, events,
|
|
2025
|
+
* `ref`) goes to the `a`, except its
|
|
2026
|
+
* content and the legacy `color` attribute; `className` comes after the
|
|
2027
|
+
* generated classes and `style` is applied as given.
|
|
2028
|
+
*
|
|
2029
|
+
* @param props Label, single child with `asChild`, presentation, icons,
|
|
2030
|
+
* external and disabled states, and native props of the `a`.
|
|
2031
|
+
* @returns The link.
|
|
2032
|
+
* @throws {Error} With `asChild`, when the children are not a single
|
|
2033
|
+
* element, or have content of their own.
|
|
2034
|
+
*/
|
|
2035
|
+
export declare const Link: FC<LinkAsChildProps | LinkProps>;
|
|
2036
|
+
|
|
2037
|
+
/**
|
|
2038
|
+
* Attributes, events and `ref` of the `a` of a `Link`, but the props it
|
|
2039
|
+
* handles itself and the legacy `color` attribute, which `Box` would read
|
|
2040
|
+
* as its text color.
|
|
2041
|
+
*/
|
|
2042
|
+
declare type LinkAnchorAttributes = Readonly<Omit<ComponentPropsWithRef<'a'>, keyof LinkOwnProps | BoxComponentExcludedAttribute>>;
|
|
2043
|
+
|
|
2044
|
+
/**
|
|
2045
|
+
* Props of a `Link` rendering its single child (`asChild`), such as the
|
|
2046
|
+
* link of a router, which renders the `a` and carries the destination: its
|
|
2047
|
+
* own props, `label` included, the margin props of `Box`, then the global
|
|
2048
|
+
* attributes, events and `ref` merged onto the child.
|
|
2049
|
+
*/
|
|
2050
|
+
export declare type LinkAsChildProps = LinkOwnProps & BoxMarginStyleProps & Readonly<{
|
|
2051
|
+
/** Renders the single child, with the props, styles and label of the link merged onto it. */
|
|
2052
|
+
asChild: true;
|
|
2053
|
+
/** Single element without content rendering an `a`, such as a router link, which receives the label and the icons. */
|
|
2054
|
+
children: ReactElement;
|
|
2055
|
+
/** No destination: the child carries it. */
|
|
2056
|
+
href?: never;
|
|
2057
|
+
/** Called on every click as the child's own `onClick`, after it, without cancelling it; never called while disabled. */
|
|
2058
|
+
onClick?: MouseEventHandler<HTMLAnchorElement> | undefined;
|
|
2059
|
+
/** Ref composed with the ref of the child, receiving its element. */
|
|
2060
|
+
ref?: Ref<HTMLAnchorElement> | undefined;
|
|
2061
|
+
}> & Readonly<Omit<HTMLAttributes<HTMLAnchorElement>, keyof LinkOwnProps | BoxComponentExcludedAttribute | 'onClick'>>;
|
|
2062
|
+
|
|
2063
|
+
/**
|
|
2064
|
+
* Attributes, events and `ref` of the `a` of a link, but its content, its
|
|
2065
|
+
* classes and styles, resolved by each link, and the legacy `color`
|
|
2066
|
+
* attribute, which `Box` would read as its text color.
|
|
2067
|
+
*/
|
|
2068
|
+
declare type LinkBaseAnchorAttributes = Readonly<Omit<ComponentPropsWithRef<'a'>, BoxComponentExcludedAttribute | 'className' | 'style'>>;
|
|
2069
|
+
|
|
2070
|
+
/**
|
|
2071
|
+
* External state of a link: an external link requires `externalLabel`, the
|
|
2072
|
+
* visually hidden text announcing its new tab, given in the language of the
|
|
2073
|
+
* page; a link that is not external accepts none.
|
|
2074
|
+
*/
|
|
2075
|
+
declare type LinkBaseExternalProps = Readonly<{
|
|
2076
|
+
/** Opens the destination in a new tab, with `noopener noreferrer` and an external icon. */
|
|
2077
|
+
external: true;
|
|
2078
|
+
/** Hidden text announcing the new tab, added to the name; nothing added when empty. */
|
|
2079
|
+
externalLabel: string;
|
|
2080
|
+
}> | Readonly<{
|
|
2081
|
+
/** Not external; `false` when absent. */
|
|
2082
|
+
external?: false | undefined;
|
|
2083
|
+
/** Not accepted on a link that is not external. */
|
|
2084
|
+
externalLabel?: never;
|
|
2085
|
+
}>;
|
|
2086
|
+
|
|
2087
|
+
/** Props a `Link` handles itself, whether it renders its own anchor or its child. */
|
|
2088
|
+
declare type LinkOwnProps = Readonly<{
|
|
2089
|
+
/** Visible text between the icons, naming the link, or `aria-label` when empty. */
|
|
2090
|
+
label: string;
|
|
2091
|
+
/** Link colors of the theme, a color intent, or the parent's (`inherit`); `default` when absent. */
|
|
2092
|
+
tone?: LinkTone | undefined;
|
|
2093
|
+
/** Underlined always, on hover, press and keyboard focus, or never; `always` when absent. */
|
|
2094
|
+
underline?: LinkUnderline | undefined;
|
|
2095
|
+
/** Font size and line height, 12 to 18px, or the parent's (`inherit`); `md` when absent. */
|
|
2096
|
+
size?: LinkSize | undefined;
|
|
2097
|
+
/** Decorative icon before the label, `1em` high; none when absent. */
|
|
2098
|
+
startIcon?: IconData | undefined;
|
|
2099
|
+
/** Decorative icon after the label, `1em` high; the external icon when external, none otherwise. */
|
|
2100
|
+
endIcon?: IconData | undefined;
|
|
2101
|
+
/** Exposes the link as disabled, without destination, ignoring clicks; `false` when absent. */
|
|
2102
|
+
disabled?: boolean | undefined;
|
|
2103
|
+
/** Classes added after the generated ones. */
|
|
2104
|
+
className?: string | undefined;
|
|
2105
|
+
/** Inline styles of the anchor, as given. */
|
|
2106
|
+
style?: CSSProperties | undefined;
|
|
2107
|
+
}> & LinkBaseExternalProps;
|
|
2108
|
+
|
|
2109
|
+
/**
|
|
2110
|
+
* Props of a `Link` rendering its own `a`: its own props, the margin props
|
|
2111
|
+
* of `Box` and its required `href`, then the attributes, events and `ref` of
|
|
2112
|
+
* the `a`, but its content (`label`) and the legacy `color` attribute.
|
|
2113
|
+
*/
|
|
2114
|
+
export declare type LinkProps = LinkOwnProps & BoxMarginStyleProps & Readonly<{
|
|
2115
|
+
/** Renders the single child instead of an `a` when true; absent or false here. */
|
|
2116
|
+
asChild?: false | undefined;
|
|
2117
|
+
/** Destination of the link, kept for its accessibility, its preview and its context menu even when `onClick` handles the navigation. */
|
|
2118
|
+
href: string;
|
|
2119
|
+
/** Called on a plain click, Enter included, which then never follows `href`; never called on a modified, middle, new tab or download click, left to the browser. */
|
|
2120
|
+
onClick?: MouseEventHandler<HTMLAnchorElement> | undefined;
|
|
2121
|
+
}> & Omit<LinkAnchorAttributes, 'href' | 'onClick'>;
|
|
2122
|
+
|
|
2123
|
+
/**
|
|
2124
|
+
* Size of a `Link`: a size of the scale, from the smallest to the largest,
|
|
2125
|
+
* 12, 14, 16 or 18px from `xs` to `lg`, with the normal line height of the
|
|
2126
|
+
* theme, or `inherit`, the font size and line height of its parent.
|
|
2127
|
+
*/
|
|
2128
|
+
export declare type LinkSize = (typeof linkSizes)[number];
|
|
2129
|
+
|
|
2130
|
+
/**
|
|
2131
|
+
* Sizes a `Link` takes: the sizes of the scale, from the smallest to the
|
|
2132
|
+
* largest, 12, 14, 16 and 18px, `md` being the default, then `inherit`,
|
|
2133
|
+
* which keeps the font size and line height of its parent, so the link
|
|
2134
|
+
* reads inline in a paragraph.
|
|
2135
|
+
*/
|
|
2136
|
+
declare const linkSizes: readonly ["xs", "sm", "md", "lg", "inherit"];
|
|
2137
|
+
|
|
2138
|
+
/**
|
|
2139
|
+
* Tone of a `Link`: `default`, the link colors of the theme, a color intent
|
|
2140
|
+
* of the theme whose text color it takes, of the same name, or `inherit`,
|
|
2141
|
+
* which keeps the text color of its parent.
|
|
2142
|
+
*/
|
|
2143
|
+
export declare type LinkTone = (typeof linkTones)[number];
|
|
2144
|
+
|
|
2145
|
+
/**
|
|
2146
|
+
* Tones a `Link` takes, the first being the default: `default`, the link
|
|
2147
|
+
* colors of the theme (`vars.color.link`), then the tones of the library,
|
|
2148
|
+
* each one naming the color intent of the theme whose text color it takes,
|
|
2149
|
+
* then `inherit`, which keeps the text color of its parent.
|
|
2150
|
+
*/
|
|
2151
|
+
declare const linkTones: readonly ["default", "primary", "secondary", "neutral", "warning", "danger", "success", "info", "inherit"];
|
|
2152
|
+
|
|
2153
|
+
/**
|
|
2154
|
+
* When a `Link` is underlined: always (`always`), only while hovered,
|
|
2155
|
+
* pressed or focused with the keyboard (`hover`), or never (`none`).
|
|
2156
|
+
*/
|
|
2157
|
+
export declare type LinkUnderline = (typeof linkUnderlines)[number];
|
|
2158
|
+
|
|
2159
|
+
/**
|
|
2160
|
+
* When a `Link` is underlined, the first being the default: always, only
|
|
2161
|
+
* while hovered, pressed or focused with the keyboard, or never.
|
|
2162
|
+
*/
|
|
2163
|
+
declare const linkUnderlines: readonly ["always", "hover", "none"];
|
|
2164
|
+
|
|
2165
|
+
export declare const Popover: FC<Readonly<{
|
|
2166
|
+
children?: ReactNode;
|
|
2167
|
+
open?: boolean | undefined;
|
|
2168
|
+
defaultOpen?: boolean | undefined;
|
|
2169
|
+
onOpenChange?: ((open: boolean, eventDetails: PopoverOpenChangeDetails) => void) | undefined;
|
|
2170
|
+
modal?: Popover_2.Root.Props["modal"];
|
|
2171
|
+
}>> & {
|
|
2172
|
+
Close: FC< PopoverCloseProps | PopoverCloseAsChildProps>;
|
|
2173
|
+
Content: FC< PopoverContentProps>;
|
|
2174
|
+
Description: FC< PopoverDescriptionProps | PopoverDescriptionAsChildProps>;
|
|
2175
|
+
Title: FC< PopoverTitleProps | PopoverTitleAsChildProps>;
|
|
2176
|
+
Trigger: FC< PopoverTriggerProps | PopoverTriggerAsChildProps>;
|
|
2177
|
+
};
|
|
2178
|
+
|
|
2179
|
+
/**
|
|
2180
|
+
* Props of a `Popover.Close` rendering its single child (`asChild`), such as
|
|
2181
|
+
* a `Button` or an `IconButton`, which must render a native `button`: the
|
|
2182
|
+
* attributes, events and `ref` of the close button, merged onto the child.
|
|
2183
|
+
*/
|
|
2184
|
+
export declare type PopoverCloseAsChildProps = TriggerBaseAsChildProps;
|
|
2185
|
+
|
|
2186
|
+
/**
|
|
2187
|
+
* Props of a `Popover.Close` rendering its own `button`: its content, then
|
|
2188
|
+
* the attributes, events and `ref` of the `button`.
|
|
2189
|
+
*/
|
|
2190
|
+
export declare type PopoverCloseProps = TriggerBaseProps;
|
|
2191
|
+
|
|
2192
|
+
/** Alignment of a `Popover.Content` along its side of the trigger: its start edge, its center or its end edge. */
|
|
2193
|
+
export declare type PopoverContentAlign = PopupBaseAlign;
|
|
2194
|
+
|
|
2195
|
+
/** Props a `Popover.Content` handles itself, besides those of its floating popup. */
|
|
2196
|
+
declare type PopoverContentOwnProps = Readonly<{
|
|
2197
|
+
/** Content of the popover: a `Popover.Title`, optionally a `Popover.Description`, then free content such as text, fields, buttons or links. */
|
|
2198
|
+
children?: ReactNode;
|
|
2199
|
+
/** Padding around the content, inside the border, a step of the space scale as the `padding` of `Box`; `12` when absent. */
|
|
2200
|
+
padding?: BoxStyleProps['padding'];
|
|
2201
|
+
/** Element focused when the popover opens, given to Base UI: `true` for the default, `false` to leave the focus where it is, a ref, or a function of the interaction (`mouse`, `touch`, `pen`, `keyboard`) returning one of them; when absent, the first focusable element, or the popup without one. */
|
|
2202
|
+
initialFocus?: Popover_2.Popup.Props['initialFocus'];
|
|
2203
|
+
/** Element focused when the popover closes, given to Base UI: `true` for the trigger, `false` to leave the focus where it is, a ref, or a function of the interaction returning one of them; the trigger when absent. */
|
|
2204
|
+
finalFocus?: Popover_2.Popup.Props['finalFocus'];
|
|
2205
|
+
}>;
|
|
2206
|
+
|
|
2207
|
+
/**
|
|
2208
|
+
* Props of a `Popover.Content`: its content, padding and focus targets,
|
|
2209
|
+
* its arrow, its placement (`side`, `align`, `alignOffset`, `sideOffset`,
|
|
2210
|
+
* `collisionPadding`), its portal `container` and the sizing props of
|
|
2211
|
+
* `Box`, then the attributes, events and `ref` of its popup, a `div` with
|
|
2212
|
+
* the `dialog` role, named by its `Popover.Title` or else by `aria-label`,
|
|
2213
|
+
* but its content and the legacy `color` attribute.
|
|
2214
|
+
*/
|
|
2215
|
+
export declare type PopoverContentProps = PopoverContentOwnProps & PopupBaseProps;
|
|
2216
|
+
|
|
2217
|
+
/**
|
|
2218
|
+
* Side of the trigger a `Popover.Content` is placed against: below it
|
|
2219
|
+
* (`bottom`), above it (`top`), on its left (`left` or `inline-start`) or
|
|
2220
|
+
* on its right (`right` or `inline-end`). The popover moves to the opposite
|
|
2221
|
+
* side when it lacks room.
|
|
2222
|
+
*/
|
|
2223
|
+
export declare type PopoverContentSide = PopupBaseSide;
|
|
2224
|
+
|
|
2225
|
+
/**
|
|
2226
|
+
* Props of a `Popover.Description` rendering its single child (`asChild`):
|
|
2227
|
+
* the attributes, events and `ref` of the description, merged onto the
|
|
2228
|
+
* child.
|
|
2229
|
+
*/
|
|
2230
|
+
export declare type PopoverDescriptionAsChildProps = PopoverDescriptionElementProps & Readonly<{
|
|
2231
|
+
/** Renders the single child, with the props of the description merged onto it. */
|
|
2232
|
+
asChild: true;
|
|
2233
|
+
/** Single element rendered as the description; its text describes the popover. */
|
|
2234
|
+
children: ReactElement;
|
|
2235
|
+
}>;
|
|
2236
|
+
|
|
2237
|
+
/**
|
|
2238
|
+
* Attributes, events and `ref` of the paragraph a `Popover.Description`
|
|
2239
|
+
* renders or merges onto its child, but its content.
|
|
2240
|
+
*/
|
|
2241
|
+
declare type PopoverDescriptionElementProps = Readonly<Omit<ComponentPropsWithRef<'p'>, 'children'>>;
|
|
2242
|
+
|
|
2243
|
+
/**
|
|
2244
|
+
* Props of a `Popover.Description` rendering its own `p`: its text, then
|
|
2245
|
+
* the attributes, events and `ref` of the paragraph.
|
|
2246
|
+
*/
|
|
2247
|
+
export declare type PopoverDescriptionProps = PopoverDescriptionElementProps & Readonly<{
|
|
2248
|
+
/** Renders the single child instead of a `p` when true; absent or false here. */
|
|
2249
|
+
asChild?: false | undefined;
|
|
2250
|
+
/** Text of the paragraph, which describes the popover. */
|
|
2251
|
+
children?: ReactNode;
|
|
2252
|
+
}>;
|
|
2253
|
+
|
|
2254
|
+
/**
|
|
2255
|
+
* Details of an open state change of a `Popover`, given by Base UI as the
|
|
2256
|
+
* second argument of `onOpenChange`: the cause of the change (`reason`,
|
|
2257
|
+
* such as `trigger-press`, `escape-key`, `outside-press` or `focus-out`),
|
|
2258
|
+
* the native `event` behind it, the `trigger` element, and `cancel()`,
|
|
2259
|
+
* which keeps the current state, the popover staying open or closed, with
|
|
2260
|
+
* `isCanceled` telling whether it was called. Those of the `Popover` of
|
|
2261
|
+
* Base UI 1.9, passed as they are.
|
|
2262
|
+
*/
|
|
2263
|
+
export declare type PopoverOpenChangeDetails = Popover_2.Root.ChangeEventDetails;
|
|
2264
|
+
|
|
2265
|
+
/** Props of a `Popover`, which renders no element of its own. */
|
|
2266
|
+
export declare type PopoverProps = Readonly<{
|
|
2267
|
+
/** Parts of the popover: a `Popover.Trigger`, then a `Popover.Content` holding a `Popover.Title`, optionally a `Popover.Description`, its content and optionally a `Popover.Close`. */
|
|
2268
|
+
children?: ReactNode;
|
|
2269
|
+
/** Controlled open state; keep it always defined or absent, with `onOpenChange`. */
|
|
2270
|
+
open?: boolean | undefined;
|
|
2271
|
+
/** Initial open state of an uncontrolled popover; `false` when absent. */
|
|
2272
|
+
defaultOpen?: boolean | undefined;
|
|
2273
|
+
/** Called with the requested open state and the details of the change, whose `cancel()` keeps the current state, when the popover opens or closes, whatever the cause. */
|
|
2274
|
+
onOpenChange?: ((open: boolean, eventDetails: PopoverOpenChangeDetails) => void) | undefined;
|
|
2275
|
+
/** Modality of the open popover: `false`, the default as in Base UI, keeps the page usable; `true` locks the page scroll and blocks outside pointer interactions; `'trap-focus'` keeps the page scrollable and clickable. `true` and `'trap-focus'` trap the focus inside, Tab looping in it, only while a `Popover.Close` is rendered in the content. */
|
|
2276
|
+
modal?: Popover_2.Root.Props['modal'];
|
|
2277
|
+
}>;
|
|
2278
|
+
|
|
2279
|
+
/**
|
|
2280
|
+
* Props of a `Popover.Title` rendering its single child (`asChild`), such as
|
|
2281
|
+
* a heading of another level: the attributes, events and `ref` of the
|
|
2282
|
+
* title, merged onto the child.
|
|
2283
|
+
*/
|
|
2284
|
+
export declare type PopoverTitleAsChildProps = PopoverTitleElementProps & Readonly<{
|
|
2285
|
+
/** Renders the single child, with the props of the title merged onto it. */
|
|
2286
|
+
asChild: true;
|
|
2287
|
+
/** Single element, such as an `h3`, rendered as the title; its text names the popover. */
|
|
2288
|
+
children: ReactElement;
|
|
2289
|
+
}>;
|
|
2290
|
+
|
|
2291
|
+
/**
|
|
2292
|
+
* Attributes, events and `ref` of the heading a `Popover.Title` renders or
|
|
2293
|
+
* merges onto its child, but its content.
|
|
2294
|
+
*/
|
|
2295
|
+
declare type PopoverTitleElementProps = Readonly<Omit<ComponentPropsWithRef<'h2'>, 'children'>>;
|
|
2296
|
+
|
|
2297
|
+
/**
|
|
2298
|
+
* Props of a `Popover.Title` rendering its own `h2`: its text, then the
|
|
2299
|
+
* attributes, events and `ref` of the heading.
|
|
2300
|
+
*/
|
|
2301
|
+
export declare type PopoverTitleProps = PopoverTitleElementProps & Readonly<{
|
|
2302
|
+
/** Renders the single child instead of an `h2` when true; absent or false here. */
|
|
2303
|
+
asChild?: false | undefined;
|
|
2304
|
+
/** Text of the heading, which names the popover. */
|
|
2305
|
+
children?: ReactNode;
|
|
2306
|
+
}>;
|
|
2307
|
+
|
|
2308
|
+
/**
|
|
2309
|
+
* Props of a `Popover.Trigger` rendering its single child (`asChild`), such
|
|
2310
|
+
* as a `Button`, which must render a native `button`: the attributes,
|
|
2311
|
+
* events and `ref` of the trigger, merged onto the child.
|
|
2312
|
+
*/
|
|
2313
|
+
export declare type PopoverTriggerAsChildProps = TriggerBaseAsChildProps;
|
|
2314
|
+
|
|
2315
|
+
/**
|
|
2316
|
+
* Props of a `Popover.Trigger` rendering its own `button`: its content, then
|
|
2317
|
+
* the attributes, events and `ref` of the `button`.
|
|
2318
|
+
*/
|
|
2319
|
+
export declare type PopoverTriggerProps = TriggerBaseProps;
|
|
2320
|
+
|
|
2321
|
+
/** Alignment of a floating popup along its side of the trigger: its start edge, its center or its end edge. */
|
|
2322
|
+
declare type PopupBaseAlign = (typeof popupBaseAligns)[number];
|
|
2323
|
+
|
|
2324
|
+
/**
|
|
2325
|
+
* Alignments of a floating popup along its side of the trigger, the first
|
|
2326
|
+
* being the default: on its start edge, centered, or on its end edge.
|
|
2327
|
+
*/
|
|
2328
|
+
declare const popupBaseAligns: readonly ["start", "center", "end"];
|
|
2329
|
+
|
|
2330
|
+
/** Name of a sizing prop of `Box` a floating popup accepts. */
|
|
2331
|
+
declare type PopupBaseBoxStylePropName = (typeof popupBaseBoxStylePropNames)[number];
|
|
2332
|
+
|
|
2333
|
+
/**
|
|
2334
|
+
* Sizing props of `Box` a popup accepts, floating or not, such as a
|
|
2335
|
+
* `Popover.Content` or a `Dialog.Content`, which take any CSS value, a
|
|
2336
|
+
* number being a length in pixels.
|
|
2337
|
+
*/
|
|
2338
|
+
declare const popupBaseBoxStylePropNames: readonly ["height", "maxHeight", "maxWidth", "minHeight", "minWidth", "width"];
|
|
2339
|
+
|
|
2340
|
+
/**
|
|
2341
|
+
* Sizing props of `Box` a floating popup accepts, applied to it as `Box`
|
|
2342
|
+
* applies them: `width`, `height` and their `min` and `max` bounds, which
|
|
2343
|
+
* take any CSS value, a number being a length in pixels. Its `minWidth` is
|
|
2344
|
+
* the width of the trigger, but at least `12rem` (192px), and its
|
|
2345
|
+
* `maxWidth` and `maxHeight` the space left in the viewport, unless given.
|
|
2346
|
+
*/
|
|
2347
|
+
declare type PopupBaseBoxStyleProps = Pick<BoxStyleProps, PopupBaseBoxStylePropName>;
|
|
2348
|
+
|
|
2349
|
+
/** Placement, portal and presentation props a floating popup handles itself. */
|
|
2350
|
+
declare type PopupBaseOwnProps = Readonly<{
|
|
2351
|
+
/** Whether an arrow points from the popup to the trigger, the popup then casting a `drop-shadow` that follows the arrow and standing further from the trigger by default; `false` when absent. */
|
|
2352
|
+
arrow?: boolean | undefined;
|
|
2353
|
+
/** Side of the trigger the popup is placed against; `bottom` when absent. */
|
|
2354
|
+
side?: PopupBaseSide | undefined;
|
|
2355
|
+
/** Alignment of the popup along its side of the trigger; `start` when absent. */
|
|
2356
|
+
align?: PopupBaseAlign | undefined;
|
|
2357
|
+
/** Shift of the popup along its side of the trigger, in pixels, from the alignment; `0` when absent. */
|
|
2358
|
+
alignOffset?: number | undefined;
|
|
2359
|
+
/** Distance between the trigger and the popup, in pixels; `4` when absent, `10` with an arrow, whose tip then stands 4 pixels away. */
|
|
2360
|
+
sideOffset?: number | undefined;
|
|
2361
|
+
/** Space kept between the popup and the edges of the viewport when it is moved to stay in it, in pixels, one number or one per side (`top`, `right`, `bottom`, `left`); `5` when absent, as in Base UI. */
|
|
2362
|
+
collisionPadding?: Menu.Positioner.Props['collisionPadding'];
|
|
2363
|
+
/** Element, shadow root or ref to one the popup is rendered into, in a portal; the `body` when absent. */
|
|
2364
|
+
container?: Menu.Portal.Props['container'];
|
|
2365
|
+
/** Classes added after the generated ones, on the popup. */
|
|
2366
|
+
className?: string | undefined;
|
|
2367
|
+
/** Inline styles of the popup. */
|
|
2368
|
+
style?: CSSProperties | undefined;
|
|
2369
|
+
}>;
|
|
2370
|
+
|
|
2371
|
+
/**
|
|
2372
|
+
* Props of a floating popup but its content: its own props and the sizing
|
|
2373
|
+
* props of `Box`, then the attributes, events and `ref` of the popup, a
|
|
2374
|
+
* `div`, but its content and the legacy `color` attribute.
|
|
2375
|
+
*/
|
|
2376
|
+
declare type PopupBaseProps = PopupBaseOwnProps & PopupBaseBoxStyleProps & Readonly<Omit<ComponentPropsWithRef<'div'>, keyof PopupBaseOwnProps | keyof PopupBaseBoxStyleProps | BoxComponentExcludedAttribute>>;
|
|
2377
|
+
|
|
2378
|
+
/**
|
|
2379
|
+
* Side of the trigger a floating popup is placed against: below it
|
|
2380
|
+
* (`bottom`), above it (`top`), on its left (`left` or `inline-start`) or
|
|
2381
|
+
* on its right (`right` or `inline-end`). The popup moves to the opposite
|
|
2382
|
+
* side when it lacks room.
|
|
2383
|
+
*/
|
|
2384
|
+
declare type PopupBaseSide = (typeof popupBaseSides)[number];
|
|
2385
|
+
|
|
2386
|
+
/**
|
|
2387
|
+
* Sides of the trigger a floating popup of the overlays, such as a
|
|
2388
|
+
* `DropdownMenu.Content` or a `Popover.Content`, is placed against, the
|
|
2389
|
+
* first being the default: below it, above it, on its left (`left` or
|
|
2390
|
+
* `inline-start`) or on its right (`right` or `inline-end`).
|
|
2391
|
+
*/
|
|
2392
|
+
declare const popupBaseSides: readonly ["bottom", "top", "left", "right", "inline-start", "inline-end"];
|
|
2393
|
+
|
|
2394
|
+
/**
|
|
2395
|
+
* Scrolls its content inside a bounded area, built on the `ScrollArea` of
|
|
2396
|
+
* Base UI, with scrollbars of its own in place of the native ones, which it
|
|
2397
|
+
* hides: thin, overlaid on the content rather than taking room beside it,
|
|
2398
|
+
* with a rounded thumb kept clear of the edges, in the scrollbar colors of
|
|
2399
|
+
* the theme. A scrollbar shows only along an axis whose content overflows,
|
|
2400
|
+
* vertical or horizontal, and only while the pointer is over the area,
|
|
2401
|
+
* while it scrolls or while its viewport has the keyboard focus, fading in
|
|
2402
|
+
* and out unless reduced motion is preferred; in forced colors, the thumb
|
|
2403
|
+
* takes the system text color. Dragging the thumb or clicking the track
|
|
2404
|
+
* scrolls too; the wheel, touch and keyboard scroll the viewport natively.
|
|
2405
|
+
*
|
|
2406
|
+
* The sizing props of `Box` size its root as `Box` does: bound its height
|
|
2407
|
+
* (`height` or `maxHeight`) or its width for the content to scroll;
|
|
2408
|
+
* without a bound, the area grows with its content. Its margin props space
|
|
2409
|
+
* the root from its siblings. `className` comes after the generated classes
|
|
2410
|
+
* of the root and `style` after its variables.
|
|
2411
|
+
*
|
|
2412
|
+
* Every other prop (attributes, events, `ref`) goes to the viewport, the
|
|
2413
|
+
* `div` that scrolls: a `ref` reaches it to scroll from code, `onScroll`
|
|
2414
|
+
* follows its position. While its content overflows, Base UI puts the
|
|
2415
|
+
* viewport in the tab order (`tabIndex={0}`), so keyboard users can scroll
|
|
2416
|
+
* it with the arrow keys; give it a name when the content does not speak
|
|
2417
|
+
* for itself, such as `role="region"` with an `aria-label`. Its styles sit
|
|
2418
|
+
* in the `cv.components` cascade layers: unlayered styles of the consumer
|
|
2419
|
+
* override them.
|
|
2420
|
+
*
|
|
2421
|
+
* @param props Content, sizing and margin props of the root, and native
|
|
2422
|
+
* props of the viewport.
|
|
2423
|
+
* @param props.children Content scrolled inside the area.
|
|
2424
|
+
* @param props.className Classes added after the generated ones, on the
|
|
2425
|
+
* root.
|
|
2426
|
+
* @param props.style Inline styles of the root.
|
|
2427
|
+
* @returns The area, its viewport and its scrollbars.
|
|
2428
|
+
*/
|
|
2429
|
+
export declare const ScrollArea: FC<ScrollAreaProps>;
|
|
2430
|
+
|
|
2431
|
+
/** Name of a style prop of `Box` a `ScrollArea` accepts. */
|
|
2432
|
+
declare type ScrollAreaBoxStylePropName = (typeof scrollAreaBoxStylePropNames)[number];
|
|
2433
|
+
|
|
2434
|
+
/**
|
|
2435
|
+
* Style props of `Box` a `ScrollArea` accepts on its root: the sizing props,
|
|
2436
|
+
* which take any CSS value, a number being a length in pixels, and the
|
|
2437
|
+
* margin props. Single source of the `ScrollAreaBoxStyleProps` type, in
|
|
2438
|
+
* alphabetical order.
|
|
2439
|
+
*/
|
|
2440
|
+
declare const scrollAreaBoxStylePropNames: readonly ["height", "margin", "marginBottom", "marginLeft", "marginRight", "marginTop", "marginX", "marginY", "maxHeight", "maxWidth", "minHeight", "minWidth", "width"];
|
|
2441
|
+
|
|
2442
|
+
/**
|
|
2443
|
+
* Style props of `Box` a `ScrollArea` accepts, applied to its root as `Box`
|
|
2444
|
+
* applies them: `width`, `height` and their `min` and `max` bounds, which
|
|
2445
|
+
* take any CSS value, a number being a length in pixels, and the margin
|
|
2446
|
+
* props, steps of the space scale or `auto`. Without a bounded height or
|
|
2447
|
+
* width, the area grows with its content and never scrolls.
|
|
2448
|
+
*/
|
|
2449
|
+
declare type ScrollAreaBoxStyleProps = Pick<BoxStyleProps, ScrollAreaBoxStylePropName>;
|
|
2450
|
+
|
|
2451
|
+
/**
|
|
2452
|
+
* Native attributes a `ScrollArea` does not accept: it renders its content
|
|
2453
|
+
* inside its own parts, and `color`, a legacy attribute, has no meaning on
|
|
2454
|
+
* the viewport.
|
|
2455
|
+
*/
|
|
2456
|
+
declare type ScrollAreaExcludedAttribute = 'children' | 'color' | 'dangerouslySetInnerHTML';
|
|
2457
|
+
|
|
2458
|
+
/** Props a `ScrollArea` handles itself. */
|
|
2459
|
+
declare type ScrollAreaOwnProps = Readonly<{
|
|
2460
|
+
/** Content scrolled inside the area. */
|
|
2461
|
+
children?: ReactNode;
|
|
2462
|
+
/** Classes added after the generated ones, on the root. */
|
|
2463
|
+
className?: string | undefined;
|
|
2464
|
+
/** Inline styles of the root, merged after the sizing variables, so they prevail. */
|
|
2465
|
+
style?: CSSProperties | undefined;
|
|
2466
|
+
}>;
|
|
2467
|
+
|
|
2468
|
+
/**
|
|
2469
|
+
* Props of a `ScrollArea`: its own props and the sizing and margin props of
|
|
2470
|
+
* `Box`, applied to its root, then the attributes, events and `ref` of its
|
|
2471
|
+
* viewport, the `div` that scrolls.
|
|
2472
|
+
*/
|
|
2473
|
+
export declare type ScrollAreaProps = ScrollAreaOwnProps & ScrollAreaBoxStyleProps & Readonly<Omit<ComponentPropsWithRef<'div'>, keyof ScrollAreaOwnProps | keyof ScrollAreaBoxStyleProps | ScrollAreaExcludedAttribute>>;
|
|
2474
|
+
|
|
2475
|
+
/**
|
|
2476
|
+
* Stands in for content still loading with a placeholder of its shape,
|
|
2477
|
+
* filled with the skeleton color of the theme, which darkens the surface
|
|
2478
|
+
* beneath. It is a `Box` rendering an empty `span`, displayed as a block.
|
|
2479
|
+
*
|
|
2480
|
+
* `shape` sets its default size and corners: `text`, the default, is a
|
|
2481
|
+
* line one font size high (`1em`) spanning its container; `rectangular` a
|
|
2482
|
+
* block `6rem` high spanning its container; `circular` a circle `2.5rem`
|
|
2483
|
+
* wide whose height follows its `width`. The sizing props of `Box`
|
|
2484
|
+
* (`width`, `height`...) replace them with any CSS value, a number being a
|
|
2485
|
+
* length in pixels, and its margin props, space tokens, space it.
|
|
2486
|
+
*
|
|
2487
|
+
* `animation` sets its motion: `shimmer`, the default, sweeps the highlight
|
|
2488
|
+
* across it; `pulse` alternates the fill with its highlight; `none` keeps it
|
|
2489
|
+
* still. No animation runs when the user prefers reduced motion.
|
|
2490
|
+
*
|
|
2491
|
+
* It is always hidden from assistive technologies (`aria-hidden="true"`,
|
|
2492
|
+
* whatever the props): set `aria-busy="true"` on the container it fills,
|
|
2493
|
+
* with an accessible name when it is a region, then `aria-busy="false"`
|
|
2494
|
+
* once the content replaces the skeletons; announce the end of a long
|
|
2495
|
+
* loading with a status message if needed. Every other prop (attributes,
|
|
2496
|
+
* events, `ref`) is forwarded to the `span`; `className` comes after the
|
|
2497
|
+
* generated classes and `style` after the generated variables. Its styles
|
|
2498
|
+
* sit in the `cv.components` cascade layers: unlayered styles of the
|
|
2499
|
+
* consumer override them. There is no `as` nor `asChild`: a skeleton has no
|
|
2500
|
+
* content and no semantics a tag or a child could provide.
|
|
2501
|
+
*
|
|
2502
|
+
* @param props Shape, animation, margin and sizing props, and native props
|
|
2503
|
+
* of the `span`.
|
|
2504
|
+
* @returns The placeholder.
|
|
2505
|
+
*/
|
|
2506
|
+
export declare const Skeleton: FC<SkeletonProps>;
|
|
2507
|
+
|
|
2508
|
+
/**
|
|
2509
|
+
* Animation of a `Skeleton`: a highlight sweeps across it (`shimmer`), its
|
|
2510
|
+
* fill pulses (`pulse`), or it stays still (`none`).
|
|
2511
|
+
*/
|
|
2512
|
+
export declare type SkeletonAnimation = (typeof skeletonAnimations)[number];
|
|
2513
|
+
|
|
2514
|
+
/**
|
|
2515
|
+
* Animations a `Skeleton` plays, the first being the default: a highlight
|
|
2516
|
+
* sweeping across it, a pulse of its fill, or none.
|
|
2517
|
+
*/
|
|
2518
|
+
declare const skeletonAnimations: readonly ["shimmer", "pulse", "none"];
|
|
2519
|
+
|
|
2520
|
+
/** Name of a style prop of `Box` a `Skeleton` accepts. */
|
|
2521
|
+
declare type SkeletonBoxStylePropName = (typeof skeletonBoxStylePropNames)[number];
|
|
2522
|
+
|
|
2523
|
+
/**
|
|
2524
|
+
* Style props of `Box` a `Skeleton` accepts and forwards to its `span`, as
|
|
2525
|
+
* `Box` types and applies them: the margin props, shorthands included, and
|
|
2526
|
+
* the sizing props. Single source of the `SkeletonBoxStyleProps` type, in
|
|
2527
|
+
* alphabetical order.
|
|
2528
|
+
*/
|
|
2529
|
+
declare const skeletonBoxStylePropNames: readonly ["height", "margin", "marginBottom", "marginLeft", "marginRight", "marginTop", "marginX", "marginY", "maxHeight", "maxWidth", "minHeight", "minWidth", "width"];
|
|
2530
|
+
|
|
2531
|
+
/**
|
|
2532
|
+
* Style props of `Box` a `Skeleton` accepts, applied as `Box` applies them:
|
|
2533
|
+
* the margin props, shorthands included, which take space tokens of the
|
|
2534
|
+
* theme, and the sizing props, which take any CSS value, a number being a
|
|
2535
|
+
* length in pixels. `width` and `height` replace those of the shape.
|
|
2536
|
+
*/
|
|
2537
|
+
declare type SkeletonBoxStyleProps = Pick<BoxStyleProps, SkeletonBoxStylePropName>;
|
|
2538
|
+
|
|
2539
|
+
/**
|
|
2540
|
+
* Native attributes a `Skeleton` does not accept: it is always hidden from
|
|
2541
|
+
* assistive technologies, renders no content, and `color`, a legacy
|
|
2542
|
+
* attribute, would be read by `Box` as its text color.
|
|
2543
|
+
*/
|
|
2544
|
+
declare type SkeletonExcludedAttribute = 'aria-hidden' | 'children' | 'color' | 'dangerouslySetInnerHTML';
|
|
2545
|
+
|
|
2546
|
+
/** Props a `Skeleton` handles itself. */
|
|
2547
|
+
declare type SkeletonOwnProps = Readonly<{
|
|
2548
|
+
/** Shape of the placeholder, which sets its default size and corners; `text` when absent. */
|
|
2549
|
+
shape?: SkeletonShape | undefined;
|
|
2550
|
+
/** Animation of the placeholder, still when reduced motion is preferred; `shimmer` when absent. */
|
|
2551
|
+
animation?: SkeletonAnimation | undefined;
|
|
2552
|
+
/** Classes added after the generated ones. */
|
|
2553
|
+
className?: string | undefined;
|
|
2554
|
+
/** Inline styles, merged after the generated variables, so they prevail. */
|
|
2555
|
+
style?: CSSProperties | undefined;
|
|
2556
|
+
}>;
|
|
2557
|
+
|
|
2558
|
+
/**
|
|
2559
|
+
* Props of a `Skeleton`: its own props and the margin and sizing props of
|
|
2560
|
+
* `Box`, then the attributes, events and `ref` of the rendered `span`.
|
|
2561
|
+
*/
|
|
2562
|
+
export declare type SkeletonProps = SkeletonOwnProps & SkeletonBoxStyleProps & Readonly<Omit<ComponentPropsWithRef<'span'>, keyof SkeletonOwnProps | keyof SkeletonBoxStyleProps | SkeletonExcludedAttribute>>;
|
|
2563
|
+
|
|
2564
|
+
/**
|
|
2565
|
+
* Shape of a `Skeleton`: a line of text (`text`), a block such as a picture
|
|
2566
|
+
* or a card (`rectangular`), or a circle such as an avatar (`circular`).
|
|
2567
|
+
*/
|
|
2568
|
+
export declare type SkeletonShape = (typeof skeletonShapes)[number];
|
|
2569
|
+
|
|
2570
|
+
/**
|
|
2571
|
+
* Shapes a `Skeleton` takes, the first being the default: a line of text, a
|
|
2572
|
+
* block such as a picture or a card, or a circle such as an avatar.
|
|
2573
|
+
*/
|
|
2574
|
+
declare const skeletonShapes: readonly ["text", "rectangular", "circular"];
|
|
2575
|
+
|
|
2576
|
+
/**
|
|
2577
|
+
* Renders a loading indicator in an inline `span`: a ring of the current
|
|
2578
|
+
* color, open on a quarter, `1em` wide and high, turning, or fading in place
|
|
2579
|
+
* when reduced motion is preferred.
|
|
2580
|
+
*
|
|
2581
|
+
* `size` sets its font size to a font size token of the theme, as the
|
|
2582
|
+
* `size` of `Icon`; without it, it follows the font size it inherits.
|
|
2583
|
+
* `tone` draws it with the text color of a color intent of the theme;
|
|
2584
|
+
* without it, it takes the text color it inherits. In forced colors, it
|
|
2585
|
+
* takes the system text color.
|
|
2586
|
+
*
|
|
2587
|
+
* With a non-empty `label`, it is a `status` holding the label as visually
|
|
2588
|
+
* hidden text, for a spinner standing alone. A status mounted with its text
|
|
2589
|
+
* may not be announced by every screen reader: for a loading that must be
|
|
2590
|
+
* heard, keep the spinner rendered and change its label, or announce it
|
|
2591
|
+
* elsewhere. Without a label, it is decorative (`aria-hidden="true"`), for
|
|
2592
|
+
* a spinner next to a text or inside a control that tells the loading.
|
|
2593
|
+
*
|
|
2594
|
+
* The margin props of `Box` space it from its siblings. Every other prop
|
|
2595
|
+
* (attributes, events, `ref`) is forwarded to the `span`; `className` comes
|
|
2596
|
+
* after the generated classes. Its styles sit in the
|
|
2597
|
+
* `cv.components` cascade layers, below any unlayered style of the consumer.
|
|
2598
|
+
*
|
|
2599
|
+
* @param props Size, tone, label, margin props and native props of the
|
|
2600
|
+
* `span`.
|
|
2601
|
+
* @param props.label Hidden text naming what is loading; decorative when
|
|
2602
|
+
* absent or empty.
|
|
2603
|
+
* @returns The spinner.
|
|
2604
|
+
*/
|
|
2605
|
+
export declare const Spinner: FC<SpinnerProps>;
|
|
2606
|
+
|
|
2607
|
+
/**
|
|
2608
|
+
* Native attributes a `Spinner` does not accept: it sets its role and its
|
|
2609
|
+
* hidden state from `label`, and renders no other content.
|
|
2610
|
+
*/
|
|
2611
|
+
declare type SpinnerExcludedAttribute = 'aria-hidden' | 'children' | 'color' | 'dangerouslySetInnerHTML' | 'role';
|
|
2612
|
+
|
|
2613
|
+
/** Props a `Spinner` handles itself. */
|
|
2614
|
+
declare type SpinnerOwnProps = Readonly<{
|
|
2615
|
+
/** Font size token the `1em` size of the spinner follows; inherited when absent. */
|
|
2616
|
+
size?: SpinnerSize | undefined;
|
|
2617
|
+
/** Color intent whose text color the spinner draws with; the inherited text color when absent. */
|
|
2618
|
+
tone?: SpinnerTone | undefined;
|
|
2619
|
+
/** Visually hidden text naming what is loading, which makes the spinner a status; decorative when absent or empty. */
|
|
2620
|
+
label?: string | undefined;
|
|
2621
|
+
/** Classes added after the generated ones. */
|
|
2622
|
+
className?: string | undefined;
|
|
2623
|
+
/** Inline styles of the `span`, as given. */
|
|
2624
|
+
style?: CSSProperties | undefined;
|
|
2625
|
+
}>;
|
|
2626
|
+
|
|
2627
|
+
/**
|
|
2628
|
+
* Props of a `Spinner`: its own props, the margin props of `Box`, then the
|
|
2629
|
+
* attributes, events and `ref` of the rendered `span`, but the legacy
|
|
2630
|
+
* `color` attribute, which `Box` would read as its text color.
|
|
2631
|
+
*/
|
|
2632
|
+
export declare type SpinnerProps = SpinnerOwnProps & BoxMarginStyleProps & Readonly<Omit<ComponentPropsWithRef<'span'>, keyof SpinnerOwnProps | SpinnerExcludedAttribute>>;
|
|
2633
|
+
|
|
2634
|
+
/**
|
|
2635
|
+
* Size of a `Spinner`: a font size token of the theme, such as `24` for
|
|
2636
|
+
* `1.5rem`, as the `size` of an `Icon`. The spinner is `1em` wide and high,
|
|
2637
|
+
* so the font size it sets sizes it.
|
|
2638
|
+
*/
|
|
2639
|
+
export declare type SpinnerSize = IconSize;
|
|
2640
|
+
|
|
2641
|
+
/**
|
|
2642
|
+
* Tone of a `Spinner`: the color intent of the theme whose text color it
|
|
2643
|
+
* draws with, of the same name.
|
|
2644
|
+
*/
|
|
2645
|
+
export declare type SpinnerTone = (typeof tones)[number];
|
|
2646
|
+
|
|
2647
|
+
export declare const Table: FC<TableProps> & {
|
|
2648
|
+
Body: FC< DetailedHTMLProps<HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>>;
|
|
2649
|
+
Caption: FC< TableCaptionProps>;
|
|
2650
|
+
Cell: FC< TableCellProps>;
|
|
2651
|
+
Column: FC< TableColumnProps>;
|
|
2652
|
+
ColumnGroup: FC< DetailedHTMLProps<ColgroupHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>>;
|
|
2653
|
+
Empty: FC< TableEmptyProps>;
|
|
2654
|
+
Footer: FC< DetailedHTMLProps<HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>>;
|
|
2655
|
+
Header: FC< DetailedHTMLProps<HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>>;
|
|
2656
|
+
HeaderCell: FC< TableHeaderCellProps>;
|
|
2657
|
+
Row: FC< TableRowProps>;
|
|
2658
|
+
ScrollContainer: FC< TableScrollContainerProps>;
|
|
2659
|
+
SortButton: FC< TableSortButtonProps>;
|
|
2660
|
+
};
|
|
2661
|
+
|
|
2662
|
+
/**
|
|
2663
|
+
* Props of a `Table.Body`: the native props of the `tbody` element, `ref`
|
|
2664
|
+
* included.
|
|
2665
|
+
*/
|
|
2666
|
+
export declare type TableBodyProps = ComponentPropsWithRef<'tbody'>;
|
|
2667
|
+
|
|
2668
|
+
/**
|
|
2669
|
+
* Props of a `Table.Caption`: its side and the native props of the
|
|
2670
|
+
* `caption` element, `ref` included, but the legacy `color` attribute,
|
|
2671
|
+
* which `Typography` would read as its text color.
|
|
2672
|
+
*/
|
|
2673
|
+
export declare type TableCaptionProps = Omit<ComponentPropsWithRef<'caption'>, 'color'> & Readonly<{
|
|
2674
|
+
/** Side of the table the caption is shown on, as the CSS `caption-side`; `top` when absent. */
|
|
2675
|
+
captionSide?: TableCaptionSide | undefined;
|
|
2676
|
+
}>;
|
|
2677
|
+
|
|
2678
|
+
/**
|
|
2679
|
+
* Side a `Table.Caption` is shown on, as the CSS `caption-side`: above the
|
|
2680
|
+
* table (`top`) or below it (`bottom`). Its accessible name is the same on
|
|
2681
|
+
* either side.
|
|
2682
|
+
*/
|
|
2683
|
+
export declare type TableCaptionSide = (typeof tableCaptionSides)[number];
|
|
2684
|
+
|
|
2685
|
+
/**
|
|
2686
|
+
* Sides a `Table.Caption` is shown on, those of the CSS `caption-side`,
|
|
2687
|
+
* the first being the default: above the table or below it.
|
|
2688
|
+
*/
|
|
2689
|
+
declare const tableCaptionSides: readonly ["top", "bottom"];
|
|
2690
|
+
|
|
2691
|
+
/**
|
|
2692
|
+
* Legacy presentational attributes the cells of a `Table` do not accept:
|
|
2693
|
+
* `align`, `valign`, `width` and `height`, which `textAlign`, their styles
|
|
2694
|
+
* and `Table.Column` replace. Those of a `td`, a `th` having only `align`.
|
|
2695
|
+
*/
|
|
2696
|
+
declare type TableCellExcludedAttribute = 'align' | 'height' | 'valign' | 'width';
|
|
2697
|
+
|
|
2698
|
+
/**
|
|
2699
|
+
* Props of a `Table.Cell`: its alignment and the native props of the `td`
|
|
2700
|
+
* element, `ref`, `colSpan`, `rowSpan` and `headers` included, but its
|
|
2701
|
+
* legacy presentational attributes and the `abbr` and `scope` obsolete on a
|
|
2702
|
+
* `td`, which a `Table.HeaderCell` takes.
|
|
2703
|
+
*/
|
|
2704
|
+
export declare type TableCellProps = Omit<ComponentPropsWithRef<'td'>, TableCellExcludedAttribute | 'abbr' | 'scope'> & Readonly<{
|
|
2705
|
+
/** Horizontal alignment of the content, `end` suiting numbers; `start` when absent. */
|
|
2706
|
+
textAlign?: TableTextAlign | undefined;
|
|
2707
|
+
}>;
|
|
2708
|
+
|
|
2709
|
+
/**
|
|
2710
|
+
* Props of a `Table.ColumnGroup`: the native props of the `colgroup`
|
|
2711
|
+
* element, `ref` and `span` included.
|
|
2712
|
+
*/
|
|
2713
|
+
export declare type TableColumnGroupProps = ComponentPropsWithRef<'colgroup'>;
|
|
2714
|
+
|
|
2715
|
+
/**
|
|
2716
|
+
* Props of a `Table.Column`: the native props of the `col` element, `ref`
|
|
2717
|
+
* and `span` included, without `children` nor `dangerouslySetInnerHTML`,
|
|
2718
|
+
* since a `col` is a void element, nor the legacy `width`, which its
|
|
2719
|
+
* `style` or `className` replace.
|
|
2720
|
+
*/
|
|
2721
|
+
export declare type TableColumnProps = Omit<ComponentPropsWithRef<'col'>, 'children' | 'dangerouslySetInnerHTML' | 'width'>;
|
|
2722
|
+
|
|
2723
|
+
/**
|
|
2724
|
+
* Props of a `Table.Empty`: the number of columns it spans, its message and
|
|
2725
|
+
* the native props of its `td` element, `ref` and `headers` included, but
|
|
2726
|
+
* the legacy presentational attributes, `rowSpan` and the `abbr` and `scope`
|
|
2727
|
+
* obsolete on a `td`.
|
|
2728
|
+
*/
|
|
2729
|
+
export declare type TableEmptyProps = Omit<ComponentPropsWithRef<'td'>, TableCellExcludedAttribute | 'abbr' | 'children' | 'colSpan' | 'rowSpan' | 'scope'> & Readonly<{
|
|
2730
|
+
/** Message telling why the table has no row, with the action to take if any. */
|
|
2731
|
+
children: ReactNode;
|
|
2732
|
+
/** Number of columns of the table, all of which the cell spans. */
|
|
2733
|
+
colSpan: number;
|
|
2734
|
+
}>;
|
|
2735
|
+
|
|
2736
|
+
/**
|
|
2737
|
+
* Legacy attributes of the `table` element, which a `Table` does not
|
|
2738
|
+
* accept: the presentational ones, which its styles replace, and the
|
|
2739
|
+
* obsolete `summary`, which `Table.Caption` or `aria-describedby` replace.
|
|
2740
|
+
*/
|
|
2741
|
+
declare type TableExcludedAttribute = 'align' | 'bgcolor' | 'border' | 'cellPadding' | 'cellSpacing' | 'color' | 'frame' | 'rules' | 'summary' | 'width';
|
|
2742
|
+
|
|
2743
|
+
/**
|
|
2744
|
+
* Props of a `Table.Footer`: the native props of the `tfoot` element, `ref`
|
|
2745
|
+
* included.
|
|
2746
|
+
*/
|
|
2747
|
+
export declare type TableFooterProps = ComponentPropsWithRef<'tfoot'>;
|
|
2748
|
+
|
|
2749
|
+
/**
|
|
2750
|
+
* Props of a `Table.HeaderCell`: its alignment, its `scope`, narrowed to
|
|
2751
|
+
* its valid values, its sort direction, which sets `aria-sort`, and the
|
|
2752
|
+
* native props of the `th` element, `ref`, `colSpan`, `rowSpan` and `abbr`
|
|
2753
|
+
* included, but its legacy presentational attributes.
|
|
2754
|
+
*/
|
|
2755
|
+
export declare type TableHeaderCellProps = Omit<ComponentPropsWithRef<'th'>, TableCellExcludedAttribute | 'aria-sort' | 'scope'> & Readonly<{
|
|
2756
|
+
/** Cells the header applies to; when absent, `col` in `Table.Header`, `row` in `Table.Body` and `Table.Footer`, none elsewhere. */
|
|
2757
|
+
scope?: TableHeaderCellScope | undefined;
|
|
2758
|
+
/** Sort direction of a sortable column, set as `aria-sort` and shown by its `Table.SortButton`; not sortable when absent. */
|
|
2759
|
+
sortDirection?: TableSortDirection | undefined;
|
|
2760
|
+
/** Horizontal alignment of the content, matching that of its column; `start` when absent. */
|
|
2761
|
+
textAlign?: TableTextAlign | undefined;
|
|
2762
|
+
}>;
|
|
2763
|
+
|
|
2764
|
+
/**
|
|
2765
|
+
* Cells a `Table.HeaderCell` is the header of, as the native `scope`: those
|
|
2766
|
+
* of its column (`col`), of its column group (`colgroup`), of its row
|
|
2767
|
+
* (`row`) or of its row group (`rowgroup`).
|
|
2768
|
+
*/
|
|
2769
|
+
export declare type TableHeaderCellScope = (typeof tableHeaderCellScopes)[number];
|
|
2770
|
+
|
|
2771
|
+
/**
|
|
2772
|
+
* Values of the `scope` of a header cell: the cells of its column, of its
|
|
2773
|
+
* column group, of its row or of its row group.
|
|
2774
|
+
*/
|
|
2775
|
+
declare const tableHeaderCellScopes: readonly ["col", "colgroup", "row", "rowgroup"];
|
|
2776
|
+
|
|
2777
|
+
/**
|
|
2778
|
+
* Props of a `Table.Header`: the native props of the `thead` element, `ref`
|
|
2779
|
+
* included.
|
|
2780
|
+
*/
|
|
2781
|
+
export declare type TableHeaderProps = ComponentPropsWithRef<'thead'>;
|
|
2782
|
+
|
|
2783
|
+
/**
|
|
2784
|
+
* Layout algorithm of a `Table`, as the CSS `table-layout`: columns sized
|
|
2785
|
+
* after their content (`auto`), or after the first row and the columns
|
|
2786
|
+
* only (`fixed`), faster and stable while the content changes.
|
|
2787
|
+
*/
|
|
2788
|
+
export declare type TableLayout = (typeof tableLayouts)[number];
|
|
2789
|
+
|
|
2790
|
+
/**
|
|
2791
|
+
* Layout algorithms a `Table` takes, those of the CSS `table-layout`, the
|
|
2792
|
+
* first being the default: columns sized after their content, or after the
|
|
2793
|
+
* first row and the columns, whatever the content.
|
|
2794
|
+
*/
|
|
2795
|
+
declare const tableLayouts: readonly ["auto", "fixed"];
|
|
2796
|
+
|
|
2797
|
+
/** Presentation props a `Table` handles itself. */
|
|
2798
|
+
declare type TableOwnProps = Readonly<{
|
|
2799
|
+
/** Rows separated by lines, or a framed surface; `underlined` when absent. */
|
|
2800
|
+
variant?: TableVariant | undefined;
|
|
2801
|
+
/** Padding of the cells and font size of the table; `md` when absent. */
|
|
2802
|
+
size?: TableSize | undefined;
|
|
2803
|
+
/** Layout algorithm of the columns, as the CSS `table-layout`; `auto` when absent. */
|
|
2804
|
+
tableLayout?: TableLayout | undefined;
|
|
2805
|
+
/** Tints every other row of the bodies; `false` when absent. */
|
|
2806
|
+
striped?: boolean | undefined;
|
|
2807
|
+
/** Highlights the row of the bodies under the pointer, on devices that hover; `false` when absent. */
|
|
2808
|
+
hoverable?: boolean | undefined;
|
|
2809
|
+
/** Keeps `Table.Header` at the top of the nearest scrolling container while the body scrolls, on an opaque background; `false` when absent. */
|
|
2810
|
+
stickyHeader?: boolean | undefined;
|
|
2811
|
+
}>;
|
|
2812
|
+
|
|
2813
|
+
/**
|
|
2814
|
+
* Props of a `Table`: its presentation props, the margin props of `Box` and
|
|
2815
|
+
* the native props of the `table` element, `ref` included, but its legacy
|
|
2816
|
+
* presentational attributes.
|
|
2817
|
+
*/
|
|
2818
|
+
export declare type TableProps = Omit<ComponentPropsWithRef<'table'>, keyof TableOwnProps | TableExcludedAttribute> & TableOwnProps & BoxMarginStyleProps;
|
|
2819
|
+
|
|
2820
|
+
/**
|
|
2821
|
+
* Props of a `Table.Row`: its selected state and the native props of the
|
|
2822
|
+
* `tr` element, `ref` included.
|
|
2823
|
+
*/
|
|
2824
|
+
export declare type TableRowProps = ComponentPropsWithRef<'tr'> & Readonly<{
|
|
2825
|
+
/** Highlights the row as selected, flagged by `data-selected`; its content, such as a checkbox, must also convey it. `false` when absent. */
|
|
2826
|
+
selected?: boolean | undefined;
|
|
2827
|
+
}>;
|
|
2828
|
+
|
|
2829
|
+
/**
|
|
2830
|
+
* Accessible name a `Table.ScrollContainer` requires, its region being
|
|
2831
|
+
* focusable: an `aria-labelledby` pointing to a visible text, such as the
|
|
2832
|
+
* caption of its table, or else an `aria-label`, one of them only.
|
|
2833
|
+
*/
|
|
2834
|
+
export declare type TableScrollContainerName = Readonly<{
|
|
2835
|
+
/** Name of the region, when no visible text names it. */
|
|
2836
|
+
'aria-label': string;
|
|
2837
|
+
/** Absent when `aria-label` names the region. */
|
|
2838
|
+
'aria-labelledby'?: undefined;
|
|
2839
|
+
}> | Readonly<{
|
|
2840
|
+
/** Absent when `aria-labelledby` names the region. */
|
|
2841
|
+
'aria-label'?: undefined;
|
|
2842
|
+
/** Identifiers of the visible texts naming the region, such as the `id` of a `Table.Caption`. */
|
|
2843
|
+
'aria-labelledby': string;
|
|
2844
|
+
}>;
|
|
2845
|
+
|
|
2846
|
+
/**
|
|
2847
|
+
* Props of a `Table.ScrollContainer`: those of a `ScrollArea`, its sizing
|
|
2848
|
+
* props bounding the area, its native props going to the viewport, but
|
|
2849
|
+
* `role`, always `region`, and its required accessible name.
|
|
2850
|
+
*/
|
|
2851
|
+
export declare type TableScrollContainerProps = Omit<ScrollAreaProps, 'aria-label' | 'aria-labelledby' | 'role'> & TableScrollContainerName;
|
|
2852
|
+
|
|
2853
|
+
/**
|
|
2854
|
+
* Size of a `Table`, from the densest to the roomiest, setting the padding
|
|
2855
|
+
* of its cells and its font size.
|
|
2856
|
+
*/
|
|
2857
|
+
export declare type TableSize = (typeof tableSizes)[number];
|
|
2858
|
+
|
|
2859
|
+
/**
|
|
2860
|
+
* Sizes a `Table` takes, an ordered scale from the densest to the roomiest:
|
|
2861
|
+
* the padding of its cells and its font size. `md` is the default.
|
|
2862
|
+
*/
|
|
2863
|
+
declare const tableSizes: readonly ["sm", "md", "lg"];
|
|
2864
|
+
|
|
2865
|
+
/**
|
|
2866
|
+
* Props of a `Table.SortButton`: the native props of the `button` element,
|
|
2867
|
+
* `ref`, `onClick` and `children`, its label, included, but `type`, always
|
|
2868
|
+
* `button` so it never submits a form.
|
|
2869
|
+
*/
|
|
2870
|
+
export declare type TableSortButtonProps = Omit<ComponentPropsWithRef<'button'>, 'type'>;
|
|
2871
|
+
|
|
2872
|
+
/**
|
|
2873
|
+
* Sort direction of a sortable column of a `Table`, as `aria-sort`: sorted
|
|
2874
|
+
* in ascending (`ascending`) or descending (`descending`) order, or sortable
|
|
2875
|
+
* but not sorted (`none`).
|
|
2876
|
+
*/
|
|
2877
|
+
export declare type TableSortDirection = (typeof tableSortDirections)[number];
|
|
2878
|
+
|
|
2879
|
+
/**
|
|
2880
|
+
* Sort directions of a sortable column of a `Table`, the values of
|
|
2881
|
+
* `aria-sort` its `Table.HeaderCell` takes and the `Table.SortButton` of the
|
|
2882
|
+
* cell shows: sorted in ascending or descending order, or sortable but not
|
|
2883
|
+
* sorted.
|
|
2884
|
+
*/
|
|
2885
|
+
declare const tableSortDirections: readonly ["ascending", "descending", "none"];
|
|
2886
|
+
|
|
2887
|
+
/**
|
|
2888
|
+
* Horizontal alignment of the content of a cell of a `Table`, as the CSS
|
|
2889
|
+
* `text-align`: at the start of the line (`start`), centered (`center`), or
|
|
2890
|
+
* at its end (`end`), which suits numbers.
|
|
2891
|
+
*/
|
|
2892
|
+
export declare type TableTextAlign = (typeof tableTextAligns)[number];
|
|
2893
|
+
|
|
2894
|
+
/**
|
|
2895
|
+
* Horizontal alignments a cell of a `Table` takes, the first being the
|
|
2896
|
+
* default: logical values of the CSS `text-align`, so they follow the
|
|
2897
|
+
* writing direction.
|
|
2898
|
+
*/
|
|
2899
|
+
declare const tableTextAligns: readonly ["start", "center", "end"];
|
|
2900
|
+
|
|
2901
|
+
/**
|
|
2902
|
+
* Variant of a `Table`: rows separated by lines on the surface beneath
|
|
2903
|
+
* (`underlined`), or a framed surface with rounded corners, whose header and
|
|
2904
|
+
* footer are tinted (`outlined`).
|
|
2905
|
+
*/
|
|
2906
|
+
export declare type TableVariant = (typeof tableVariants)[number];
|
|
2907
|
+
|
|
2908
|
+
/**
|
|
2909
|
+
* Variants a `Table` takes, the first being the default: rows separated by
|
|
2910
|
+
* lines on the surface beneath, or a framed surface with rounded corners,
|
|
2911
|
+
* a tinted header and footer.
|
|
2912
|
+
*/
|
|
2913
|
+
declare const tableVariants: readonly ["underlined", "outlined"];
|
|
2914
|
+
|
|
2915
|
+
export declare const Tabs: FC<TabsProps> & {
|
|
2916
|
+
List: FC< TabsListProps>;
|
|
2917
|
+
Panel: FC< TabsPanelProps>;
|
|
2918
|
+
Tab: FC< TabsTabProps | TabsTabAsChildProps>;
|
|
2919
|
+
};
|
|
2920
|
+
|
|
2921
|
+
/** Name of a style prop of `Box` a `Tabs.List` accepts. */
|
|
2922
|
+
declare type TabsListBoxStylePropName = (typeof tabsListBoxStylePropNames)[number];
|
|
2923
|
+
|
|
2924
|
+
/**
|
|
2925
|
+
* Style props of `Box` a `Tabs.List` accepts, in alphabetical order: its
|
|
2926
|
+
* background color and its border (widths, style and color). Colors take
|
|
2927
|
+
* any CSS color, widths the border widths of `Box`, in pixels.
|
|
2928
|
+
*/
|
|
2929
|
+
declare const tabsListBoxStylePropNames: readonly ["backgroundColor", "borderBottomWidth", "borderColor", "borderLeftWidth", "borderRightWidth", "borderStyle", "borderTopWidth", "borderWidth"];
|
|
2930
|
+
|
|
2931
|
+
/**
|
|
2932
|
+
* Style props of `Box` a `Tabs.List` accepts, applied as `Box` applies
|
|
2933
|
+
* them: `backgroundColor` and `borderColor`, any CSS color, `borderStyle`,
|
|
2934
|
+
* and `borderWidth` and its sides, border widths of `Box` in pixels, a side
|
|
2935
|
+
* prevailing over `borderWidth`. Each one given replaces the default of the
|
|
2936
|
+
* variant.
|
|
2937
|
+
*/
|
|
2938
|
+
export declare type TabsListBoxStyleProps = Pick<BoxStyleProps, TabsListBoxStylePropName>;
|
|
2939
|
+
|
|
2940
|
+
/** Props a `Tabs.List` handles itself. */
|
|
2941
|
+
declare type TabsListOwnProps = Readonly<{
|
|
2942
|
+
/** Tabs of the list, `Tabs.Tab` elements, possibly wrapped, such as in a `Tooltip`. */
|
|
2943
|
+
children?: ReactNode;
|
|
2944
|
+
/** Whether reaching a tab with the arrow keys activates it, rather than Enter or Space; `false` when absent, as in Base UI. */
|
|
2945
|
+
activateOnFocus?: boolean | undefined;
|
|
2946
|
+
/** Whether the arrow keys loop from the last tab to the first and back; `true` when absent, as in Base UI. */
|
|
2947
|
+
loopFocus?: boolean | undefined;
|
|
2948
|
+
/** Whether a horizontal list fills the width of its container, its tabs sharing it equally; `false` when absent. */
|
|
2949
|
+
fullWidth?: boolean | undefined;
|
|
2950
|
+
/** Whether the indicator shows before hydration after a server rendering, through an inline script that a Content Security Policy must allow; `false` when absent, as in Base UI. */
|
|
2951
|
+
renderIndicatorBeforeHydration?: boolean | undefined;
|
|
2952
|
+
/** Classes added after the generated ones. */
|
|
2953
|
+
className?: string | undefined;
|
|
2954
|
+
/** Inline styles of the list. */
|
|
2955
|
+
style?: CSSProperties | undefined;
|
|
2956
|
+
}>;
|
|
2957
|
+
|
|
2958
|
+
/**
|
|
2959
|
+
* Props of a `Tabs.List`: its own props and the background and border
|
|
2960
|
+
* style props of `Box`, then the attributes, events and `ref` of the
|
|
2961
|
+
* rendered `div`, with the `tablist` role, `aria-label` or
|
|
2962
|
+
* `aria-labelledby` naming it, but the legacy `color` attribute and
|
|
2963
|
+
* `dangerouslySetInnerHTML`.
|
|
2964
|
+
*/
|
|
2965
|
+
export declare type TabsListProps = TabsListOwnProps & TabsListBoxStyleProps & Readonly<Omit<ComponentPropsWithRef<'div'>, keyof TabsListOwnProps | keyof TabsListBoxStyleProps | BoxComponentExcludedAttribute | 'defaultChecked' | 'defaultValue'>>;
|
|
2966
|
+
|
|
2967
|
+
/** Orientation of a `Tabs`: a row of tabs above the panels, or a column beside them. */
|
|
2968
|
+
export declare type TabsOrientation = (typeof tabsOrientations)[number];
|
|
2969
|
+
|
|
2970
|
+
/** Orientations of a `Tabs`, the first being the default: a row of tabs above the panels, or a column beside them. */
|
|
2971
|
+
declare const tabsOrientations: readonly ["horizontal", "vertical"];
|
|
2972
|
+
|
|
2973
|
+
/** Props a `Tabs` handles itself. */
|
|
2974
|
+
declare type TabsOwnProps = Readonly<{
|
|
2975
|
+
/** Parts of the tabs: a `Tabs.List` of `Tabs.Tab`, then a `Tabs.Panel` per tab. */
|
|
2976
|
+
children?: ReactNode;
|
|
2977
|
+
/** Controlled value of the active tab, `null` for none; keep it always defined or absent, with `onValueChange`. */
|
|
2978
|
+
value?: TabsValue | null | undefined;
|
|
2979
|
+
/** Value of the tab active first in an uncontrolled `Tabs`, `null` for none; the first enabled tab when absent. */
|
|
2980
|
+
defaultValue?: TabsValue | null | undefined;
|
|
2981
|
+
/** Called with the value of the tab becoming active, `null` for none, and the details of the change: by the user, or automatically in an uncontrolled `Tabs`, once mounted without `defaultValue` among them. */
|
|
2982
|
+
onValueChange?: ((value: TabsValue | null, eventDetails: TabsValueChangeDetails) => void) | undefined;
|
|
2983
|
+
/** Row of tabs above the panels, or column beside them, which also sets the arrow keys; `horizontal` when absent. */
|
|
2984
|
+
orientation?: TabsOrientation | undefined;
|
|
2985
|
+
/** Look of the list and its tabs; `underlined` when absent. */
|
|
2986
|
+
variant?: TabsVariant | undefined;
|
|
2987
|
+
/** Height, padding and font of the tabs; `md` when absent. */
|
|
2988
|
+
size?: TabsSize | undefined;
|
|
2989
|
+
/** Classes added after the generated ones. */
|
|
2990
|
+
className?: string | undefined;
|
|
2991
|
+
/** Inline styles of the root. */
|
|
2992
|
+
style?: CSSProperties | undefined;
|
|
2993
|
+
}>;
|
|
2994
|
+
|
|
2995
|
+
/** Props a `Tabs.Panel` handles itself. */
|
|
2996
|
+
declare type TabsPanelOwnProps = Readonly<{
|
|
2997
|
+
/** Value of the `Tabs.Tab` that shows the panel and names it. */
|
|
2998
|
+
value: TabsValue;
|
|
2999
|
+
/** Content of the panel. */
|
|
3000
|
+
children?: ReactNode;
|
|
3001
|
+
/** Whether the hidden panel stays in the DOM, hidden, keeping its state; `false` when absent, as in Base UI. */
|
|
3002
|
+
keepMounted?: boolean | undefined;
|
|
3003
|
+
/** Classes added after the generated ones. */
|
|
3004
|
+
className?: string | undefined;
|
|
3005
|
+
/** Inline styles of the panel. */
|
|
3006
|
+
style?: CSSProperties | undefined;
|
|
3007
|
+
}>;
|
|
3008
|
+
|
|
3009
|
+
/**
|
|
3010
|
+
* Props of a `Tabs.Panel`: its own props, then the attributes, events and
|
|
3011
|
+
* `ref` of the rendered `div`, with the `tabpanel` role, but the legacy
|
|
3012
|
+
* `color` attribute and `dangerouslySetInnerHTML`.
|
|
3013
|
+
*/
|
|
3014
|
+
export declare type TabsPanelProps = TabsPanelOwnProps & Readonly<Omit<ComponentPropsWithRef<'div'>, keyof TabsPanelOwnProps | BoxComponentExcludedAttribute | 'defaultChecked' | 'defaultValue'>>;
|
|
3015
|
+
|
|
3016
|
+
/**
|
|
3017
|
+
* Props of a `Tabs`: its own props, the margin props of `Box`, then the
|
|
3018
|
+
* attributes, events and `ref` of the rendered `div`, but the legacy `color`
|
|
3019
|
+
* attribute and `dangerouslySetInnerHTML`.
|
|
3020
|
+
*/
|
|
3021
|
+
export declare type TabsProps = TabsOwnProps & BoxMarginStyleProps & Readonly<Omit<ComponentPropsWithRef<'div'>, keyof TabsOwnProps | BoxComponentExcludedAttribute | 'defaultChecked'>>;
|
|
3022
|
+
|
|
3023
|
+
/** Size of a `Tabs`, from the scale of the controls, its tabs as high as a `Button` of the same size. */
|
|
3024
|
+
export declare type TabsSize = (typeof tabsSizes)[number];
|
|
3025
|
+
|
|
3026
|
+
/**
|
|
3027
|
+
* Sizes a `Tabs` takes, the scale of the controls from the smallest to the
|
|
3028
|
+
* largest, as `Button`, whose heights the tabs share. `md` is the default.
|
|
3029
|
+
*/
|
|
3030
|
+
declare const tabsSizes: readonly ["xs", "sm", "md", "lg"];
|
|
3031
|
+
|
|
3032
|
+
/**
|
|
3033
|
+
* Props of a `Tabs.Tab` rendering its single child (`asChild`), such as the
|
|
3034
|
+
* link of a router, for tabs following the pages of an application: its
|
|
3035
|
+
* own props and its content, then the global attributes, events and `ref`
|
|
3036
|
+
* merged onto the child, which takes the `tab` role.
|
|
3037
|
+
*/
|
|
3038
|
+
export declare type TabsTabAsChildProps = TabsTabOwnProps & TabsTabContentProps & Readonly<{
|
|
3039
|
+
/** Renders the single child, with the props, styles and content of the tab merged onto it. */
|
|
3040
|
+
asChild: true;
|
|
3041
|
+
/** Single element without content rendering an `a`, such as a router link, which receives the content of the tab. */
|
|
3042
|
+
children: ReactElement;
|
|
3043
|
+
/** Ref composed with the ref of the child, receiving its element. */
|
|
3044
|
+
ref?: Ref<HTMLAnchorElement> | undefined;
|
|
3045
|
+
}> & Readonly<Omit<HTMLAttributes<HTMLElement>, keyof TabsTabOwnProps | keyof TabsTabLabelContentProps | BoxComponentExcludedAttribute | 'aria-label'>>;
|
|
3046
|
+
|
|
3047
|
+
/** Content of a `Tabs.Tab`: a label between optional icons, or an icon alone. */
|
|
3048
|
+
declare type TabsTabContentProps = TabsTabIconContentProps | TabsTabLabelContentProps;
|
|
3049
|
+
|
|
3050
|
+
/** Content of a `Tabs.Tab` showing an icon alone, square, named by `aria-label`. */
|
|
3051
|
+
declare type TabsTabIconContentProps = Readonly<{
|
|
3052
|
+
/** Data of the icon shown alone, hidden from assistive technologies. */
|
|
3053
|
+
icon: IconData;
|
|
3054
|
+
/** Accessible name of the tab, required since its icon is hidden, which also names its panel, such as `Settings`. */
|
|
3055
|
+
'aria-label': string;
|
|
3056
|
+
/** Only for a labelled tab. */
|
|
3057
|
+
label?: never;
|
|
3058
|
+
/** Only for a labelled tab. */
|
|
3059
|
+
startIcon?: never;
|
|
3060
|
+
/** Only for a labelled tab. */
|
|
3061
|
+
endIcon?: never;
|
|
3062
|
+
}>;
|
|
3063
|
+
|
|
3064
|
+
/** Content of a `Tabs.Tab` showing a label, which names it and its panel. */
|
|
3065
|
+
declare type TabsTabLabelContentProps = Readonly<{
|
|
3066
|
+
/** Visible text of the tab, which names it and its panel; kept on one line. */
|
|
3067
|
+
label: string;
|
|
3068
|
+
/** Data of the decorative icon before the label, hidden from assistive technologies; none when absent. */
|
|
3069
|
+
startIcon?: IconData | undefined;
|
|
3070
|
+
/** Data of the decorative icon after the label, hidden from assistive technologies; none when absent. */
|
|
3071
|
+
endIcon?: IconData | undefined;
|
|
3072
|
+
/** Only for a tab without label. */
|
|
3073
|
+
icon?: never;
|
|
3074
|
+
}>;
|
|
3075
|
+
|
|
3076
|
+
/** Props a `Tabs.Tab` handles itself, whatever its content and its element. */
|
|
3077
|
+
declare type TabsTabOwnProps = Readonly<{
|
|
3078
|
+
/** Value of the tab, shared with the `Tabs.Panel` it shows. */
|
|
3079
|
+
value: TabsValue;
|
|
3080
|
+
/** Grays the tab and ignores its activation, the tab staying reachable with the arrow keys; `false` when absent. */
|
|
3081
|
+
disabled?: boolean | undefined;
|
|
3082
|
+
/** Classes added after the generated ones. */
|
|
3083
|
+
className?: string | undefined;
|
|
3084
|
+
/** Inline styles of the tab. */
|
|
3085
|
+
style?: CSSProperties | undefined;
|
|
3086
|
+
}>;
|
|
3087
|
+
|
|
3088
|
+
/**
|
|
3089
|
+
* Props of a `Tabs.Tab` rendering its own `button`: its own props and its
|
|
3090
|
+
* content, then the attributes, events and `ref` of the `button`, with the
|
|
3091
|
+
* `tab` role, but its content and the legacy `color` attribute.
|
|
3092
|
+
*/
|
|
3093
|
+
export declare type TabsTabProps = TabsTabOwnProps & TabsTabContentProps & Readonly<{
|
|
3094
|
+
/** Renders the single child instead of a `button` when true; absent or false here. */
|
|
3095
|
+
asChild?: false | undefined;
|
|
3096
|
+
/** No children: the content is given by `label` or `icon`. */
|
|
3097
|
+
children?: never;
|
|
3098
|
+
}> & Readonly<Omit<ComponentPropsWithRef<'button'>, keyof TabsTabOwnProps | keyof TabsTabLabelContentProps | BoxComponentExcludedAttribute | 'aria-label'>>;
|
|
3099
|
+
|
|
3100
|
+
/** Value identifying a tab and its panel within a `Tabs`. */
|
|
3101
|
+
export declare type TabsValue = number | string;
|
|
3102
|
+
|
|
3103
|
+
/**
|
|
3104
|
+
* Details of a change of the active tab of a `Tabs`, given by Base UI as
|
|
3105
|
+
* the second argument of `onValueChange`: its cause (`reason`: `none` for a
|
|
3106
|
+
* click or a key, `initial`, `disabled` or `missing` for the automatic
|
|
3107
|
+
* choice of an uncontrolled `Tabs`), the native `event`, the
|
|
3108
|
+
* `activationDirection` and `cancel()`, which keeps the current tab for a
|
|
3109
|
+
* change of the user. Those of the `Tabs` of Base UI 1.9, passed as they
|
|
3110
|
+
* are.
|
|
3111
|
+
*/
|
|
3112
|
+
export declare type TabsValueChangeDetails = Tabs_2.Root.ChangeEventDetails;
|
|
3113
|
+
|
|
3114
|
+
/** Variant of a `Tabs`: tabs over a line with a sliding bar, or in a track with a sliding raised surface. */
|
|
3115
|
+
export declare type TabsVariant = (typeof tabsVariants)[number];
|
|
3116
|
+
|
|
3117
|
+
/**
|
|
3118
|
+
* Variants a `Tabs` takes, the first being the default: tabs over a thin
|
|
3119
|
+
* line, the active one marked by a primary bar sliding along it
|
|
3120
|
+
* (`underlined`), or tabs in a muted bordered track, the active one on a
|
|
3121
|
+
* bordered surface sliding behind it, without shadow (`contained`).
|
|
3122
|
+
*/
|
|
3123
|
+
declare const tabsVariants: readonly ["underlined", "contained"];
|
|
3124
|
+
|
|
3125
|
+
/**
|
|
3126
|
+
* Renders a single-line text field: a `FormLabel` showing `label` when
|
|
3127
|
+
* given, a frame holding an optional decorative `startIcon`, a native `input`, an optional
|
|
3128
|
+
* decorative `endIcon` and an optional `endActionSlot`, then a
|
|
3129
|
+
* `FormHelperText` showing `helperText` when given, stacked in a `div` (a
|
|
3130
|
+
* `Flex`) as wide as its container.
|
|
3131
|
+
*
|
|
3132
|
+
* The label is associated with the `input` through its `id`, the given one
|
|
3133
|
+
* or one generated by `useId`, stable between the server and the client:
|
|
3134
|
+
* its text is the accessible name of the `input`, and a click on it focuses
|
|
3135
|
+
* the `input`. Without `label`, no label nor asterisk is rendered and the
|
|
3136
|
+
* `input` keeps its `id`: name it otherwise, with an external `FormLabel`
|
|
3137
|
+
* whose `htmlFor` is that `id`, `aria-labelledby` or `aria-label`. The
|
|
3138
|
+
* helper text takes the `id` of the `input` followed by
|
|
3139
|
+
* `-helper-text`, referenced first in the `aria-describedby` of the
|
|
3140
|
+
* `input`, before the ids the consumer gives; assistive technologies read
|
|
3141
|
+
* it as the description of the `input` when it is focused. It is no live
|
|
3142
|
+
* region: a message that appears is read when the `input` is focused.
|
|
3143
|
+
*
|
|
3144
|
+
* The frame carries the border, the background and the focus of the field:
|
|
3145
|
+
* its border takes the focus ring color while the `input` is focused, and
|
|
3146
|
+
* the focus ring of the theme surrounds it for a focus from the keyboard or
|
|
3147
|
+
* a script, not for a focus given by a pointer press in the field, which
|
|
3148
|
+
* flags the frame with `data-focus-modality="pointer"` until the blur. A press on
|
|
3149
|
+
* the frame, its padding or its icons focuses the `input`. The icons, given
|
|
3150
|
+
* as icon data and drawn by `Icon`s at the font size of the field, are
|
|
3151
|
+
* hidden from assistive technologies. `endActionSlot` renders interactive
|
|
3152
|
+
* content after `endIcon`, outside the label, such as an `IconButton` two
|
|
3153
|
+
* sizes below the field (`xs` for `sm` and `md`, `sm` for `lg`), `ghost`,
|
|
3154
|
+
* named by its own `aria-label`; the frame then shortens its end padding so
|
|
3155
|
+
* that button sits as far from its end as from its top and bottom. A press
|
|
3156
|
+
* on it reaches it untouched, and it comes after the `input` in the tab
|
|
3157
|
+
* order.
|
|
3158
|
+
* The placeholder takes the tertiary text color of the theme; it is no
|
|
3159
|
+
* label, since it disappears as soon as a value is typed.
|
|
3160
|
+
*
|
|
3161
|
+
* `invalid` puts `aria-invalid="true"` on the `input`, gives the frame the
|
|
3162
|
+
* danger border of the theme and shows the helper text as a validation
|
|
3163
|
+
* message after a decorative alert icon. `required` puts `required` on the
|
|
3164
|
+
* `input` and an asterisk, hidden from assistive technologies, after the
|
|
3165
|
+
* label. `disabled` disables the `input` and dims the frame, the label and
|
|
3166
|
+
* the helper text, over the validation color; it does not disable the
|
|
3167
|
+
* content of `endActionSlot`, which the consumer disables. The native
|
|
3168
|
+
* `readOnly` keeps the value readable, selectable, focusable and submitted,
|
|
3169
|
+
* in the primary text color, and flags the frame with `data-readonly`,
|
|
3170
|
+
* which takes the muted surface of the theme and the default cursor; the
|
|
3171
|
+
* focus stays shown. An autofilled `input` gets no background of the
|
|
3172
|
+
* browser: the whole frame takes the subtle primary tint of the theme
|
|
3173
|
+
* instead, its text staying in the primary text color. `size` sets the
|
|
3174
|
+
* height of the frame (32, 36 or 44px from `sm` to `lg`, as the `Button` of
|
|
3175
|
+
* the same size), its padding, font and icon sizes, and the font sizes of
|
|
3176
|
+
* the label and the helper text. In forced colors, the focus takes the
|
|
3177
|
+
* system highlight and a disabled field the system gray text.
|
|
3178
|
+
*
|
|
3179
|
+
* The margin and width props of `Box` space and size the root, which the
|
|
3180
|
+
* frame, the label and the helper text follow. Every other prop
|
|
3181
|
+
* (attributes, events, `ref`) goes to the `input`, so it is controlled with
|
|
3182
|
+
* `value` and `onChange`, or uncontrolled with `defaultValue`, as a native
|
|
3183
|
+
* one; the native `size` and `width` attributes are replaced by the size of
|
|
3184
|
+
* the field and the width of the root. `className` comes after the generated classes
|
|
3185
|
+
* of the root and `style` after its generated styles. Its styles sit in the
|
|
3186
|
+
* `cv.components` cascade layers, below any unlayered style of the
|
|
3187
|
+
* consumer.
|
|
3188
|
+
*
|
|
3189
|
+
* @param props Label, helper text, icons, end action slot, states, size,
|
|
3190
|
+
* root classes, styles, margin and width props, and native props of the
|
|
3191
|
+
* `input`.
|
|
3192
|
+
* @param props.className Classes of the root.
|
|
3193
|
+
* @param props.disabled Whether the field is disabled; `false` when absent.
|
|
3194
|
+
* @param props.endActionSlot Interactive content at the end of the frame;
|
|
3195
|
+
* none when absent.
|
|
3196
|
+
* @param props.endIcon Data of the decorative icon after the `input`; none
|
|
3197
|
+
* when absent.
|
|
3198
|
+
* @param props.helperText Hint or validation message under the frame; none
|
|
3199
|
+
* when absent.
|
|
3200
|
+
* @param props.invalid Whether the value is invalid; `false` when absent.
|
|
3201
|
+
* @param props.label Visible text naming the `input`; no label when absent,
|
|
3202
|
+
* `null`, `false` or empty, the `input` then being named otherwise.
|
|
3203
|
+
* @param props.required Whether the field is required; `false` when absent.
|
|
3204
|
+
* @param props.size Size of the field; `md` when absent.
|
|
3205
|
+
* @param props.startIcon Data of the decorative icon before the `input`;
|
|
3206
|
+
* none when absent.
|
|
3207
|
+
* @param props.style Inline styles of the root.
|
|
3208
|
+
* @returns The text field.
|
|
3209
|
+
*/
|
|
3210
|
+
export declare const TextField: FC<TextFieldProps>;
|
|
3211
|
+
|
|
3212
|
+
/** Name of a style prop of `Box` a `TextField` accepts. */
|
|
3213
|
+
declare type TextFieldBoxStylePropName = (typeof textFieldBoxStylePropNames)[number];
|
|
3214
|
+
|
|
3215
|
+
/**
|
|
3216
|
+
* Style props of `Box` a `TextField` accepts and gives to its root, as `Box`
|
|
3217
|
+
* types and applies them: the margin and width props. Single source of the
|
|
3218
|
+
* `TextFieldBoxStyleProps` type, in alphabetical order.
|
|
3219
|
+
*/
|
|
3220
|
+
declare const textFieldBoxStylePropNames: readonly ["margin", "marginBottom", "marginLeft", "marginRight", "marginTop", "marginX", "marginY", "maxWidth", "minWidth", "width"];
|
|
3221
|
+
|
|
3222
|
+
/**
|
|
3223
|
+
* Style props of `Box` a `TextField` accepts, applied to its root as `Box`
|
|
3224
|
+
* applies them: the margin props, steps of the space scale or `auto`, and
|
|
3225
|
+
* the width props, which take any CSS value, a number being a length in
|
|
3226
|
+
* pixels. The frame, the label and the helper text follow the width of the
|
|
3227
|
+
* root.
|
|
3228
|
+
*/
|
|
3229
|
+
declare type TextFieldBoxStyleProps = Pick<BoxStyleProps, TextFieldBoxStylePropName>;
|
|
3230
|
+
|
|
3231
|
+
/**
|
|
3232
|
+
* Native attributes a `TextField` does not accept: an `input` has no
|
|
3233
|
+
* content, and `aria-invalid` is set from `invalid`, which also shows the
|
|
3234
|
+
* helper text as a validation message.
|
|
3235
|
+
*/
|
|
3236
|
+
declare type TextFieldExcludedAttribute = 'aria-invalid' | 'children' | 'dangerouslySetInnerHTML';
|
|
3237
|
+
|
|
3238
|
+
/** Props a `TextField` handles itself. */
|
|
3239
|
+
declare type TextFieldOwnProps = Readonly<{
|
|
3240
|
+
/** Visible text of the label, the accessible name of the `input`; no label nor asterisk when absent, `null`, `false` or empty, so name the `input` otherwise: an external `FormLabel` whose `htmlFor` is its `id`, `aria-labelledby` or `aria-label`. */
|
|
3241
|
+
label?: ReactNode;
|
|
3242
|
+
/** Hint or validation message under the frame, the accessible description of the `input`; none when absent, `null`, `false` or empty. */
|
|
3243
|
+
helperText?: ReactNode;
|
|
3244
|
+
/** Data of the decorative icon before the `input`, drawn by an `Icon` at the font size of the field and hidden from assistive technologies; none when absent. */
|
|
3245
|
+
startIcon?: IconData | undefined;
|
|
3246
|
+
/** Data of the decorative icon after the `input`, drawn by an `Icon` at the font size of the field and hidden from assistive technologies; none when absent. */
|
|
3247
|
+
endIcon?: IconData | undefined;
|
|
3248
|
+
/** Interactive content at the end of the frame, after `endIcon`, such as an `IconButton` two sizes below the field (`xs` for `sm` and `md`, `sm` for `lg`), named by its own `aria-label`; none when absent, `null`, `false` or empty. */
|
|
3249
|
+
endActionSlot?: ReactNode;
|
|
3250
|
+
/** Marks the `input` with `aria-invalid="true"`, gives the frame the danger border and shows the helper text as a validation message; `false` when absent. */
|
|
3251
|
+
invalid?: boolean | undefined;
|
|
3252
|
+
/** Disables the `input` and dims the frame, the label and the helper text; `false` when absent. */
|
|
3253
|
+
disabled?: boolean | undefined;
|
|
3254
|
+
/** Makes the `input` required and shows an asterisk, hidden from assistive technologies, after the label; `false` when absent. */
|
|
3255
|
+
required?: boolean | undefined;
|
|
3256
|
+
/** Height, padding, font and icon sizes of the frame, and font sizes of the label and the helper text; `md` when absent. */
|
|
3257
|
+
size?: TextFieldSize | undefined;
|
|
3258
|
+
/** Classes of the root, added after the generated ones. */
|
|
3259
|
+
className?: string | undefined;
|
|
3260
|
+
/** Inline styles of the root, merged after the generated ones, so they prevail. */
|
|
3261
|
+
style?: CSSProperties | undefined;
|
|
3262
|
+
}>;
|
|
3263
|
+
|
|
3264
|
+
/**
|
|
3265
|
+
* Props of a `TextField`: its own props, the margin and width props of
|
|
3266
|
+
* `Box`, then the attributes, events and `ref` of the rendered `input`,
|
|
3267
|
+
* `id`, `value`, `defaultValue`, `onChange` and `placeholder` included, but
|
|
3268
|
+
* `aria-invalid`. The native `size` attribute is replaced by the size of the
|
|
3269
|
+
* field and the native `width` by the width of the root; `className`,
|
|
3270
|
+
* `style` and the `Box` props apply to the root.
|
|
3271
|
+
*/
|
|
3272
|
+
export declare type TextFieldProps = TextFieldOwnProps & TextFieldBoxStyleProps & Readonly<Omit<ComponentPropsWithRef<'input'>, keyof TextFieldOwnProps | keyof TextFieldBoxStyleProps | TextFieldExcludedAttribute>>;
|
|
3273
|
+
|
|
3274
|
+
/**
|
|
3275
|
+
* Size of a `TextField`, from the smallest to the largest, aligned with the
|
|
3276
|
+
* `Button` of the same size: the height of its frame (32, 36 or 44px from
|
|
3277
|
+
* `sm` to `lg`), its padding, radius, font and icon sizes, and the font
|
|
3278
|
+
* sizes of its label and helper text.
|
|
3279
|
+
*/
|
|
3280
|
+
export declare type TextFieldSize = FormBaseSize;
|
|
3281
|
+
|
|
3282
|
+
/**
|
|
3283
|
+
* Tones the components take, the first being the default, internal and
|
|
3284
|
+
* never exported: each one names the color intent of the theme its colors
|
|
3285
|
+
* come from.
|
|
3286
|
+
*/
|
|
3287
|
+
declare const tones: readonly ["primary", "secondary", "neutral", "warning", "danger", "success", "info"];
|
|
3288
|
+
|
|
3289
|
+
/**
|
|
3290
|
+
* Wraps a control, the trigger, and shows a short text describing it while
|
|
3291
|
+
* it is hovered or focused, such as the action of an icon button; use a
|
|
3292
|
+
* `Popover` for content to interact with. It renders no element of its own:
|
|
3293
|
+
* its single child, which must render a native `button`, such as a `Button`
|
|
3294
|
+
* or an `IconButton`, receives the props of the trigger as Base UI merges
|
|
3295
|
+
* them: the child keeps its own value for any prop both give, its classes
|
|
3296
|
+
* come first, inline styles are merged, event handlers both run, the
|
|
3297
|
+
* child's first, and refs are composed. The tooltip only adds a
|
|
3298
|
+
* description: the trigger keeps its own name, which an icon alone needs,
|
|
3299
|
+
* such as the `aria-label` of an `IconButton`. A disabled `button` receives
|
|
3300
|
+
* no pointer events and no focus, so its tooltip never opens.
|
|
3301
|
+
*
|
|
3302
|
+
* Hovering the trigger opens the tooltip after `delay`, focusing it from
|
|
3303
|
+
* the keyboard at once; leaving it, after `closeDelay`, blurring it,
|
|
3304
|
+
* pressing it or Escape closes it. Within a `TooltipProvider`, the delays
|
|
3305
|
+
* the tooltip does not set are those of the provider, and moving from one
|
|
3306
|
+
* trigger of the group to another opens the next tooltip at once. While open, the tooltip describes the trigger through
|
|
3307
|
+
* `aria-describedby`, after the identifiers the child already holds. The
|
|
3308
|
+
* state is uncontrolled from `defaultOpen`, or controlled by `open` and
|
|
3309
|
+
* `onOpenChange`, whose details can `cancel()` the change; `disabled` keeps
|
|
3310
|
+
* it closed.
|
|
3311
|
+
*
|
|
3312
|
+
* The open tooltip is rendered in a portal at the end of the `body`, or in
|
|
3313
|
+
* `container`, unmounted once closed: a `div` with the `tooltip` role, in
|
|
3314
|
+
* small text on the inverse surface of the theme, or with `variant` set to
|
|
3315
|
+
* `outlined` on the elevated one, outlined and shadowed, fading in and out
|
|
3316
|
+
* unless reduced motion is preferred. It is placed against the trigger by
|
|
3317
|
+
* `side`, `align`, `alignOffset` and `sideOffset`, kept `collisionPadding`
|
|
3318
|
+
* away from the edges of the viewport, on the tooltip layer, and wraps
|
|
3319
|
+
* beyond `20rem` or the space left in the viewport; `arrow` points it to
|
|
3320
|
+
* the trigger, hidden from assistive technologies and kept off the rounded
|
|
3321
|
+
* corners. `fontSize` and `fontWeight` take the steps of the theme scales,
|
|
3322
|
+
* as those of a `Typography`.
|
|
3323
|
+
*
|
|
3324
|
+
* The pointer can move onto it without closing it, so it stays readable
|
|
3325
|
+
* while hovered, unless `interactive` is `false`; Escape dismisses it. Being in a portal, it takes the theme
|
|
3326
|
+
* of the document, not that of a nested `ThemeProvider`, unless `container`
|
|
3327
|
+
* lies inside it. Every other prop (attributes, events, `ref`) goes to the
|
|
3328
|
+
* popup, but its `id` and `role`, set by the tooltip; `className` comes
|
|
3329
|
+
* after the generated classes, in the `cv.components` cascade layers.
|
|
3330
|
+
*
|
|
3331
|
+
* @param props Trigger, text, open state, presentation, placement and
|
|
3332
|
+
* native props of the popup.
|
|
3333
|
+
* @param props.align Alignment along the side of the trigger; `center` when
|
|
3334
|
+
* absent.
|
|
3335
|
+
* @param props.alignOffset Shift along the side of the trigger, in pixels,
|
|
3336
|
+
* from the alignment; `0` when absent.
|
|
3337
|
+
* @param props.arrow Whether an arrow points to the trigger; `false` when
|
|
3338
|
+
* absent.
|
|
3339
|
+
* @param props.children The trigger: a single element rendering a native
|
|
3340
|
+
* `button`.
|
|
3341
|
+
* @param props.className Classes added after the generated ones.
|
|
3342
|
+
* @param props.closeDelay Time before the tooltip closes once the pointer
|
|
3343
|
+
* leaves the trigger, in milliseconds; `0` when absent, or that of the
|
|
3344
|
+
* enclosing `TooltipProvider`.
|
|
3345
|
+
* @param props.collisionPadding Space kept from the edges of the viewport,
|
|
3346
|
+
* in pixels, one number or one per side; `5` when absent, as in Base UI.
|
|
3347
|
+
* @param props.container Element, shadow root or ref to one the portal is
|
|
3348
|
+
* rendered into; the `body` when absent.
|
|
3349
|
+
* @param props.defaultOpen Initial open state of an uncontrolled tooltip;
|
|
3350
|
+
* `false` when absent.
|
|
3351
|
+
* @param props.delay Time the pointer hovers the trigger before the tooltip
|
|
3352
|
+
* opens, in milliseconds; `50` when absent, or that of the enclosing
|
|
3353
|
+
* `TooltipProvider`.
|
|
3354
|
+
* @param props.disabled Whether the tooltip stays closed; `false` when
|
|
3355
|
+
* absent.
|
|
3356
|
+
* @param props.fontSize Font size of the text, a step of the theme scale as
|
|
3357
|
+
* the `fontSize` of a `Typography`; `12` when absent.
|
|
3358
|
+
* @param props.fontWeight Font weight of the text, a step of the theme
|
|
3359
|
+
* scale as the `fontWeight` of a `Typography`; `regular` when absent.
|
|
3360
|
+
* @param props.interactive Whether the tooltip stays open while the pointer
|
|
3361
|
+
* moves onto it; `true` when absent.
|
|
3362
|
+
* @param props.label Text of the tooltip, which describes the trigger.
|
|
3363
|
+
* @param props.onOpenChange Called with the requested open state and the
|
|
3364
|
+
* details of the change.
|
|
3365
|
+
* @param props.open Controlled open state.
|
|
3366
|
+
* @param props.side Side of the trigger; `top` when absent.
|
|
3367
|
+
* @param props.sideOffset Distance from the trigger, in pixels; `4` when
|
|
3368
|
+
* absent, `10` with an arrow, whose tip then stands 4 pixels away.
|
|
3369
|
+
* @param props.variant Look of the tooltip: `contained`, the inverse
|
|
3370
|
+
* surface, or `outlined`, the elevated surface with an outline and a
|
|
3371
|
+
* shadow, as a `Popover.Content`; `contained` when absent.
|
|
3372
|
+
* @returns The trigger, and the tooltip in a portal while it is open.
|
|
3373
|
+
* @throws {Error} When the child is not a single element, or is a fragment.
|
|
3374
|
+
*/
|
|
3375
|
+
export declare const Tooltip: FC<TooltipProps>;
|
|
3376
|
+
|
|
3377
|
+
/** Alignment of a `Tooltip` along its side of the trigger: its start edge, its center or its end edge. */
|
|
3378
|
+
export declare type TooltipAlign = PopupBaseAlign;
|
|
3379
|
+
|
|
3380
|
+
/** Font size of a `Tooltip`: a step of the font size scale of the theme, as the `fontSize` of a `Typography`. */
|
|
3381
|
+
export declare type TooltipFontSize = FontSizeToken;
|
|
3382
|
+
|
|
3383
|
+
/** Font weight of a `Tooltip`: a step of the font weight scale of the theme, as the `fontWeight` of a `Typography`. */
|
|
3384
|
+
export declare type TooltipFontWeight = FontWeightToken;
|
|
3385
|
+
|
|
3386
|
+
/**
|
|
3387
|
+
* Details of an open state change of a `Tooltip`, given by Base UI as the
|
|
3388
|
+
* second argument of `onOpenChange`: the cause of the change (`reason`,
|
|
3389
|
+
* such as `trigger-hover`, `trigger-focus`, `trigger-press` or
|
|
3390
|
+
* `escape-key`), the native `event` behind it, the `trigger` element, and
|
|
3391
|
+
* `cancel()`, which keeps the current state, with `isCanceled` telling
|
|
3392
|
+
* whether it was called. Those of the `Tooltip` of Base UI 1.9, passed as
|
|
3393
|
+
* they are.
|
|
3394
|
+
*/
|
|
3395
|
+
export declare type TooltipOpenChangeDetails = Tooltip_2.Root.ChangeEventDetails;
|
|
3396
|
+
|
|
3397
|
+
/** Called with the requested open state of a `Tooltip` and the details of the change. */
|
|
3398
|
+
declare type TooltipOpenChangeHandler = (open: boolean, eventDetails: TooltipOpenChangeDetails) => void;
|
|
3399
|
+
|
|
3400
|
+
/** Props a `Tooltip` handles itself, besides those of its popup. */
|
|
3401
|
+
declare type TooltipOwnProps = Readonly<{
|
|
3402
|
+
/** The trigger the tooltip describes: a single element rendering a native `button`, such as a `Button` or an `IconButton`, which keeps its own name, props and events. */
|
|
3403
|
+
children: ReactElement<TooltipTriggerChildProps>;
|
|
3404
|
+
/** Text of the tooltip, which describes the trigger; short and without interactive content, which a tooltip cannot hold. */
|
|
3405
|
+
label: ReactNode;
|
|
3406
|
+
/** Controlled open state; keep it always defined or absent, with `onOpenChange`. */
|
|
3407
|
+
open?: boolean | undefined;
|
|
3408
|
+
/** Initial open state of an uncontrolled tooltip; `false` when absent. */
|
|
3409
|
+
defaultOpen?: boolean | undefined;
|
|
3410
|
+
/** Called with the requested open state and the details of the change, whose `cancel()` keeps the current state, when the tooltip opens or closes, whatever the cause. */
|
|
3411
|
+
onOpenChange?: TooltipOpenChangeHandler | undefined;
|
|
3412
|
+
/** Keeps the tooltip closed, the trigger staying usable; `false` when absent. */
|
|
3413
|
+
disabled?: boolean | undefined;
|
|
3414
|
+
/** Time the pointer hovers the trigger before the tooltip opens, in milliseconds; `50` when absent, or the `delay` of the enclosing `TooltipProvider`. The keyboard focus opens it at once. */
|
|
3415
|
+
delay?: number | undefined;
|
|
3416
|
+
/** Time before the tooltip closes once the pointer leaves the trigger, in milliseconds; `0` when absent, or the `closeDelay` of the enclosing `TooltipProvider`. */
|
|
3417
|
+
closeDelay?: number | undefined;
|
|
3418
|
+
/** Whether the tooltip stays open while the pointer moves onto it, so its text stays readable; `true` when absent. With `false`, it closes as soon as the pointer leaves the trigger. */
|
|
3419
|
+
interactive?: boolean | undefined;
|
|
3420
|
+
/** Look of the tooltip: the inverse surface (`contained`), or the elevated surface with an outline and a shadow (`outlined`); `contained` when absent. */
|
|
3421
|
+
variant?: TooltipVariant | undefined;
|
|
3422
|
+
/** Font size of the text, a step of the theme scale as the `fontSize` of a `Typography`; `12` when absent. */
|
|
3423
|
+
fontSize?: TooltipFontSize | undefined;
|
|
3424
|
+
/** Font weight of the text, a step of the theme scale as the `fontWeight` of a `Typography`; `regular` when absent. */
|
|
3425
|
+
fontWeight?: TooltipFontWeight | undefined;
|
|
3426
|
+
/** Whether an arrow points from the tooltip to the trigger, the tooltip then standing further from the trigger by default; `false` when absent. */
|
|
3427
|
+
arrow?: boolean | undefined;
|
|
3428
|
+
/** Side of the trigger the tooltip is placed against; `top` when absent. */
|
|
3429
|
+
side?: TooltipSide | undefined;
|
|
3430
|
+
/** Alignment of the tooltip along its side of the trigger; `center` when absent. */
|
|
3431
|
+
align?: TooltipAlign | undefined;
|
|
3432
|
+
/** Shift of the tooltip along its side of the trigger, in pixels, from the alignment; `0` when absent. */
|
|
3433
|
+
alignOffset?: number | undefined;
|
|
3434
|
+
/** Distance between the trigger and the tooltip, in pixels; `4` when absent, `10` with an arrow, whose tip then stands 4 pixels away. */
|
|
3435
|
+
sideOffset?: number | undefined;
|
|
3436
|
+
/** Space kept between the tooltip and the edges of the viewport when it is moved to stay in it, in pixels, one number or one per side (`top`, `right`, `bottom`, `left`); `5` when absent, as in Base UI. */
|
|
3437
|
+
collisionPadding?: Tooltip_2.Positioner.Props['collisionPadding'];
|
|
3438
|
+
/** Element, shadow root or ref to one the tooltip is rendered into, in a portal; the `body` when absent. */
|
|
3439
|
+
container?: Tooltip_2.Portal.Props['container'];
|
|
3440
|
+
/** Classes added after the generated ones, on the popup. */
|
|
3441
|
+
className?: string | undefined;
|
|
3442
|
+
/** Inline styles of the popup. */
|
|
3443
|
+
style?: CSSProperties | undefined;
|
|
3444
|
+
}>;
|
|
3445
|
+
|
|
3446
|
+
/**
|
|
3447
|
+
* Props of a `Tooltip`: its trigger (`children`), its text (`label`), its
|
|
3448
|
+
* open state, its look (`variant`, `fontSize`, `fontWeight`, `arrow`), its
|
|
3449
|
+
* placement (`side`, `align`, `alignOffset`, `sideOffset`,
|
|
3450
|
+
* `collisionPadding`), its hover delays (`delay`, `closeDelay`, `interactive`) and its portal `container`, then
|
|
3451
|
+
* the attributes, events and `ref` of its popup, a `div` with the `tooltip`
|
|
3452
|
+
* role, but its content, its `id` and its `role`, set by the tooltip, and
|
|
3453
|
+
* the legacy `color` attribute.
|
|
3454
|
+
*/
|
|
3455
|
+
export declare type TooltipProps = TooltipOwnProps & Readonly<Omit<ComponentPropsWithRef<'div'>, keyof TooltipOwnProps | BoxComponentExcludedAttribute | 'id' | 'role'>>;
|
|
3456
|
+
|
|
3457
|
+
/**
|
|
3458
|
+
* Groups the tooltips it wraps, such as those of a toolbar: once one is
|
|
3459
|
+
* open, moving the pointer to another trigger of the group opens its
|
|
3460
|
+
* tooltip at once, without the hover delay, until `timeout` has passed since
|
|
3461
|
+
* the last one closed. It renders no element of its own. Its `delay` and
|
|
3462
|
+
* `closeDelay` apply to the tooltips of the group that do not set their own.
|
|
3463
|
+
* A `Tooltip` needs no provider on its own.
|
|
3464
|
+
*
|
|
3465
|
+
* @param props Tooltips of the group and their delays.
|
|
3466
|
+
* @param props.children The tooltips of the group, at any depth.
|
|
3467
|
+
* @param props.closeDelay Time before a tooltip closes once the pointer
|
|
3468
|
+
* leaves its trigger, in milliseconds; `0` when absent.
|
|
3469
|
+
* @param props.delay Time the pointer hovers a trigger before its tooltip
|
|
3470
|
+
* opens, in milliseconds; `50` when absent.
|
|
3471
|
+
* @param props.timeout Time after a tooltip closes during which another
|
|
3472
|
+
* opens at once, in milliseconds; `400` when absent.
|
|
3473
|
+
* @returns The tooltips of the group.
|
|
3474
|
+
*/
|
|
3475
|
+
export declare const TooltipProvider: FC<TooltipProviderProps>;
|
|
3476
|
+
|
|
3477
|
+
/** Props of a `TooltipProvider`. */
|
|
3478
|
+
export declare type TooltipProviderProps = Readonly<{
|
|
3479
|
+
/** The tooltips of the group, at any depth. */
|
|
3480
|
+
children: ReactNode;
|
|
3481
|
+
/** Time the pointer hovers a trigger of the group before its tooltip opens, in milliseconds, unless the `Tooltip` sets its own; `50` when absent. */
|
|
3482
|
+
delay?: number | undefined;
|
|
3483
|
+
/** Time before a tooltip of the group closes once the pointer leaves its trigger, in milliseconds, unless the `Tooltip` sets its own; `0` when absent. */
|
|
3484
|
+
closeDelay?: number | undefined;
|
|
3485
|
+
/** Time after a tooltip of the group closes during which another opens at once, without `delay`, in milliseconds; `400` when absent, as in Base UI. */
|
|
3486
|
+
timeout?: number | undefined;
|
|
3487
|
+
}>;
|
|
3488
|
+
|
|
3489
|
+
/**
|
|
3490
|
+
* Side of the trigger a `Tooltip` is placed against: above it (`top`),
|
|
3491
|
+
* below it (`bottom`), on its left (`left` or `inline-start`) or on its
|
|
3492
|
+
* right (`right` or `inline-end`). The tooltip moves to the opposite side
|
|
3493
|
+
* when it lacks room.
|
|
3494
|
+
*/
|
|
3495
|
+
export declare type TooltipSide = PopupBaseSide;
|
|
3496
|
+
|
|
3497
|
+
/** Props the element a `Tooltip` describes may hold, which the tooltip completes. */
|
|
3498
|
+
declare type TooltipTriggerChildProps = Readonly<{
|
|
3499
|
+
/** Identifiers of the descriptions of the trigger, kept before that of the tooltip while it is open. */
|
|
3500
|
+
'aria-describedby'?: string | undefined;
|
|
3501
|
+
}>;
|
|
3502
|
+
|
|
3503
|
+
/**
|
|
3504
|
+
* Variant of a `Tooltip`: the inverse surface of the theme (`contained`),
|
|
3505
|
+
* or the elevated surface with an outline and a shadow, as a
|
|
3506
|
+
* `Popover.Content` (`outlined`).
|
|
3507
|
+
*/
|
|
3508
|
+
export declare type TooltipVariant = (typeof tooltipVariants)[number];
|
|
3509
|
+
|
|
3510
|
+
/**
|
|
3511
|
+
* Variants a `Tooltip` takes, the first being the default: the inverse
|
|
3512
|
+
* surface of the theme, or the elevated surface with an outline and a
|
|
3513
|
+
* shadow, as a `Popover.Content`.
|
|
3514
|
+
*/
|
|
3515
|
+
declare const tooltipVariants: readonly ["contained", "outlined"];
|
|
3516
|
+
|
|
3517
|
+
/**
|
|
3518
|
+
* Props of a trigger or close part rendering its single child (`asChild`),
|
|
3519
|
+
* which must render the same native element, such as a `Button` for a
|
|
3520
|
+
* `button` or a `Link` for an `a`: the attributes, events and `ref` of the
|
|
3521
|
+
* part, merged onto the child.
|
|
3522
|
+
*/
|
|
3523
|
+
declare type TriggerBaseAsChildProps<TElement extends TriggerBaseElement = 'button'> = TriggerBaseNativeProps<TElement> & Readonly<{
|
|
3524
|
+
/** Renders the single child, with the props of the part merged onto it. */
|
|
3525
|
+
asChild: true;
|
|
3526
|
+
/** Single element rendering the native element of the part, such as a `Button` for a `button` or a `Link` for an `a`, which receives the props of the part. */
|
|
3527
|
+
children: ReactElement;
|
|
3528
|
+
}>;
|
|
3529
|
+
|
|
3530
|
+
/**
|
|
3531
|
+
* Component of the library given as an example of the child a trigger or
|
|
3532
|
+
* close part takes with `asChild`, by native element the part renders: a
|
|
3533
|
+
* `Link` for an `a`, a `Button` for a `button`.
|
|
3534
|
+
*/
|
|
3535
|
+
declare const triggerBaseChildExamples: {
|
|
3536
|
+
readonly a: "Link";
|
|
3537
|
+
readonly button: "Button";
|
|
3538
|
+
};
|
|
3539
|
+
|
|
3540
|
+
/** Native element a trigger or close part renders, or its child with `asChild`: a `button`, or an `a` for a link. */
|
|
3541
|
+
declare type TriggerBaseElement = keyof typeof triggerBaseChildExamples;
|
|
3542
|
+
|
|
3543
|
+
/**
|
|
3544
|
+
* Attributes, events and `ref` of the native element a trigger or close
|
|
3545
|
+
* part renders or merges onto its child, but its content.
|
|
3546
|
+
*/
|
|
3547
|
+
declare type TriggerBaseNativeProps<TElement extends TriggerBaseElement = 'button'> = Readonly<Omit<ComponentPropsWithRef<TElement>, 'children'>>;
|
|
3548
|
+
|
|
3549
|
+
/**
|
|
3550
|
+
* Props of a trigger or close part rendering its own native element: its
|
|
3551
|
+
* content, then the attributes, events and `ref` of the element.
|
|
3552
|
+
*/
|
|
3553
|
+
declare type TriggerBaseProps<TElement extends TriggerBaseElement = 'button'> = TriggerBaseNativeProps<TElement> & Readonly<{
|
|
3554
|
+
/** Renders the single child instead of the native element when true; absent or false here. */
|
|
3555
|
+
asChild?: false | undefined;
|
|
3556
|
+
/** Content of the native element, which names it. */
|
|
3557
|
+
children?: ReactNode;
|
|
3558
|
+
}>;
|
|
3559
|
+
|
|
3560
|
+
export { }
|