Class: Ariadne::TableNavComponent::BaseCellItem::HeaderCellItem

Inherits:
Ariadne::TableNavComponent::BaseCellItem show all
Defined in:
app/components/ariadne/table_nav_component.rb

Overview

This component is part of TableNavComponent and should not be used as a standalone component.

Constant Summary collapse

DEFAULT_HEADER_CELL_CLASSES =
"ariadne-py-3.5 ariadne-pl-4 ariadne-pr-3 ariadne-text-left ariadne-text-sm ariadne-font-semibold ariadne-text-gray-900 sm:ariadne-pl-6 md:ariadne-pl-0"
DEFAULT_TAG =
:th
WIDTH_CLASSES =
{
  none: "ariadne-flex-none ariadne-w-14 ariadne-px-4",
  default: "ariadne-flex-initial",
  narrow: "ariadne-flex-initial ariadne-w-1/5 ariadne-text-right",
  wide: "ariadne-flex-grow ariadne-w-3/5 sm:ariadne-pl-6",
}

Constants inherited from Ariadne::TableNavComponent::BaseCellItem

DEFAULT_CELL_CLASSES

Constants inherited from Ariadne::TableNavComponent

DEFAULT_CLASSES

Constants inherited from Component

Component::BASE_HIDDEN_CLASS, Component::BASE_MAIN_CLASSES, Component::BASE_WRAPPER_CLASSES, Component::INVALID_ARIA_LABEL_TAGS

Constants included from ActionViewExtensions::FormHelper

ActionViewExtensions::FormHelper::DEFAULT_FORM_CLASSES

Constants included from Status::Dsl

Status::Dsl::STATUSES

Constants included from ViewHelper

ViewHelper::HELPERS

Constants included from FetchOrFallbackHelper

FetchOrFallbackHelper::INTEGER_TYPES, FetchOrFallbackHelper::InvalidValueError, FetchOrFallbackHelper::TRUE_OR_FALSE

Instance Attribute Summary

Attributes inherited from Ariadne::TableNavComponent::BaseCellItem

#first, #last

Instance Method Summary collapse

Methods inherited from Ariadne::TableNavComponent::BaseCellItem

#call

Methods inherited from Ariadne::TableNavComponent

#has_footer?, #has_header_row?

Methods included from ActionViewExtensions::FormHelper

#ariadne_form_with

Methods included from ClassNameHelper

#class_names

Methods included from LoggerHelper

#logger, #silence_deprecations?, #silence_warnings?

Methods included from FetchOrFallbackHelper

#check_incoming_attribute, #check_incoming_tag, #check_incoming_value, #fetch_or_raise, #fetch_or_raise_boolean, #fetch_or_raise_integer

Constructor Details

#initialize(classes: "", attributes: {}) ⇒ HeaderCellItem

TODO: add one_of check for width



213
214
215
216
217
218
# File 'app/components/ariadne/table_nav_component.rb', line 213

def initialize(classes: "", attributes: {})
  @tag = DEFAULT_TAG
  actual_classes = class_names(DEFAULT_HEADER_CELL_CLASSES, classes)
  attributes["scope"] = "col"
  super(classes: actual_classes, attributes: attributes)
end