mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-17 07:35:02 +00:00
84 lines
9.2 KiB
TOML
84 lines
9.2 KiB
TOML
# BEGIN craft-design-system (generated by `craft-design-lint clippy --write`; edit the template in craft-libs)
|
|
disallowed-methods = [
|
|
# Buttons and toggles -> craft_ui::controls
|
|
{ path = "egui::Ui::button", reason = "use craft_ui::controls::Button (or IconButton)", allow-invalid = true },
|
|
{ path = "egui::Ui::small_button", reason = "use craft_ui::controls::Button with ControlSize::Sm", allow-invalid = true },
|
|
{ path = "egui::Ui::checkbox", reason = "use craft_ui::controls::Checkbox", allow-invalid = true },
|
|
{ path = "egui::Ui::toggle_value", reason = "use craft_ui::controls::ToggleButton", allow-invalid = true },
|
|
{ path = "egui::Ui::radio", reason = "use craft_ui::choice::RadioGroup", allow-invalid = true },
|
|
{ path = "egui::Ui::radio_value", reason = "use craft_ui::choice::RadioGroup", allow-invalid = true },
|
|
{ path = "egui::Ui::selectable_label", reason = "use craft_ui::controls::Segmented, ToggleButton or craft_ui::list::ListRow", allow-invalid = true },
|
|
{ path = "egui::Ui::selectable_value", reason = "use craft_ui::controls::Segmented or craft_ui::list::ListRow", allow-invalid = true },
|
|
# Text and numbers
|
|
{ path = "egui::Ui::text_edit_singleline", reason = "use craft_ui::controls::TextField", allow-invalid = true },
|
|
{ path = "egui::Ui::text_edit_multiline", reason = "use craft_ui::controls::TextField::multiline", allow-invalid = true },
|
|
{ path = "egui::Ui::drag_angle", reason = "use craft_ui::value_drag::AngleDial", allow-invalid = true },
|
|
{ path = "egui::Ui::drag_angle_tau", reason = "use craft_ui::value_drag::AngleDial", allow-invalid = true },
|
|
# Separators, links, progress
|
|
{ path = "egui::Ui::separator", reason = "use craft_ui::primitives::Divider", allow-invalid = true },
|
|
{ path = "egui::Ui::spinner", reason = "use craft_ui::controls::Spinner", allow-invalid = true },
|
|
{ path = "egui::Ui::link", reason = "use craft_ui::controls::Link", allow-invalid = true },
|
|
{ path = "egui::Ui::hyperlink", reason = "use craft_ui::controls::Link", allow-invalid = true },
|
|
{ path = "egui::Ui::hyperlink_to", reason = "use craft_ui::controls::Link", allow-invalid = true },
|
|
# Disclosure and menus
|
|
{ path = "egui::Ui::collapsing", reason = "use craft_ui::sections::Section or craft_ui::list::ListRow", allow-invalid = true },
|
|
{ path = "egui::Ui::menu_button", reason = "use craft_ui::menu::Menu or MenuBar", allow-invalid = true },
|
|
# Colour editing
|
|
{ path = "egui::Ui::color_edit_button_srgba", reason = "use craft_ui::controls::Swatch with craft::color::ui::ColorPicker", allow-invalid = true },
|
|
{ path = "egui::Ui::color_edit_button_hsva", reason = "use craft_ui::controls::Swatch with craft::color::ui::ColorPicker", allow-invalid = true },
|
|
{ path = "egui::Ui::color_edit_button_srgb", reason = "use craft_ui::controls::Swatch with craft::color::ui::ColorPicker", allow-invalid = true },
|
|
{ path = "egui::Ui::color_edit_button_rgb", reason = "use craft_ui::controls::Swatch with craft::color::ui::ColorPicker", allow-invalid = true },
|
|
{ path = "egui::Ui::color_edit_button_srgba_premultiplied", reason = "use craft_ui::controls::Swatch with craft::color::ui::ColorPicker", allow-invalid = true },
|
|
{ path = "egui::Ui::color_edit_button_srgba_unmultiplied", reason = "use craft_ui::controls::Swatch with craft::color::ui::ColorPicker", allow-invalid = true },
|
|
{ path = "egui::Ui::color_edit_button_rgba_premultiplied", reason = "use craft_ui::controls::Swatch with craft::color::ui::ColorPicker", allow-invalid = true },
|
|
{ path = "egui::Ui::color_edit_button_rgba_unmultiplied", reason = "use craft_ui::controls::Swatch with craft::color::ui::ColorPicker", allow-invalid = true },
|
|
{ path = "egui::color_picker::color_edit_button_srgba", reason = "use craft_ui::controls::Swatch with craft::color::ui::ColorPicker", allow-invalid = true },
|
|
{ path = "egui::color_picker::color_edit_button_hsva", reason = "use craft_ui::controls::Swatch with craft::color::ui::ColorPicker", allow-invalid = true },
|
|
{ path = "egui::color_picker::color_edit_button_srgb", reason = "use craft_ui::controls::Swatch with craft::color::ui::ColorPicker", allow-invalid = true },
|
|
{ path = "egui::color_picker::color_edit_button_rgba", reason = "use craft_ui::controls::Swatch with craft::color::ui::ColorPicker", allow-invalid = true },
|
|
{ path = "egui::color_picker::color_edit_button_rgb", reason = "use craft_ui::controls::Swatch with craft::color::ui::ColorPicker", allow-invalid = true },
|
|
{ path = "egui::color_picker::color_picker_color32", reason = "use craft::color::ui::ColorPicker", allow-invalid = true },
|
|
{ path = "egui::color_picker::color_picker_hsva_2d", reason = "use craft::color::ui::ColorPicker", allow-invalid = true },
|
|
# Tooltips (stock tooltips are styled but carry no accessible description)
|
|
{ path = "egui::Response::on_hover_text", reason = "use craft_ui::contract::Props::tooltip", allow-invalid = true },
|
|
{ path = "egui::Response::on_hover_text_at_pointer", reason = "use craft_ui::contract::Props::tooltip with TooltipSpec::at(TooltipAt::Pointer)", allow-invalid = true },
|
|
{ path = "egui::Response::on_disabled_hover_text", reason = "use craft_ui::contract::Props::tooltip", allow-invalid = true },
|
|
{ path = "egui::Response::on_hover_ui", reason = "use craft_ui::contract::Show::show_with_tip", allow-invalid = true },
|
|
{ path = "egui::Response::on_hover_ui_at_pointer", reason = "use craft_ui::contract::Show::show_with_tip", allow-invalid = true },
|
|
{ path = "egui::Response::on_disabled_hover_ui", reason = "use craft_ui::contract::Show::show_with_tip", allow-invalid = true },
|
|
{ path = "egui::Response::show_tooltip_text", reason = "use craft_ui::contract::Props::tooltip with TooltipSpec::when(TooltipWhen::Now)", allow-invalid = true },
|
|
{ path = "egui::Response::show_tooltip_ui", reason = "use craft_ui::contract::Show::show_with_tip", allow-invalid = true },
|
|
# Raw colour constructors -> semantic tokens: Tokens::of(ui).color.<group>.<name>.to_egui()
|
|
{ path = "egui::Color32::from_rgb", reason = "take colours from tokens: Tokens::of(ui).color.<group>.<name>.to_egui()", allow-invalid = true },
|
|
{ path = "egui::Color32::from_rgb_additive", reason = "take colours from tokens", allow-invalid = true },
|
|
{ path = "egui::Color32::from_rgba_unmultiplied", reason = "take colours from tokens; for alpha use Color32::gamma_multiply on a token colour", allow-invalid = true },
|
|
{ path = "egui::Color32::from_rgba_premultiplied", reason = "take colours from tokens", allow-invalid = true },
|
|
{ path = "egui::Color32::from_gray", reason = "take colours from tokens", allow-invalid = true },
|
|
{ path = "egui::Color32::from_black_alpha", reason = "take colours from tokens (scrim, shadow, overlay tokens)", allow-invalid = true },
|
|
{ path = "egui::Color32::from_white_alpha", reason = "take colours from tokens (state layers, overlay tokens)", allow-invalid = true },
|
|
{ path = "egui::Color32::from_hex", reason = "take colours from tokens", allow-invalid = true },
|
|
{ path = "egui::Rgba::from_rgb", reason = "take colours from tokens", allow-invalid = true },
|
|
{ path = "egui::Rgba::from_rgba_unmultiplied", reason = "take colours from tokens", allow-invalid = true },
|
|
]
|
|
disallowed-types = [
|
|
{ path = "egui::Button", reason = "use craft_ui::controls::Button or IconButton", allow-invalid = true },
|
|
{ path = "egui::Checkbox", reason = "use craft_ui::controls::Checkbox", allow-invalid = true },
|
|
{ path = "egui::RadioButton", reason = "use craft_ui::choice::RadioGroup", allow-invalid = true },
|
|
{ path = "egui::DragValue", reason = "use craft_ui::controls::NumberField", allow-invalid = true },
|
|
{ path = "egui::Slider", reason = "use craft_ui::controls::Slider", allow-invalid = true },
|
|
{ path = "egui::RangeSlider", reason = "use craft_ui::controls::RangeSlider", allow-invalid = true },
|
|
{ path = "egui::TextEdit", reason = "use craft_ui::controls::TextField (multi-line: TextField::multiline) or TextField::search", allow-invalid = true },
|
|
{ path = "egui::ProgressBar", reason = "use craft_ui::controls::Progress", allow-invalid = true },
|
|
{ path = "egui::Spinner", reason = "use craft_ui::controls::Spinner", allow-invalid = true },
|
|
{ path = "egui::Hyperlink", reason = "use craft_ui::controls::Link", allow-invalid = true },
|
|
{ path = "egui::Link", reason = "use craft_ui::controls::Link", allow-invalid = true },
|
|
{ path = "egui::Separator", reason = "use craft_ui::primitives::Divider", allow-invalid = true },
|
|
{ path = "egui::CollapsingHeader", reason = "use craft_ui::sections::Section or craft_ui::list::ListRow", allow-invalid = true },
|
|
{ path = "egui::ComboBox", reason = "use craft_ui::controls::Select (or ComboBox for editable text): egui's combo box menu can't grow back while open (egui#5225)", allow-invalid = true },
|
|
{ path = "egui::containers::menu::MenuBar", reason = "use craft_ui::menu::MenuBar", allow-invalid = true },
|
|
{ path = "egui::containers::menu::MenuButton", reason = "use craft_ui::menu::Menu", allow-invalid = true },
|
|
{ path = "egui::containers::menu::SubMenu", reason = "use craft_ui::menu::MenuItem submenus", allow-invalid = true },
|
|
{ path = "egui::containers::menu::SubMenuButton", reason = "use craft_ui::menu::MenuItem submenus", allow-invalid = true },
|
|
]
|
|
# END craft-design-system
|