#![warn(missing_docs)]
#![deny(rustdoc::broken_intra_doc_links)]
#[cfg(any(feature = "actions", feature = "selection", feature = "surfaces"))]
#[cfg_attr(
not(all(feature = "actions", feature = "selection", feature = "surfaces")),
allow(dead_code)
)]
mod action;
mod avatar;
#[cfg_attr(
not(any(feature = "actions", feature = "selection", feature = "surfaces")),
allow(dead_code)
)]
mod control_style;
mod display;
mod display_scrollbar;
mod empty_view;
mod ext;
mod icon;
#[cfg(any(feature = "feedback", feature = "inputs"))]
mod menu_appearance;
mod skeleton;
mod text;
mod tone;
pub use avatar::{Avatar, AvatarColors, AvatarGroup, AvatarShape, AvatarSize};
pub use control_style::ControlSize;
pub use display::{Badge, Divider};
pub use display_scrollbar::{
DisplayScrollbar, DisplayScrollbarFade, DisplayScrollbarStyle, ScrollbarHandle,
};
pub use empty_view::EmptyView;
pub use ext::MaterialElementExt;
pub use gpui_material_theme::LogicalEdges;
pub use icon::{Icon, IconName};
#[cfg(any(feature = "feedback", feature = "inputs"))]
pub use menu_appearance::MenuSurfaceStyle;
pub use skeleton::{Skeleton, SkeletonColors};
pub use text::Text;
pub use tone::SemanticTone;
#[cfg(feature = "actions")]
mod button;
#[cfg(feature = "actions")]
mod fab;
#[cfg(feature = "actions")]
#[doc(hidden)]
pub use button::composition as button_composition;
#[cfg(feature = "actions")]
pub use button::{
Button, ButtonShape, ButtonVariant, IconButton, IconButtonVariant, IconButtonWidth,
IconToggleButton, ToggleButton, ToggleButtonVariant,
};
#[cfg(feature = "actions")]
pub use control_style::ButtonColors;
#[cfg(any(feature = "actions", feature = "selection", feature = "surfaces"))]
pub use control_style::{ControlBorder, ControlElevations, ControlShapes};
#[cfg(feature = "actions")]
pub use fab::{
ExtendedFab, Fab, FabAlignment, FabColor, FabSize, FabVisibilityAnimation, FloatingAction,
};
#[cfg(feature = "selection")]
mod chip;
#[cfg(feature = "selection")]
mod selection;
#[cfg(feature = "selection")]
mod slider;
#[cfg(feature = "selection")]
pub use chip::{
Chip, ChipColors, ChipGroup, ChipGroupItem, ChipGroupSelection, ChipStateColors, ChipVariant,
};
#[cfg(feature = "selection")]
pub use selection::{
Checkbox, CheckboxColors, CheckboxState, CheckboxStateColors, Radio, RadioColors, RadioGroup,
Switch, SwitchColors, SwitchStateColors,
};
#[cfg(feature = "selection")]
pub use slider::{
RangeThumb, Slider, SliderColors, SliderEvent, SliderKind, SliderMarker, SliderScale,
SliderState, SliderThumbStyle, SliderTrackStyle, SliderValue,
};
#[cfg(feature = "surfaces")]
mod card;
#[cfg(any(feature = "surfaces", feature = "navigation"))]
mod drag_handle;
#[cfg(feature = "surfaces")]
mod drop_target;
#[cfg(feature = "surfaces")]
mod list;
#[cfg(feature = "surfaces")]
mod settings_tiles;
#[cfg(feature = "surfaces")]
mod swipe_to_dismiss;
#[cfg(feature = "surfaces")]
pub use card::{Card, CardColors, CardVariant};
#[cfg(any(feature = "surfaces", feature = "navigation"))]
pub use drag_handle::{DragHandleColors, DragHandleShapes, DragHandleSizes, VerticalDragHandle};
#[cfg(feature = "surfaces")]
pub use drop_target::{DropTarget, DropTargetColors};
#[cfg(feature = "surfaces")]
pub use list::{
List, ListItem, ListItemAlignment, ListItemColors, ListItemShapes, ListItemStateColors,
ListVariant,
};
#[cfg(feature = "settings-tiles")]
pub use settings_tiles::{
CheckboxTile, ChoiceOption, ChoiceTile, RadioTile, SliderTile, SwitchTile,
};
#[cfg(feature = "surfaces")]
pub use settings_tiles::{ListSection, ListSectionItem};
#[cfg(feature = "surfaces")]
pub use swipe_to_dismiss::{SwipeToDismiss, SwipeToDismissState, SwipeToDismissValue};
#[cfg(feature = "feedback")]
mod banner;
#[cfg(feature = "feedback")]
mod loading_indicator;
#[cfg(feature = "feedback")]
mod overlay;
#[cfg(feature = "feedback")]
mod progress;
#[cfg(feature = "feedback")]
mod pull_to_refresh;
#[cfg(feature = "feedback")]
pub use banner::{Banner, BannerColors};
#[cfg(feature = "feedback")]
pub use loading_indicator::{LoadingIndicator, LoadingIndicatorShape, LoadingIndicatorShapes};
#[cfg(feature = "feedback")]
pub use overlay::{
BottomSheetState, BottomSheetThresholds, BottomSheetValue, Dialog, DialogAction,
DialogCloseReason, DialogColors, DialogProperties, DialogState, DialogVariant, Label, Menu,
MenuColor, MenuItem, MenuItemStyle, Sheet, SheetClose, SheetColors, SheetEdge, SheetMode,
SheetPlacement, Snackbar, SnackbarColors, SnackbarHost, SnackbarId, SnackbarParts,
SnackbarResult, Tooltip, TooltipCaret, TooltipColors, TooltipPlacement, TooltipPositioner,
TooltipState,
};
#[cfg(feature = "feedback")]
pub use progress::{
CircularProgress, LinearProgress, ProgressCap, ProgressShape, ProgressStop, ProgressStroke,
};
#[cfg(feature = "feedback")]
pub use pull_to_refresh::{PullToRefresh, PullToRefreshProgress, PullToRefreshState};
#[cfg(feature = "inputs")]
mod input;
#[cfg(feature = "inputs")]
pub use input::{
DropdownAnchor, DropdownOption, ExposedDropdown, ExposedDropdownState, TextAreaState,
TextField, TextFieldColorOverrides, TextFieldColors, TextFieldEvent, TextFieldLabelAlignment,
TextFieldLabelPosition, TextFieldLayout, TextFieldMaskPattern, TextFieldObfuscationMode,
TextFieldState, TextFieldVariant,
};
#[cfg(feature = "navigation")]
mod navigation;
#[cfg(feature = "navigation")]
pub use navigation::{
AdaptiveNavigation, AdaptiveNavigationInfo, AdaptiveNavigationState, AdaptiveNavigationType,
AdaptiveNavigationVisibility, AdaptivePane, AdaptivePaneLayout, AdaptivePaneState, AppBar,
AppBarAlignment, AppBarColors, AppBarColumn, AppBarItem, AppBarMenuState, AppBarRow,
AppBarScrollBehavior, AppBarScrollState, AppBarVariant, BottomAppBar, BottomAppBarColors,
BreadcrumbItem, Breadcrumbs, BreadcrumbsColors, Feed, ListDetail, ListDetailPane,
NavigationBar, NavigationBarArrangement, NavigationBarColors, NavigationBarLayout,
NavigationDrawer, NavigationDrawerColors, NavigationDrawerEntry, NavigationDrawerMode,
NavigationDrawerSection, NavigationItem, NavigationItemColors, NavigationItemIconPosition,
NavigationItems, NavigationRail, NavigationRailArrangement, NavigationRailColors,
NavigationRailShapes, NavigationRailState, PaneAdaptStrategy, PaneBackBehavior,
PaneDestination, PaneExpansionAnchor, PaneLayoutDirective, PaneLayoutValue,
PaneOverlayAlignment, PanePlacement, PaneRole, PaneSeparator, RailModalOptions, RailMode,
Scaffold, ScaffoldContentLayout, ScaffoldFabPosition, StepItem, StepStatus, Stepper,
StepperColors, StepperOrientation, SupportingPane, TabIndicatorLayout, TabIndicatorStyle,
TabIndicatorWidth, TabVariant, Tabs, TabsColors,
};
pub fn init_components(cx: &mut gpui::App) {
#[cfg(feature = "feedback")]
overlay::init_tooltip(cx);
#[cfg(not(feature = "feedback"))]
let _ = cx;
}