@massimo-cassandro/minimo 1.24.4 → 1.24.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -110,6 +110,7 @@ export function buildInput({
|
|
|
110
110
|
* @param {string | null} [args.wrapperClass=null] - optional class to be added to the `.form-group` wrapper.
|
|
111
111
|
* @param {string | null} [args.className=null] - optional class to be added to the `input`.
|
|
112
112
|
* @param {boolean} [args.condition=true] - When false, the function returns `null` without building anything.
|
|
113
|
+
* @param {boolean} [args.useBsClass=false] - When true, uses BS5 class (`form-select`) instead of `form-control`
|
|
113
114
|
* @param {string | HTMLElement | null} args.help - Optional help text.
|
|
114
115
|
* @param {(function(HTMLElement): void) | null} args.callback - Optional callback function.
|
|
115
116
|
* @param {Record<string, any> | null} [args.attrs={}] - Optional attributes object.
|
|
@@ -124,6 +125,7 @@ export function buildSelect({
|
|
|
124
125
|
addEmptyOption = true,
|
|
125
126
|
wrapperClass = null,
|
|
126
127
|
className = null,
|
|
128
|
+
useBsClass = false,
|
|
127
129
|
condition = true,
|
|
128
130
|
help = null,
|
|
129
131
|
attrs = {},
|
|
@@ -158,7 +160,7 @@ export function buildSelect({
|
|
|
158
160
|
`label.form-label[for:${id}] ${label}`,
|
|
159
161
|
{
|
|
160
162
|
tag: 'select',
|
|
161
|
-
className: classnames('form-control', className, attrs?.class),
|
|
163
|
+
className: classnames(useBsClass? 'form-select' : 'form-control', className, attrs?.class),
|
|
162
164
|
id: id,
|
|
163
165
|
attrs: {
|
|
164
166
|
...(attrs??{}),
|