@@ -67,34 +67,41 @@ priceRanges({
6767})` ;
6868
6969/**
70- * Instantiate a price ranges on a numerical facet
70+ * @typedef {Object } PriceRangeClasses
71+ * @property {string|string[] } [root] CSS class to add to the root element
72+ * @property {string|string[] } [header] CSS class to add to the header element
73+ * @property {string|string[] } [body] CSS class to add to the body element
74+ * @property {string|string[] } [list] CSS class to add to the wrapping list element
75+ * @property {string|string[] } [item] CSS class to add to each item element
76+ * @property {string|string[] } [active] CSS class to add to the active item element
77+ * @property {string|string[] } [link] CSS class to add to each link element
78+ * @property {string|string[] } [form] CSS class to add to the form element
79+ * @property {string|string[] } [label] CSS class to add to each wrapping label of the form
80+ * @property {string|string[] } [input] CSS class to add to each input of the form
81+ * @property {string|string[] } [currency] CSS class to add to each currency element of the form
82+ * @property {string|string[] } [separator] CSS class to add to the separator of the form
83+ * @property {string|string[] } [button] CSS class to add to the submit button of the form
84+ * @property {string|string[] } [footer] CSS class to add to the footer element
85+ */
86+
87+ /**
88+ * @typedef {Object } PriceRangeWidgetOptions
89+ * @property {string|DOMElement } container Valid CSS Selector as a string or DOMElement
90+ * @property {string } attributeName Name of the attribute for faceting
91+ * @property {Object } [templates] Templates to use for the widget
92+ * @property {string|Function } [templates.item] Item template. Template data: `from`, `to` and `currency`
93+ * @property {string } [currency='$'] The currency to display
94+ * @property {Object } [labels] Labels to use for the widget
95+ * @property {string|Function } [labels.separator] Separator label, between min and max
96+ * @property {string|Function } [labels.button] Button label
97+ * @property {boolean } [autoHideContainer=true] Hide the container when no refinements available
98+ * @property {PriceRangeClasses } [cssClasses] CSS classes to add
99+ * @property {{collapsed: boolean}|boolean } [collapsible=false] Hide the widget body and footer when clicking on header
100+ */
101+
102+ /**
71103 * @type {WidgetFactory }
72- * @param {string|DOMElement } $0.container Valid CSS Selector as a string or DOMElement
73- * @param {string } $0.attributeName Name of the attribute for faceting
74- * @param {Object } [$0.templates] Templates to use for the widget
75- * @param {string|Function } [$0.templates.item] Item template. Template data: `from`, `to` and `currency`
76- * @param {string } [$0.currency='$'] The currency to display
77- * @param {Object } [$0.labels] Labels to use for the widget
78- * @param {string|Function } [$0.labels.separator] Separator label, between min and max
79- * @param {string|Function } [$0.labels.button] Button label
80- * @param {boolean } [$0.autoHideContainer=true] Hide the container when no refinements available
81- * @param {Object } [$0.cssClasses] CSS classes to add
82- * @param {string|string[] } [$0.cssClasses.root] CSS class to add to the root element
83- * @param {string|string[] } [$0.cssClasses.header] CSS class to add to the header element
84- * @param {string|string[] } [$0.cssClasses.body] CSS class to add to the body element
85- * @param {string|string[] } [$0.cssClasses.list] CSS class to add to the wrapping list element
86- * @param {string|string[] } [$0.cssClasses.item] CSS class to add to each item element
87- * @param {string|string[] } [$0.cssClasses.active] CSS class to add to the active item element
88- * @param {string|string[] } [$0.cssClasses.link] CSS class to add to each link element
89- * @param {string|string[] } [$0.cssClasses.form] CSS class to add to the form element
90- * @param {string|string[] } [$0.cssClasses.label] CSS class to add to each wrapping label of the form
91- * @param {string|string[] } [$0.cssClasses.input] CSS class to add to each input of the form
92- * @param {string|string[] } [$0.cssClasses.currency] CSS class to add to each currency element of the form
93- * @param {string|string[] } [$0.cssClasses.separator] CSS class to add to the separator of the form
94- * @param {string|string[] } [$0.cssClasses.button] CSS class to add to the submit button of the form
95- * @param {string|string[] } [$0.cssClasses.footer] CSS class to add to the footer element
96- * @param {object|boolean } [$0.collapsible=false] Hide the widget body and footer when clicking on header
97- * @param {boolean } [$0.collapsible.collapsed] Initial collapsed state of a collapsible widget
104+ * @param {PriceRangeWidgetOptions } $0 The price ranges widget options.
98105 * @return {Object } widget
99106 */
100107export default function priceRanges ( {
0 commit comments