Skip to content
This repository was archived by the owner on Dec 12, 2025. It is now read-only.

Commit 9500963

Browse files
Implement view switcher, button row, image row, and link row components
1 parent 4636727 commit 9500963

File tree

14 files changed

+112
-14
lines changed

14 files changed

+112
-14
lines changed

Resources/Private/Components/Molecule/BoxedData/Item/Item.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
22
<f:argument name="id" type="string" optional="{true}" default="" description="ID of the boxed data item" />
33
<f:argument name="label" type="string" optional="{false}" description="Label to apply to the boxed data item" />
4+
<f:argument name="hidden" type="bool" optional="{true}" default="{false}" description="Whether the item is hidden" />
45
<f:comment>The component commonly wraps around text and an optional "atom.button" with variants="{0: 'tinyicon', 1: 'unobserved', 2: 'sidelined'}".</f:comment>
56

6-
<div id="{id}">
7+
<div id="{id}" {f:if(condition: '{hidden} == \'{false}\'', then: 'hidden')}>
78
<dt>{label -> f:format.raw()}</dt>
89
<dd>
910
<f:slot />

Resources/Private/Components/Molecule/BoxedList/Item/Item.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
<f:argument name="url" type="string" optional="{false}" description="URL of the boxed list item" />
44
<f:argument name="label" type="string" optional="{false}" description="Label of the boxed list item" />
55
<f:argument name="context" type="string" optional="{false}" description="Context string of the boxed list item" />
6+
<f:argument name="hidden" type="bool" optional="{true}" default="{false}" description="Whether the item is hidden" />
67
<f:comment>The component commonly wraps around an optional "atom.button" with variants="{0: 'icon', 1: 'transparent', 2: 'sidelined'}".</f:comment>
78

8-
<li id="{id}">
9+
<li id="{id}" {f:if(condition: '{hidden} == \'{false}\'', then: 'hidden')}>
910
<f:slot />
1011
<f:if condition="{url}">
1112
<a href="{url}">
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
2+
<f:argument name="id" type="string" optional="{true}" default="" description="ID of the button row item" />
3+
<f:argument name="hidden" type="bool" optional="{true}" default="{false}" description="Whether the item is hidden" />
4+
<f:comment>Individual row item to use within a "molecule.buttonRow.wrap", usually wraps around "atom.button"s.</f:comment>
5+
6+
<li id="{id}" {f:if(condition: '{hidden} == \'{false}\'', then: 'hidden')}>
7+
<f:slot />
8+
</li>
9+
</html>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
2+
<f:argument name="id" type="string" optional="{true}" default="" description="ID of the button row" />
3+
<f:argument name="variants" type="string[]" optional="{true}" default="{}" description="Type of button row to produce (separate, nowrap)" />
4+
<f:argument name="areas" type="string[]" optional="{true}" default="{}" description="Area stylings to apply (slot-a, slot-b, slot-c, slot-d, align-left, align-left-above-900, align-left-below-900, align-left-above-600, align-left-below-600, align-center, align-center-above-900, align-center-below-900, align-center-above-600, align-center-below-600, align-right, align-right-above-900, align-right-below-900, align-right-above-600, align-right-below-600, align-top, align-middle, align-bottom)" />
5+
<f:argument name="function" type="string" optional="{true}" default="" description="JavaScript function to apply (watchlist-serialisations)" />
6+
<f:argument name="hidden" type="bool" optional="{true}" default="{false}" description="Whether the button row is hidden" />
7+
<f:comment>Component to align buttons in a row via "molecule.buttonRow.item"s.</f:comment>
8+
9+
<menu id="{id}" class="mdlr-buttonrow {f:if(condition: '{area} != \'\'', then: 'mdlr-area-{area} ') -> f:for(each: '{areas}', as: 'area')} {f:if(condition: '{variant} != \'\'', then: 'mdlr-variant-{variant} ') -> f:for(each: '{variants}', as: 'variant')} {f:if(condition: '{function} != \'\'', then: 'mdlr-function-{function}')}" {f:if(condition: '{hidden} == \'{false}\'', then: 'hidden')}>
10+
<f:slot />
11+
</menu>
12+
</html>

Resources/Private/Components/Molecule/Dropdown/Item/Item.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
<f:argument name="id" type="string" optional="{true}" default="" description="ID of the dropdown item" />
33
<f:argument name="role" type="string" optional="{true}" default="option" description="Role of the dropdown item (option)" />
44
<f:argument name="selected" type="bool" optional="{true}" default="{false}" description="Whether to set aria-selected to true" />
5+
<f:argument name="hidden" type="bool" optional="{true}" default="{false}" description="Whether the item is hidden" />
56
<f:comment>The component usually wraps around an "atom.button" with variants="{0: 'mini', 1: 'unobtrusive'}".</f:comment>
67

7-
<li id="{id}" role="{role}" aria-selected="{f:if(condition: '{selected}', then: 'true', else: 'false')}">
8+
<li id="{id}" role="{role}" aria-selected="{f:if(condition: '{selected}', then: 'true', else: 'false')}" {f:if(condition: '{hidden} == \'{false}\'', then: 'hidden')}>
89
<f:slot />
910
</li>
1011
</html>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
2+
<f:argument name="id" type="string" optional="{true}" default="" description="ID of the image row item" />
3+
<f:argument name="hidden" type="bool" optional="{true}" default="{false}" description="Whether the item is hidden" />
4+
<f:comment>Individual row item to use within a "molecule.imageRow.wrap", wraps around "atom.imageLink"s.</f:comment>
5+
6+
<li id="{id}" {f:if(condition: '{hidden} == \'{false}\'', then: 'hidden')}>
7+
<f:slot />
8+
</li>
9+
</html>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
2+
<f:argument name="id" type="string" optional="{true}" default="" description="ID of the image row" />
3+
<f:argument name="variants" type="string[]" optional="{true}" default="{}" description="Type of image row to produce (-)" />
4+
<f:argument name="areas" type="string[]" optional="{true}" default="{}" description="Area stylings to apply (slot-a, slot-b, slot-c, slot-d, align-left, align-left-above-900, align-left-below-900, align-left-above-600, align-left-below-600, align-center, align-center-above-900, align-center-below-900, align-center-above-600, align-center-below-600, align-right, align-right-above-900, align-right-below-900, align-right-above-600, align-right-below-600, align-top, align-middle, align-bottom)" />
5+
<f:argument name="function" type="string" optional="{true}" default="" description="JavaScript function to apply (-)" />
6+
<f:argument name="hidden" type="bool" optional="{true}" default="{false}" description="Whether the button row is hidden" />
7+
<f:comment>Component to align images in a row via "molecule.imageRow.item"s.</f:comment>
8+
9+
<ul id="{id}" class="mdlr-imagerow {f:if(condition: '{area} != \'\'', then: 'mdlr-area-{area} ') -> f:for(each: '{areas}', as: 'area')} {f:if(condition: '{variant} != \'\'', then: 'mdlr-variant-{variant} ') -> f:for(each: '{variants}', as: 'variant')} {f:if(condition: '{function} != \'\'', then: 'mdlr-function-{function}')}" {f:if(condition: '{hidden} == \'{false}\'', then: 'hidden')}>
10+
<f:slot />
11+
</ul>
12+
</html>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
2+
<f:argument name="id" type="string" optional="{true}" default="" description="ID of the link row item" />
3+
<f:argument name="pageUid" type="int" optional="{false}" description="Page UID of the link row item" />
4+
<f:argument name="active" type="bool" optional="{true}" default="{false}" description="Whether the nav item is currently active" />
5+
<f:argument name="text" type="string" optional="{false}" description="Label of the link row item" />
6+
<f:argument name="hint" type="string" optional="{true}" default="" description="Nav item title if different from the text" />
7+
<f:argument name="hidden" type="bool" optional="{true}" default="{false}" description="Whether the item is hidden" />
8+
<f:comment>Individual row item to use within a "molecule.linkRow.wrap".</f:comment>
9+
10+
<li id="{id}" {f:if(condition: '{hidden} == \'{false}\'', then: 'hidden')}>
11+
<f:link.page pageUid="{pageUid}" class="{f:if(condition: '{active}', then:'mdlr-variant-active')}" title="{f:if(condition: '{hint} != \'\'', then: '{hint}', else: '{text}')}">
12+
<span>{text}</span>
13+
</f:link.page>
14+
</li>
15+
</html>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
2+
<f:argument name="id" type="string" optional="{true}" default="" description="ID of the link row" />
3+
<f:argument name="variants" type="string[]" optional="{true}" default="{}" description="Type of link row to produce (-)" />
4+
<f:argument name="areas" type="string[]" optional="{true}" default="{}" description="Area stylings to apply (slot-a, slot-b, slot-c, slot-d, align-left, align-left-above-900, align-left-below-900, align-left-above-600, align-left-below-600, align-center, align-center-above-900, align-center-below-900, align-center-above-600, align-center-below-600, align-right, align-right-above-900, align-right-below-900, align-right-above-600, align-right-below-600, align-top, align-middle, align-bottom)" />
5+
<f:argument name="function" type="string" optional="{true}" default="" description="JavaScript function to apply (-)" />
6+
<f:argument name="hidden" type="bool" optional="{true}" default="{false}" description="Whether the button row is hidden" />
7+
<f:comment>Component to align links in a row via "molecule.linkRow.item"s.</f:comment>
8+
9+
<menu id="{id}" class="mdlr-linkrow {f:if(condition: '{area} != \'\'', then: 'mdlr-area-{area} ') -> f:for(each: '{areas}', as: 'area')} {f:if(condition: '{variant} != \'\'', then: 'mdlr-variant-{variant} ') -> f:for(each: '{variants}', as: 'variant')} {f:if(condition: '{function} != \'\'', then: 'mdlr-function-{function}')}" {f:if(condition: '{hidden} == \'{false}\'', then: 'hidden')}>
10+
<f:slot />
11+
</menu>
12+
</html>

Resources/Private/Components/Molecule/Pills/Item/Item.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
<f:argument name="url" type="string" optional="{false}" description="URL of the pill item" />
44
<f:argument name="text" type="string" optional="{false}" description="Label of the pill item" />
55
<f:argument name="hint" type="string" optional="{true}" default="" description="Pill title if different from the text" />
6+
<f:argument name="hidden" type="bool" optional="{true}" default="{false}" description="Whether the item is hidden" />
67
<f:comment>Individual pill to be used within a "molecule.pills.wrap".</f:comment>
78

8-
<li id="{id}">
9+
<li id="{id}" {f:if(condition: '{hidden} == \'{false}\'', then: 'hidden')}>
910
<a href="{url}" title="{f:if(condition: '{hint} != \'\'', then: '{hint}', else: '{text}')}">
1011
<span>{text}</span>
1112
</a>

0 commit comments

Comments
 (0)