<div class="kx-listgroup">
<ul class="kx-listgroup__list">
<li class="kx-listgroup__row">
<span></span>
<!-- SWITCH radio Component -->
<div class="kx-switch kx-switch--radio">
<label class="kx-switch__label" for="pacific-drilling--87811">
<input class="kx-switch__control kx-is-vishidden" type="radio" id="pacific-drilling--87811" name="example-listgroup-radio-group-name" />
<span class="kx-switch__fake" aria-hidden="true"></span>
<span class="kx-switch__label__txt">Pacific Drilling</span>
</label>
</div>
</li>
<li class="kx-listgroup__row">
<span></span>
<!-- SWITCH radio Component -->
<div class="kx-switch kx-switch--radio">
<label class="kx-switch__label" for="floatel-test--17440">
<input class="kx-switch__control kx-is-vishidden" type="radio" id="floatel-test--17440" name="example-listgroup-radio-group-name" />
<span class="kx-switch__fake" aria-hidden="true"></span>
<span class="kx-switch__label__txt">Floatel test</span>
</label>
</div>
</li>
<li class="kx-listgroup__row">
<span></span>
<!-- SWITCH radio Component -->
<div class="kx-switch kx-switch--radio">
<label class="kx-switch__label" for="maersk--97806">
<input class="kx-switch__control kx-is-vishidden" type="radio" id="maersk--97806" name="example-listgroup-radio-group-name" />
<span class="kx-switch__fake" aria-hidden="true"></span>
<span class="kx-switch__label__txt">Maersk</span>
</label>
</div>
</li>
<li class="kx-listgroup__row">
<span></span>
<!-- SWITCH radio Component -->
<div class="kx-switch kx-switch--radio">
<label class="kx-switch__label" for="bwo--79368">
<input class="kx-switch__control kx-is-vishidden" type="radio" id="bwo--79368" name="example-listgroup-radio-group-name" />
<span class="kx-switch__fake" aria-hidden="true"></span>
<span class="kx-switch__label__txt">BWO</span>
</label>
</div>
</li>
</ul>
</div>
<div class="kx-listgroup">
{% if title -%}
<header class="kx-listgroup__header">
<h4 class="kx-listgroup__title">
{{ title }}
</h4>
</header>
{% endif -%}
<ul class="kx-listgroup__list">
{% for row in rows -%}
<li class="kx-listgroup__row{% if row.selected %} kx-is-selected{% endif %}">
{% if row.href -%}
{% render '@button', { text: row.label, href: row.href, classes: ['kx-listgroup__link'] } %}
{% else -%}
<span>{{ row.label }}</span>
{% endif -%}
{% if row.metaData -%}
<span class="kx-listgroup__metadata">{{ row.metaData }}</span>
{% endif -%}
{% if row.badge -%}
{% render '@badge', { text: row.badge, skin: 'info' } -%}
{% endif -%}
{% if actions -%}
{% render '@button-group', actions -%}
{% endif -%}
{% if row.switch -%}
{% render '@switch', row.switch -%}
{% endif -%}
</li>
{% endfor -%}
</ul>
</div>
{
"title": null,
"rows": [
{
"switch": {
"label": "Pacific Drilling",
"type": "radio",
"name": "example-listgroup-radio-group-name"
}
},
{
"switch": {
"label": "Floatel test",
"type": "radio",
"name": "example-listgroup-radio-group-name"
}
},
{
"switch": {
"label": "Maersk",
"type": "radio",
"name": "example-listgroup-radio-group-name"
}
},
{
"switch": {
"label": "BWO",
"type": "radio",
"name": "example-listgroup-radio-group-name"
}
}
],
"href": null,
"selected": null,
"status": null,
"metadata": null,
"switch": null
}
-
Content:
// ========================================================================== // Component: listgroup // ========================================================================== // Elements (children) // ========================================================================== .kx-listgroup__title { @include p(mini, base); @include type-scale(base); @include type-weight(regular); flex-grow: 1; text-transform: uppercase; color: $color-gray-06; } .kx-listgroup__link { @include p(mini, base); @include flex; flex-grow: 1; color: inherit; text-decoration: none; .kx-btn__inner { @include justify-content-start; } } .kx-listgroup__actions { @include mr(tiny, $spacing-important: true); } .kx-listgroup__metadata { @include type-scale(small); color: $color-gray-06; } .kx-listgroup__row { @include flex; @include align-items-center; @include flex-row; position: relative; //background-color: $color-listgroup-row-bg; box-shadow: 0 -1px 0 0 $color-listgroup-row-border inset; &:first-child { box-shadow: 0 -1px 0 0 $color-listgroup-row-border inset, 0 1px 0 0 $color-listgroup-row-border inset; } &.kx-is-selected { &:before { position: absolute; content: ''; flex: 0 0 auto; width: rem-calc(8); top: 0; bottom: 0; left: 0; background-color: $color-listgroup-row-bg-selected; } } > *:last-child { @include mr(base); } > .kx-switch { flex-grow: 1; margin: 0; .kx-switch__label { @include m(mini, base); flex-grow: 1; } } > .kx-switch--toggle { .kx-switch__fake { @include ml(auto); order: 1; + .kx-switch__label__txt { @include px(tiny, none); } } } &:hover { background-color: $color-listgroup-row-bg-hover; } } .kx-listgroup__list { @include reset-list; } // Block (parent) // ========================================================================== .kx-listgroup { position: relative; } // Modifiers // ==========================================================================
- URL: /components/raw/listgroup/_listgroup.scss
- Filesystem Path: src\components\01-listgroup\_listgroup.scss
- Size: 2.4 KB
- Handle: @listgroup--listgroup-radio
- Variants (9): Default , Selected , With Title , With Actions , With Badge , With Metadata , With Checkboxes , With Radio buttons , With Checkbox Toggle
- Preview:
- Filesystem Path: src\components\01-listgroup\listgroup.njk
- References (4): @button, @badge, @button-group, @switch
There are no notes for this item.