Class: Primer::Component
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Primer::Component
- Includes:
- AttributesHelper, Audited::Dsl, ClassNameHelper, ExperimentalRenderHelpers, ExperimentalSlotHelpers, FetchOrFallbackHelper, JoinStyleArgumentsHelper, Status::Dsl, TestSelectorHelper, ViewHelper, ViewComponent::PolymorphicSlots, ViewComponent::SlotableV2
- Defined in:
- app/components/primer/component.rb
Overview
:nocov:
Direct Known Subclasses
Alpha::ActionBar, Alpha::ActionBar::Divider, Alpha::ActionBar::Item, Alpha::ActionList, Alpha::ActionList::Divider, Alpha::ActionList::FormWrapper, Alpha::ActionList::Heading, Alpha::ActionList::Item, Alpha::ActionMenu, Alpha::ActionMenu::List, Alpha::AutoComplete, Alpha::AutoComplete::Item, Alpha::Banner, Alpha::ButtonMarketing, Alpha::CheckBox, Alpha::CheckBoxGroup, Alpha::Dialog, Alpha::Dialog::Body, Alpha::Dialog::Footer, Alpha::Dialog::Header, Alpha::Dropdown, Alpha::Dropdown::Menu, Alpha::Dropdown::Menu::Item, Alpha::FormButton, Alpha::FormControl, Alpha::HellipButton, Alpha::HiddenTextExpander, Alpha::Image, Alpha::Layout, Alpha::Layout::Main, Alpha::Layout::Sidebar, Alpha::Menu, Alpha::MultiInput, Alpha::Navigation::Tab, Alpha::OcticonSymbols, Alpha::Overlay, Alpha::Overlay::Body, Alpha::Overlay::Footer, Alpha::Overlay::Header, Alpha::RadioButton, Alpha::RadioButtonGroup, Alpha::SegmentedControl, Alpha::Select, Alpha::SelectPanel, Alpha::Stack, Alpha::StackItem, Alpha::SubmitButton, Alpha::TabContainer, Alpha::TabNav, Alpha::TabPanels, Alpha::TextArea, Alpha::TextField, Alpha::ToggleSwitch, Alpha::Tooltip, Alpha::UnderlineNav, Alpha::UnderlinePanels, BaseComponent, Beta::AutoComplete, Beta::AutoComplete::Item, Beta::Avatar, Beta::AvatarStack, Beta::BaseButton, Beta::Blankslate, Beta::BorderBox, Beta::BorderBox::Header, Beta::Breadcrumbs, Beta::Breadcrumbs::Item, Beta::Button, Beta::ButtonGroup, Beta::ButtonGroup::MenuButton, Beta::ClipboardCopy, Beta::CloseButton, Beta::Counter, Beta::Details, Beta::Flash, Beta::Heading, Beta::IconButton, Beta::Label, Beta::Link, Beta::Markdown, Beta::NavList, Beta::NavList::Heading, Beta::Octicon, Beta::Popover, Beta::ProgressBar, Beta::RelativeTime, Beta::Spinner, Beta::State, Beta::Subhead, Beta::Text, Beta::TimelineItem, Beta::TimelineItem::Badge, Beta::Truncate, Beta::Truncate::TruncateText, BlankslateComponent, Box, ButtonComponent, ConditionalWrapper, Content, IconButton, LayoutComponent, OpenProject::BorderGrid, OpenProject::BorderGrid::Cell, OpenProject::DangerConfirmationDialog, OpenProject::DangerConfirmationDialog::ConfirmationCheckBox, OpenProject::DangerConfirmationDialog::FormWrapper, OpenProject::DragHandle, OpenProject::FeedbackDialog, OpenProject::FeedbackMessage, OpenProject::FlexLayout, OpenProject::GridLayout, OpenProject::GridLayout::Area, OpenProject::InputGroup, OpenProject::PageHeader, OpenProject::PageHeader::Dialog, OpenProject::PageHeader::Menu, OpenProject::PageHeader::Title, OpenProject::SidePanel, OpenProject::SidePanel::Section, OpenProject::SubHeader, OpenProject::ZenModeButton, Tooltip, Truncate
Constant Summary collapse
- INVALID_ARIA_LABEL_TAGS =
[:div, :span, :p].freeze
Constants included from Status::Dsl
Constants included from ViewHelper
Constants included from TestSelectorHelper
TestSelectorHelper::TEST_SELECTOR_TAG
Constants included from FetchOrFallbackHelper
FetchOrFallbackHelper::InvalidValueError
Constants included from AttributesHelper
AttributesHelper::PLURAL_ARIA_ATTRIBUTES, AttributesHelper::PLURAL_DATA_ATTRIBUTES
Class Method Summary collapse
Methods included from JoinStyleArgumentsHelper
Methods included from TestSelectorHelper
Methods included from FetchOrFallbackHelper
#fetch_or_fallback, #fetch_or_fallback_boolean
Methods included from ClassNameHelper
Methods included from AttributesHelper
#aria, #data, #extract_data, #merge_aria, #merge_data, #merge_prefixed_attribute_hashes
Methods included from ExperimentalSlotHelpers
Methods included from ExperimentalRenderHelpers
Class Method Details
.deprecated? ⇒ Boolean
33 34 35 |
# File 'app/components/primer/component.rb', line 33 def self.deprecated? status == :deprecated end |
.generate_id(base_name: name.demodulize.underscore.dasherize) ⇒ Object
37 38 39 |
# File 'app/components/primer/component.rb', line 37 def self.generate_id(base_name: name.demodulize.underscore.dasherize) "#{base_name}-#{SecureRandom.uuid}" end |