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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<div data-controller="paper-autocomplete" data-paper-autocomplete-selected-value="[]" data-paper-autocomplete-multiple-value="true"> <div data-paper-autocomplete-target="popover" data-controller="paper-popover" data-paper-popover-append-to-body-value="false" data-paper-popover-active-value="false" data-paper-popover-placement-value="auto-start" data-paper-popover-open-class="Polaris-Popover__PopoverOverlay--open" data-paper-popover-closed-class="Polaris-Popover__PopoverOverlay--closed"> <div data-paper-popover-target="activator"> <div class=""> <div class="Polaris-Labelled__LabelWrapper"> <div class="Polaris-Label"> <label class="Polaris-Label__Text" for="tags">Tags</label> </div> </div> <div class="Polaris-Connected"> <div class="Polaris-Connected__Item Polaris-Connected__Item--primary"> <div data-paper-text-field-has-value-class="Polaris-TextField--hasValue" data-paper-text-field-clear-button-hidden-class="Polaris-TextField__Hidden" data-action="click->paper-autocomplete#toggle click@window->paper-popover#hide" data-controller="paper-text-field" class="Polaris-TextField"> <div class="Polaris-TextField__Prefix"> <span class="Polaris-Icon"> <svg viewbox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" class="Polaris-Icon__Svg" focusable="false" aria-hidden="true"><path d="M8 12a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm9.707 4.293-4.82-4.82a5.968 5.968 0 0 0 1.113-3.473 6 6 0 0 0-12 0 6 6 0 0 0 6 6 5.968 5.968 0 0 0 3.473-1.113l4.82 4.82a.997.997 0 0 0 1.414 0 .999.999 0 0 0 0-1.414z"></path></svg> </span> </div> <input type="text" name="tags" id="tags" placeholder="Search" data-paper-text-field-target="input" data-paper-autocomplete-target="input" data-action="paper-text-field#syncValue" class="Polaris-TextField__Input" /> <div class="Polaris-TextField__Backdrop"></div> </div> </div> </div> </div> </div> <div data-paper-popover-target="popover" class="Polaris-PositionedOverlay Polaris-Popover__PopoverOverlay Polaris-Popover__PopoverOverlay--closed"> <div class="Polaris-Popover Polaris-Popover--fullWidth"> <div class="Polaris-Popover__FocusTracker" tabindex="0"></div> <div style="--pc-box-background: var(--p-color-bg);--pc-box-border-color: transparent;--pc-box-border-style: solid;--pc-box-border-radius: var(--p-border-radius-2);--pc-box-overflow-x: hidden;--pc-box-overflow-y: hidden;position: relative" class="Polaris-Box"> <div tabindex="-1" class="Polaris-Popover__Content"> <div data-paper-scrollable-shadow-value="true" data-paper-scrollable-top-shadow-class="Polaris-Scrollable--hasTopShadow" data-paper-scrollable-bottom-shadow-class="Polaris-Scrollable--hasBottomShadow" data-controller="paper-scrollable" style="" class="Polaris-Popover__Pane Polaris-Scrollable Polaris-Scrollable--vertical"> <span data-paper-scrollable-target="topEdge"></span> <ul data-paper-autocomplete-target="results" data-controller="paper-option-list" data-paper-option-list-selected-class="Polaris-OptionList-Option--select" 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-2);--pc-box-padding-inline-end-xs: var(--p-space-2);--pc-box-padding-inline-start-xs: var(--p-space-2)" class="Polaris-Box Polaris-Box--listReset"> <li style="--pc-box-border-color: transparent;--pc-box-border-style: solid" class="Polaris-Box"> <div style="--pc-box-padding-block-end-xs: var(--p-space-2);--pc-box-padding-block-start-xs: var(--p-space-2);--pc-box-padding-inline-end-xs: var(--p-space-2);--pc-box-padding-inline-start-xs: var(--p-space-2)" class="Polaris-Box"> <p class="Polaris-Text--root Polaris-Text--headingXs Polaris-Text--semibold"> Section 1 </p> </div> <div style="" class="Polaris-Bleed"> <ul style="--pc-box-border-color: transparent;--pc-box-border-style: solid" class="Polaris-Box Polaris-Box--listReset"> <li data-paper-autocomplete-target="option" data-label="Rustic" tabindex="-1" class="Polaris-OptionList-Option"> <label class="Polaris-OptionList-Option__Label"> <div class="Polaris-OptionList-Option__Checkbox"> <div class="Polaris-OptionList-Checkbox"> <input type="checkbox" id="" value="rustic" data-action="paper-autocomplete#select" aria-checked="false" class="Polaris-OptionList-Checkbox__Input" /> <div class="Polaris-OptionList-Checkbox__Backdrop"></div> <div class="Polaris-OptionList-Checkbox__Icon"> <span class="Polaris-Icon"> <svg viewbox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" class="Polaris-Icon__Svg" focusable="false" aria-hidden="true"><path d="m7.293 14.707-3-3a.999.999 0 1 1 1.414-1.414l2.236 2.236 6.298-7.18a.999.999 0 1 1 1.518 1.3l-7 8a1 1 0 0 1-.72.35 1.017 1.017 0 0 1-.746-.292z"></path></svg> </span> </div> </div> </div> Rustic </label> </li> <li data-paper-autocomplete-target="option" data-label="Antique" tabindex="-1" class="Polaris-OptionList-Option"> <label class="Polaris-OptionList-Option__Label"> <div class="Polaris-OptionList-Option__Checkbox"> <div class="Polaris-OptionList-Checkbox"> <input type="checkbox" id="" value="antique" data-action="paper-autocomplete#select" aria-checked="false" class="Polaris-OptionList-Checkbox__Input" /> <div class="Polaris-OptionList-Checkbox__Backdrop"></div> <div class="Polaris-OptionList-Checkbox__Icon"> <span class="Polaris-Icon"> <svg viewbox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" class="Polaris-Icon__Svg" focusable="false" aria-hidden="true"><path d="m7.293 14.707-3-3a.999.999 0 1 1 1.414-1.414l2.236 2.236 6.298-7.18a.999.999 0 1 1 1.518 1.3l-7 8a1 1 0 0 1-.72.35 1.017 1.017 0 0 1-.746-.292z"></path></svg> </span> </div> </div> </div> Antique </label> </li> <li data-paper-autocomplete-target="option" data-label="Vinyl" tabindex="-1" class="Polaris-OptionList-Option"> <label class="Polaris-OptionList-Option__Label"> <div class="Polaris-OptionList-Option__Checkbox"> <div class="Polaris-OptionList-Checkbox"> <input type="checkbox" id="" value="vinyl" data-action="paper-autocomplete#select" aria-checked="false" class="Polaris-OptionList-Checkbox__Input" /> <div class="Polaris-OptionList-Checkbox__Backdrop"></div> <div class="Polaris-OptionList-Checkbox__Icon"> <span class="Polaris-Icon"> <svg viewbox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" class="Polaris-Icon__Svg" focusable="false" aria-hidden="true"><path d="m7.293 14.707-3-3a.999.999 0 1 1 1.414-1.414l2.236 2.236 6.298-7.18a.999.999 0 1 1 1.518 1.3l-7 8a1 1 0 0 1-.72.35 1.017 1.017 0 0 1-.746-.292z"></path></svg> </span> </div> </div> </div> Vinyl </label> </li> </ul> </div> </li> <li style="--pc-box-border-color: transparent;--pc-box-border-style: solid" class="Polaris-Box"> <div style="--pc-box-padding-block-end-xs: var(--p-space-2);--pc-box-padding-block-start-xs: var(--p-space-2);--pc-box-padding-inline-end-xs: var(--p-space-2);--pc-box-padding-inline-start-xs: var(--p-space-2)" class="Polaris-Box"> <p class="Polaris-Text--root Polaris-Text--headingXs Polaris-Text--semibold"> Section 2 </p> </div> <div style="" class="Polaris-Bleed"> <ul style="--pc-box-border-color: transparent;--pc-box-border-style: solid" class="Polaris-Box Polaris-Box--listReset"> <li data-paper-autocomplete-target="option" data-label="Vintage" tabindex="-1" class="Polaris-OptionList-Option"> <label class="Polaris-OptionList-Option__Label"> <div class="Polaris-OptionList-Option__Checkbox"> <div class="Polaris-OptionList-Checkbox"> <input type="checkbox" id="" value="vintage" data-action="paper-autocomplete#select" aria-checked="false" class="Polaris-OptionList-Checkbox__Input" /> <div class="Polaris-OptionList-Checkbox__Backdrop"></div> <div class="Polaris-OptionList-Checkbox__Icon"> <span class="Polaris-Icon"> <svg viewbox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" class="Polaris-Icon__Svg" focusable="false" aria-hidden="true"><path d="m7.293 14.707-3-3a.999.999 0 1 1 1.414-1.414l2.236 2.236 6.298-7.18a.999.999 0 1 1 1.518 1.3l-7 8a1 1 0 0 1-.72.35 1.017 1.017 0 0 1-.746-.292z"></path></svg> </span> </div> </div> </div> Vintage </label> </li> <li data-paper-autocomplete-target="option" data-label="Refurbished" tabindex="-1" class="Polaris-OptionList-Option"> <label class="Polaris-OptionList-Option__Label"> <div class="Polaris-OptionList-Option__Checkbox"> <div class="Polaris-OptionList-Checkbox"> <input type="checkbox" id="" value="refurbished" data-action="paper-autocomplete#select" aria-checked="false" class="Polaris-OptionList-Checkbox__Input" /> <div class="Polaris-OptionList-Checkbox__Backdrop"></div> <div class="Polaris-OptionList-Checkbox__Icon"> <span class="Polaris-Icon"> <svg viewbox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" class="Polaris-Icon__Svg" focusable="false" aria-hidden="true"><path d="m7.293 14.707-3-3a.999.999 0 1 1 1.414-1.414l2.236 2.236 6.298-7.18a.999.999 0 1 1 1.518 1.3l-7 8a1 1 0 0 1-.72.35 1.017 1.017 0 0 1-.746-.292z"></path></svg> </span> </div> </div> </div> Refurbished </label> </li> </ul> </div> </li> </ul> <span data-paper-scrollable-target="bottomEdge"></span> </div> </div> </div> <div class="Polaris-Popover__FocusTracker" tabindex="0"></div> </div> </div> </div></div>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<%= paper_autocomplete(multiple: true) do |autocomplete| %> <% autocomplete.with_text_field(name: :tags, label: "Tags", placeholder: "Search") do |c| %> <% c.with_prefix do %> <%= paper_icon(name: "SearchMinor") %> <% end %> <% end %> <% autocomplete.with_section(title: "Section 1") do |section| %> <% section.with_option(label: "Rustic", value: "rustic") %> <% section.with_option(label: "Antique", value: "antique") %> <% section.with_option(label: "Vinyl", value: "vinyl") %> <% end %> <% autocomplete.with_section(title: "Section 2") do |section| %> <% section.with_option(label: "Vintage", value: "vintage") %> <% section.with_option(label: "Refurbished", value: "refurbished") %> <% end %><% end %>
No notes provided.
No params configured.