x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<div class="Polaris-LegacyCard Polaris-LegacyCard--withoutTitle"> <div class="Polaris-ResourceList__ResourceListWrapper"> <ul class="Polaris-ResourceList"> <li data-controller="polaris-resource-item" class="Polaris-ResourceItem__ListItem"> <div class="Polaris-ResourceItem__ItemWrapper"> <div data-action="click->polaris-resource-item#open" style="cursor: default;" class="Polaris-ResourceItem Polaris-ResourceItem--selectable"> <div style="--pc-box-border-color: transparent;--pc-box-border-style: solid;--pc-box-padding-block-end-xs: var(--p-space-3);--pc-box-padding-block-start-xs: var(--p-space-3);--pc-box-padding-inline-end-xs: var(--p-space-3);--pc-box-padding-inline-start-xs: var(--p-space-3);position: relative;z-index: var(--pc-resource-item-content-stacking-order)" class="Polaris-Box"> <div style="--pc-horizontal-grid-grid-template-columns-xs: 1fr auto" class="Polaris-HorizontalGrid"> <div style="--pc-horizontal-grid-gap-xs: var(--p-space-3);--pc-horizontal-grid-grid-template-columns-xs: auto 1fr" class="Polaris-HorizontalGrid"> <div style="--pc-horizontal-stack-align: ;--pc-horizontal-stack-wrap: wrap;--pc-horizontal-stack-gap-xs: var(--p-space-3)" class="Polaris-HorizontalStack"> <div style="--pc-bleed-margin-block-start-xs: var(--p-space-2);--pc-bleed-margin-block-end-xs: var(--p-space-2);--pc-bleed-margin-inline-start-xs: var(--p-space-3);--pc-bleed-margin-inline-end-xs: var(--p-space-3)" class="Polaris-Bleed"> <div style="--pc-box-border-color: transparent;--pc-box-border-style: solid;--pc-box-padding-block-end-xs: var(--p-space-2);--pc-box-padding-block-start-xs: var(--p-space-3);--pc-box-padding-inline-end-xs: var(--p-space-3);--pc-box-padding-inline-start-xs: var(--p-space-3);z-index: var(--pc-resource-item-content-stacking-order)" class="Polaris-Box"> <div> <label class="Polaris-Choice Polaris-Choice--labelHidden"> <span class="Polaris-Choice__Control"> <span class="Polaris-Checkbox Polaris-Checkbox--labelHidden"> <input type="checkbox" name="question[]" id="question_" value="answer1" aria-checked="false" class="Polaris-Checkbox__Input" /> <span class="Polaris-Checkbox__Backdrop"></span> <span class="Polaris-Checkbox__Icon"> <span class="Polaris-Icon"> <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 20 20" class="Polaris-Icon__Svg" focusable="false" aria-hidden="true"><path fill-rule="evenodd" d="M14.03 7.22a.75.75 0 0 1 0 1.06l-4.5 4.5a.75.75 0 0 1-1.06 0l-2.25-2.25a.75.75 0 1 1 1.06-1.06l1.72 1.72 3.97-3.97a.75.75 0 0 1 1.06 0Z"></path></svg> </span> </span> </span> </span> </label> </div> </div> </div> </div> <div style="--pc-horizontal-stack-align: ;--pc-horizontal-stack-block-align: center;--pc-horizontal-stack-wrap: wrap;--pc-horizontal-stack-gap-xs: var(--p-space-2)" class="Polaris-HorizontalStack"> <div style="--pc-box-border-color: transparent;--pc-box-border-style: solid;--pc-box-padding-block-end-xs: var(--p-space-0);--pc-box-padding-block-start-xs: var(--p-space-0);--pc-box-padding-inline-end-xs: var(--p-space-2);--pc-box-padding-inline-start-xs: var(--p-space-0);--pc-box-width: 100%" class="Polaris-Box"> <p>Regular checkbox</p> </div> </div> </div> </div> </div> </div> </div> </li> <li data-controller="polaris-resource-item" class="Polaris-ResourceItem__ListItem"> <div class="Polaris-ResourceItem__ItemWrapper"> <div data-action="click->polaris-resource-item#open" style="cursor: default;" class="Polaris-ResourceItem Polaris-ResourceItem--selectable"> <div style="--pc-box-border-color: transparent;--pc-box-border-style: solid;--pc-box-padding-block-end-xs: var(--p-space-3);--pc-box-padding-block-start-xs: var(--p-space-3);--pc-box-padding-inline-end-xs: var(--p-space-3);--pc-box-padding-inline-start-xs: var(--p-space-3);position: relative;z-index: var(--pc-resource-item-content-stacking-order)" class="Polaris-Box"> <div style="--pc-horizontal-grid-grid-template-columns-xs: 1fr auto" class="Polaris-HorizontalGrid"> <div style="--pc-horizontal-grid-gap-xs: var(--p-space-3);--pc-horizontal-grid-grid-template-columns-xs: auto 1fr" class="Polaris-HorizontalGrid"> <div style="--pc-horizontal-stack-align: ;--pc-horizontal-stack-wrap: wrap;--pc-horizontal-stack-gap-xs: var(--p-space-3)" class="Polaris-HorizontalStack"> <div style="--pc-bleed-margin-block-start-xs: var(--p-space-2);--pc-bleed-margin-block-end-xs: var(--p-space-2);--pc-bleed-margin-inline-start-xs: var(--p-space-3);--pc-bleed-margin-inline-end-xs: var(--p-space-3)" class="Polaris-Bleed"> <div style="--pc-box-border-color: transparent;--pc-box-border-style: solid;--pc-box-padding-block-end-xs: var(--p-space-2);--pc-box-padding-block-start-xs: var(--p-space-3);--pc-box-padding-inline-end-xs: var(--p-space-3);--pc-box-padding-inline-start-xs: var(--p-space-8);z-index: var(--pc-resource-item-content-stacking-order)" class="Polaris-Box"> <div> <label class="Polaris-Choice Polaris-Choice--labelHidden"> <span class="Polaris-Choice__Control"> <span class="Polaris-Checkbox Polaris-Checkbox--labelHidden"> <input type="checkbox" name="question[]" id="question_" value="answer2" aria-checked="false" class="Polaris-Checkbox__Input" /> <span class="Polaris-Checkbox__Backdrop"></span> <span class="Polaris-Checkbox__Icon"> <span class="Polaris-Icon"> <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 20 20" class="Polaris-Icon__Svg" focusable="false" aria-hidden="true"><path fill-rule="evenodd" d="M14.03 7.22a.75.75 0 0 1 0 1.06l-4.5 4.5a.75.75 0 0 1-1.06 0l-2.25-2.25a.75.75 0 1 1 1.06-1.06l1.72 1.72 3.97-3.97a.75.75 0 0 1 1.06 0Z"></path></svg> </span> </span> </span> </span> </label> </div> </div> </div> </div> <div style="--pc-horizontal-stack-align: ;--pc-horizontal-stack-block-align: center;--pc-horizontal-stack-wrap: wrap;--pc-horizontal-stack-gap-xs: var(--p-space-2)" class="Polaris-HorizontalStack"> <div style="--pc-box-border-color: transparent;--pc-box-border-style: solid;--pc-box-padding-block-end-xs: var(--p-space-0);--pc-box-padding-block-start-xs: var(--p-space-0);--pc-box-padding-inline-end-xs: var(--p-space-2);--pc-box-padding-inline-start-xs: var(--p-space-0);--pc-box-width: 100%" class="Polaris-Box"> <p>Offset checkbox</p> </div> </div> </div> </div> </div> </div> </div> </li> </ul> </div></div>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<%= polaris_card(sectioned: false) do %> <%= polaris_resource_list do %> <%= polaris_resource_item(selectable: true) do |resource_item| %> <% resource_item.with_checkbox( name: "question[]", value: "answer1", ) %> <p>Regular checkbox</p> <% end %> <%= polaris_resource_item(selectable: true, offset: true) do |resource_item| %> <% resource_item.with_checkbox( name: "question[]", value: "answer2", ) %> <p>Offset checkbox</p> <% end %> <% end %><% end %>
No notes provided.
No params configured.