@ekzo-dev/bootstrap-addons 5.2.8 → 5.2.9
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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ekzo-dev/bootstrap-addons",
|
|
3
3
|
"description": "Aurelia Bootstrap additional component",
|
|
4
|
-
"version": "5.2.
|
|
4
|
+
"version": "5.2.9",
|
|
5
5
|
"homepage": "https://github.com/ekzo-dev/aurelia-components/tree/main/packages/bootstrap-addons",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<template class="${floatingLabel ? 'form-floating' : ''}">
|
|
1
|
+
<template class="${floatingLabel ? 'form-floating' : ''} ${!multiple ? 'dropdown' : ''}">
|
|
2
2
|
<label for="${id}" if.bind="label && !floatingLabel" class="form-label">${label}</label>
|
|
3
3
|
<fieldset
|
|
4
4
|
if.bind="multiple"
|
|
@@ -23,18 +23,18 @@
|
|
|
23
23
|
<label class="form-check-label" for="${id+$index}">${option.text}</label>
|
|
24
24
|
</div>
|
|
25
25
|
</fieldset>
|
|
26
|
-
<
|
|
27
|
-
<
|
|
26
|
+
<template else>
|
|
27
|
+
<input
|
|
28
28
|
class="form-select ${bsSize ? `form-select-${bsSize}` : ''} ${valid ? 'is-valid' : valid === false ? 'is-invalid' : ''}"
|
|
29
|
-
type="button"
|
|
30
29
|
bs-dropdown-toggle="arrow.bind: false"
|
|
30
|
+
value="${selectedOption?.group ? selectedOption.group + ' / ' : ''}${selectedOption?.text}"
|
|
31
31
|
disabled.bind="disabled"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
required.bind="required"
|
|
33
|
+
readonly
|
|
34
|
+
/>
|
|
35
35
|
<bs-dropdown-menu>
|
|
36
36
|
<div bs-dropdown-item="text">
|
|
37
|
-
<input class="form-control" placeholder="Filter options" type="search" value.bind="filter & debounce:
|
|
37
|
+
<input class="form-control" placeholder="Filter options" type="search" value.bind="filter & debounce:200" />
|
|
38
38
|
</div>
|
|
39
39
|
<hr bs-dropdown-item="divider" />
|
|
40
40
|
<button
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
bs-dropdown-item="active.bind: option === selectedOption; disabled.bind: option.disabled"
|
|
44
44
|
click.trigger="selectOption(option)"
|
|
45
45
|
>
|
|
46
|
-
${option.text}
|
|
46
|
+
${option.text || ' '}
|
|
47
47
|
</button>
|
|
48
48
|
<template repeat.for="[k, v] of groupedOptions | filter:filter">
|
|
49
49
|
<h6 bs-dropdown-item="header">${k}</h6>
|
|
@@ -54,11 +54,11 @@
|
|
|
54
54
|
bs-dropdown-item="active.bind: option === selectedOption; disabled.bind: option.disabled"
|
|
55
55
|
click.trigger="selectOption(option)"
|
|
56
56
|
>
|
|
57
|
-
${option.text}
|
|
57
|
+
${option.text || ' '}
|
|
58
58
|
</button>
|
|
59
59
|
</template>
|
|
60
60
|
</bs-dropdown-menu>
|
|
61
|
-
</
|
|
61
|
+
</template>
|
|
62
62
|
<label for="${id}" if.bind="label && floatingLabel"><span>${label}</span></label>
|
|
63
63
|
<div class="invalid-feedback" if.bind="invalidFeedback">${invalidFeedback}</div>
|
|
64
64
|
<div class="valid-feedback" if.bind="validFeedback">${validFeedback}</div>
|
|
@@ -8,20 +8,16 @@
|
|
|
8
8
|
bs-select {
|
|
9
9
|
display: block;
|
|
10
10
|
|
|
11
|
-
.form-select {
|
|
12
|
-
|
|
11
|
+
> .form-select {
|
|
12
|
+
cursor: default;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
bs-dropdown-menu {
|
|
15
|
+
> bs-dropdown-menu {
|
|
16
16
|
width: 100%;
|
|
17
17
|
max-height: 100vh;
|
|
18
18
|
overflow-y: auto;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.search {
|
|
22
|
-
padding: var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
21
|
> .form-control {
|
|
26
22
|
overflow: auto;
|
|
27
23
|
position: relative;
|
|
@@ -40,7 +36,7 @@ bs-select {
|
|
|
40
36
|
}
|
|
41
37
|
}
|
|
42
38
|
|
|
43
|
-
&.form-floating {
|
|
39
|
+
&.form-floating:not(.dropdown) {
|
|
44
40
|
> label {
|
|
45
41
|
height: auto;
|
|
46
42
|
width: auto;
|
|
@@ -97,7 +97,8 @@ export class BsSelect extends BaseBsSelect implements ICustomElementViewModel {
|
|
|
97
97
|
|
|
98
98
|
// reset value next tick if needed
|
|
99
99
|
if (option === undefined && value !== undefined && this.resetUnknownValue) {
|
|
100
|
-
|
|
100
|
+
console.info('[bootstrap-addons] resetting <bs-select> unknown value');
|
|
101
|
+
void Promise.resolve().then(() => (this.value = undefined));
|
|
101
102
|
}
|
|
102
103
|
|
|
103
104
|
return Array.isArray(option) ? { value: option[0], text: option[1] } : (option as ISelectOption);
|