Restructure `ui` into just `elements` and `components` (#3023)

Marshall Bowers and Nate Butler created

This PR restructures the `ui` crate into just `elements` and
`components`.

This was already done on the `gpui2-ui` branch, just getting it onto
`main`.

Release Notes:

- N/A

---------

Co-authored-by: Nate Butler <nate@zed.dev>

Change summary

crates/ui/src/components.rs                 | 22 ++++++++++++++++++++++
crates/ui/src/components/chat_panel.rs      |  0 
crates/ui/src/components/collab_panel.rs    |  0 
crates/ui/src/components/command_palette.rs |  0 
crates/ui/src/components/icon_button.rs     |  0 
crates/ui/src/components/list.rs            |  0 
crates/ui/src/components/palette.rs         |  0 
crates/ui/src/components/project_panel.rs   |  0 
crates/ui/src/components/status_bar.rs      |  0 
crates/ui/src/components/tab_bar.rs         |  0 
crates/ui/src/components/title_bar.rs       |  0 
crates/ui/src/components/workspace.rs       |  0 
crates/ui/src/elements.rs                   |  2 --
crates/ui/src/lib.rs                        |  4 ----
crates/ui/src/modules.rs                    |  5 -----
crates/ui/src/templates.rs                  | 17 -----------------
16 files changed, 22 insertions(+), 28 deletions(-)

Detailed changes

crates/ui/src/components.rs 🔗

@@ -1,22 +1,44 @@
 mod breadcrumb;
+mod chat_panel;
+mod collab_panel;
+mod command_palette;
 mod facepile;
 mod follow_group;
+mod icon_button;
+mod list;
 mod list_item;
 mod list_section_header;
+mod palette;
 mod palette_item;
+mod project_panel;
+mod status_bar;
 mod tab;
+mod tab_bar;
+mod title_bar;
 mod toolbar;
 mod traffic_lights;
+mod workspace;
 
 pub use breadcrumb::*;
+pub use chat_panel::*;
+pub use collab_panel::*;
+pub use command_palette::*;
 pub use facepile::*;
 pub use follow_group::*;
+pub use icon_button::*;
+pub use list::*;
 pub use list_item::*;
 pub use list_section_header::*;
+pub use palette::*;
 pub use palette_item::*;
+pub use project_panel::*;
+pub use status_bar::*;
 pub use tab::*;
+pub use tab_bar::*;
+pub use title_bar::*;
 pub use toolbar::*;
 pub use traffic_lights::*;
+pub use workspace::*;
 
 use std::marker::PhantomData;
 use std::rc::Rc;

crates/ui/src/elements.rs 🔗

@@ -1,7 +1,6 @@
 mod avatar;
 mod details;
 mod icon;
-mod icon_button;
 mod indicator;
 mod input;
 mod label;
@@ -11,7 +10,6 @@ mod tool_divider;
 pub use avatar::*;
 pub use details::*;
 pub use icon::*;
-pub use icon_button::*;
 pub use indicator::*;
 pub use input::*;
 pub use label::*;

crates/ui/src/lib.rs 🔗

@@ -3,10 +3,8 @@
 mod components;
 mod element_ext;
 mod elements;
-mod modules;
 pub mod prelude;
 mod static_data;
-mod templates;
 mod theme;
 mod tokens;
 
@@ -14,8 +12,6 @@ pub use crate::theme::*;
 pub use components::*;
 pub use element_ext::*;
 pub use elements::*;
-pub use modules::*;
 pub use prelude::*;
 pub use static_data::*;
-pub use templates::*;
 pub use tokens::*;

crates/ui/src/templates.rs 🔗

@@ -1,17 +0,0 @@
-mod chat_panel;
-mod collab_panel;
-mod command_palette;
-mod project_panel;
-mod status_bar;
-mod tab_bar;
-mod title_bar;
-mod workspace;
-
-pub use chat_panel::*;
-pub use collab_panel::*;
-pub use command_palette::*;
-pub use project_panel::*;
-pub use status_bar::*;
-pub use tab_bar::*;
-pub use title_bar::*;
-pub use workspace::*;