Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/FUNDING.yml

This file was deleted.

16 changes: 0 additions & 16 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

17 changes: 17 additions & 0 deletions src/Accordion.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,39 @@
final class Accordion extends Widget
{
private const CLASS_BODY = 'accordion-body';

private const CLASS_COLLAPSE = 'accordion-collapse collapse';

private const CLASS_HEADER = 'accordion-header';

private const CLASS_ITEM = 'accordion-item';

private const CLASS_TOGGLE = 'accordion-button';

private const CLASS_TOGGLE_ACTIVE = 'collapsed';

private const NAME = 'accordion';

private bool $alwaysOpen = false;

private array $attributes = [];

private array $bodyAttributes = [];

private array $collapseAttributes = [];

private array $cssClasses = [];

private array $headerAttributes = [];

private string $headerTag = 'h2';

private bool|string $id = true;

private array $items = [];

private array $togglerAttributes = [];

private string|null $togglerTag = null;

/**
Expand Down
15 changes: 15 additions & 0 deletions src/Alert.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,35 @@
final class Alert extends Widget
{
private const CLASS_CLOSE_BUTTON = 'btn-close';

private const NAME = 'alert';

private array $attributes = [];

private AlertVariant $alertType = AlertVariant::SECONDARY;

private string|Stringable $body = '';

private array $cssClasses = [];

private array $closeButtonAttributes = [];

private string|null $closeButtonTag = null;

private string $closeButtonLabel = '';

private bool $dismissable = false;

private bool $fade = false;

private string|null $header = null;

private array $headerAttributes = [];

private string $headerTag = 'h4';

private bool|string $id = true;

private string $templateContent = "\n{header}\n{body}\n{toggler}\n";

/**
Expand Down
10 changes: 10 additions & 0 deletions src/Breadcrumbs.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,25 @@
final class Breadcrumbs extends Widget
{
private const LIST_NAME = 'breadcrumb';

private const ITEM_NAME = 'breadcrumb-item';

private array $attributes = [];

private array $cssClasses = [];

private string $itemActiveClass = 'active';

private array $itemAttributes = [];

private array $linkAttributes = [];

private array $links = [];

private array $listAttributes = [];

private bool|string $listId = true;

private string $listTagName = 'ol';

/**
Expand Down
7 changes: 7 additions & 0 deletions src/Button.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,19 @@
final class Button extends Widget
{
private const NAME = 'btn';

private array $attributes = [];

private ButtonVariant|null $buttonVariant = ButtonVariant::SECONDARY;

private array $cssClasses = [];

private bool $disabled = false;

private bool|string $id = true;

private string|Stringable $label = '';

private A|ButtonTag|Input|null $tag = null;

/**
Expand Down
4 changes: 4 additions & 0 deletions src/ButtonGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,14 @@
final class ButtonGroup extends Widget
{
private const NAME = 'btn-group';

private array $attributes = [];

/** psalm-var Button[]|Checkbox[]|Radio[] $buttons */
private array $buttons = [];

private array $cssClasses = [];

private bool|string $id = true;

/**
Expand Down
4 changes: 4 additions & 0 deletions src/ButtonToolbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,14 @@
final class ButtonToolbar extends Widget
{
private const NAME = 'btn-toolbar';

private array $attributes = [];

/** @psalm-var ButtonGroup[]|Tag[] $buttonGroups */
private array $buttonGroups = [];

private array $cssClasses = [];

private bool|string $id = true;

/**
Expand Down
20 changes: 20 additions & 0 deletions src/Carousel.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,26 +38,46 @@
final class Carousel extends Widget
{
private const CLASS_CAROUSEL_CAPTION = 'carousel-caption d-none d-md-block';

private const CLASS_CAROUSEL_CONTROL_NEXT = 'carousel-control-next';

private const CLASS_CAROUSEL_CONTROL_NEXT_ICON = 'carousel-control-next-icon';

private const CLASS_CAROUSEL_CONTROL_PREV = 'carousel-control-prev';

private const CLASS_CAROUSEL_CONTROL_PREV_ICON = 'carousel-control-prev-icon';

private const CLASS_CAROUSEL_INDICATORS = 'carousel-indicators';

private const CLASS_CAROUSEL_INNER = 'carousel-inner';

private const CLASS_CAROUSEL_ITEM = 'carousel-item';

private const CLASS_IMAGE = 'd-block w-100';

private const CLASS_SLIDE = 'slide';

private const NAME = 'carousel';

private array $attributes = [];

private array $cssClasses = [];

private bool $controls = true;

private string $captionTagName = 'h5';

private string $captionPlaceholderTagName = 'p';

private string $controlNextLabel = 'Next';

private string $controlPreviousLabel = 'Previous';

private bool|string $id = true;

/** @psalm-var CarouselItem[] */
private array $items = [];

private bool $showIndicators = false;

/**
Expand Down
11 changes: 11 additions & 0 deletions src/Collapse.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,28 @@
final class Collapse extends Widget
{
private const NAME = 'collapse';

private const CARD = 'card';

private const CARD_BODY = 'card-body';

private const COLLAPSE_MULTIPLE = 'multi-collapse';

private array $attributes = [];

private array $cardBodyAttributes = [];

private bool $container = true;

private array $containerAttributes = [];

private array $cssClasses = [];

/** @var Toggler[] */
private array $items = [];

private string $togglerContainerTag = 'p';

private array $togglerContainerAttributes = [];

/**
Expand Down
30 changes: 30 additions & 0 deletions src/Dropdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,36 +41,66 @@
final class Dropdown extends Widget
{
private const DROPDOWN_CLASS = 'dropdown';

private const DROPDOWN_ITEM_ACTIVE_CLASS = 'active';

private const DROPDOWN_ITEM_CLASS = 'dropdown-item';

private const DROPDOWN_ITEM_DISABLED_CLASS = 'disabled';

private const DROPDOWN_ITEM_DIVIDER_CLASS = 'dropdown-divider';

private const DROPDOWN_ITEM_HEADER_CLASS = 'dropdown-header';

private const DROPDOWN_ITEM_TEXT_CLASS = 'dropdown-item-text';

private const DROPDOWN_LIST_CLASS = 'dropdown-menu';

private const DROPDOWN_TOGGLER_BUTTON_CLASS = 'btn';

private const DROPDOWN_TOGGLER_CLASS = 'dropdown-toggle';

private const DROPDOWN_TOGGLER_CONTAINER_CLASS = 'btn-group';

private const DROPDOWN_TOGGLER_SPAN_CLASS = 'visually-hidden';

private const DROPDOWN_TOGGLER_SPLIT_CLASS = 'dropdown-toggle-split';

private const NAME = 'dropdown';

private array $alignmentClasses = [];

private array $attributes = [];

private array $cssClasses = [];

private bool $container = true;

private array $containerClasses = [self::DROPDOWN_CLASS];

/** @psalm-var DropdownItem[] */
private array $items = [];

private string|Stringable $toggler = '';

private array $togglerAttributes = [];

private array $togglerClasses = [];

private string $togglerContent = 'Dropdown button';

private bool|string $togglerId = false;

private bool $togglerLink = false;

private string $togglerUrl = '#';

private string|null $togglerSize = null;

private bool $togglerSplit = false;

private string $togglerSplitContent = 'Action';

private ButtonVariant|null $togglerVariant = ButtonVariant::SECONDARY;

/**
Expand Down
23 changes: 23 additions & 0 deletions src/Modal.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,28 +44,51 @@
final class Modal extends Widget
{
private const CLASS_CLOSE_BUTTON = 'btn-close';

private const NAME = 'modal';

private const MODAL_BODY = 'modal-body';

private const MODAL_CONTENT = 'modal-content';

private const MODAL_DIALOG = 'modal-dialog';

private const MODAL_FOOTER = 'modal-footer';

private const MODAL_HEADER = 'modal-header';

private const MODAL_TITLE = 'modal-title';

private array $attributes = [];

private string $body = '';

private array $bodyAttributes = [];

private array $closeButtonAttributes = [];

private string $closeButtonLabel = '';

private array $contentAttributes = [];

private array $cssClasses = [];

private array $dialogAttributes = [];

private array $dialogClasses = [];

private string $footer = '';

private array $footerAttributes = [];

private array $headerAttributes = [];

private bool|string $id = true;

private string $responsive = '';

private string|Stringable $title = '';

private string|Stringable $triggerButton = '';

/**
Expand Down
Loading
Loading