@@ -1047,20 +1047,27 @@ search.addWidget(
1047
1047
* Instantiate a price ranges on a numerical facet
1048
1048
* @param {string|DOMElement} options.container Valid CSS Selector as a string or DOMElement
1049
1049
* @param {string} options.facetName Name of the attribute for faceting
1050
- * @param {Object} [options.cssClasses] CSS classes to add to the wrapping elements: root, range
1051
- * @param {string|string[]} [options.cssClasses.root] CSS class to add to the root element
1052
- * @param {string|string[]} [options.cssClasses.header] CSS class to add to the header element
1053
- * @param {string|string[]} [options.cssClasses.body] CSS class to add to the body element
1054
- * @param {string|string[]} [options.cssClasses.footer] CSS class to add to the footer element
1055
- * @param {string|string[]} [options.cssClasses.range] CSS class to add to the range element
1056
- * @param {string|string[]} [options.cssClasses.input] CSS class to add to the min/max input elements
1057
- * @param {string|string[]} [options.cssClasses.button] CSS class to add to the button element
1050
+ * @param {Object} [options.cssClasses] CSS classes to add
1051
+ * @param {string} [options.cssClasses.root] CSS class to add to the root element
1052
+ * @param {string} [options.cssClasses.header] CSS class to add to the header element
1053
+ * @param {string} [options.cssClasses.body] CSS class to add to the body element
1054
+ * @param {string} [options.cssClasses.list] CSS class to add to the wrapping list element
1055
+ * @param {string} [options.cssClasses.item] CSS class to add to each item element
1056
+ * @param {string} [options.cssClasses.active] CSS class to add to the active item element
1057
+ * @param {string} [options.cssClasses.link] CSS class to add to each link element
1058
+ * @param {string} [options.cssClasses.form] CSS class to add to the form element
1059
+ * @param {string} [options.cssClasses.label] CSS class to add to each wrapping label of the form
1060
+ * @param {string} [options.cssClasses.input] CSS class to add to each input of the form
1061
+ * @param {string} [options.cssClasses.currency] CSS class to add to each currency element of the form
1062
+ * @param {string} [options.cssClasses.separator] CSS class to add to the separator of the form
1063
+ * @param {string} [options.cssClasses.button] CSS class to add to the submit button of the form
1064
+ * @param {string} [options.cssClasses.footer] CSS class to add to the footer element
1058
1065
* @param {Object} [options.templates] Templates to use for the widget
1059
- * @param {string|Function} [options.templates.range] Range template
1066
+ * @param {string|Function} [options.templates.item] Item template
1060
1067
* @param {Object} [options.labels] Labels to use for the widget
1061
- * @param {string|Function} [options.labels.button] Button label
1062
1068
* @param {string|Function} [options.labels.currency] Currency label
1063
- * @param {string|Function} [options.labels.to] To label
1069
+ * @param {string|Function} [options.labels.separator] Separator labe, between min and max
1070
+ * @param {string|Function} [options.labels.button] Button label
1064
1071
* @param {boolean} [hideContainerWhenNoResults= true ] Hide the container when no results match
1065
1072
* @return {Object}
1066
1073
*/
@@ -1080,10 +1087,61 @@ search.addWidget(
1080
1087
#### Styling
1081
1088
1082
1089
``` html
1083
-
1090
+ <div class =" ais-price-ranges" >
1091
+ <div class =" ais-price-ranges--header ais-header" >Header</div >
1092
+ <div class =" ais-price-ranges--body" >
1093
+ <div class =" ais-price-ranges--item" >
1094
+ <a class =" ais-price-ranges--range" href =" ..." >$3 - $13</a >
1095
+ </div >
1096
+ <div class =" ais-price-ranges--item ais-price-ranges--item__active" >
1097
+ <a class =" ais-price-ranges--range" href =" ..." >$13 - $40</a >
1098
+ </div >
1099
+ <form class =" ais-price-ranges--form" >
1100
+ <label class =" ais-price-ranges--label" >
1101
+ <span class =" ais-price-ranges--currency>$ </span>
1102
+ <input class=" ais-price-ranges--input " />
1103
+ </label>
1104
+ <span class=" ais-price-ranges--separator " > to </span>
1105
+ <label class=" ais-price-ranges--label " >
1106
+ <span class=" ais-price-ranges--currency >$ </span >
1107
+ <input class =" ais-price-ranges--input" />
1108
+ </label >
1109
+ <button class =" ais-price-ranges--button" >Go</button >
1110
+ </form >
1111
+ </div >
1112
+ <div class =" ais-price-ranges--footer ais-footer" >Footer</div >
1113
+ </div >
1084
1114
```
1085
1115
1086
1116
``` css
1117
+ .ais-price-ranges {
1118
+ }
1119
+ .ais-price-ranges--header {
1120
+ }
1121
+ .ais-price-ranges--body {
1122
+ }
1123
+ .ais-price-ranges--list {
1124
+ }
1125
+ .ais-price-ranges--item {
1126
+ }
1127
+ .ais-price-ranges--item__active {
1128
+ }
1129
+ .ais-price-ranges--link {
1130
+ }
1131
+ .ais-price-ranges--form {
1132
+ }
1133
+ .ais-price-ranges--label {
1134
+ }
1135
+ .ais-price-ranges--currency {
1136
+ }
1137
+ .ais-price-ranges--input {
1138
+ }
1139
+ .ais-price-ranges--separator {
1140
+ }
1141
+ .ais-price-ranges--button {
1142
+ }
1143
+ .ais-price-ranges--footer {
1144
+ }
1087
1145
1088
1146
```
1089
1147
0 commit comments