@ekzo-dev/bootstrap-addons 5.2.19 → 5.2.20
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.20",
|
|
5
5
|
"homepage": "https://github.com/ekzo-dev/aurelia-components/tree/main/packages/bootstrap-addons",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -1,19 +1,26 @@
|
|
|
1
1
|
<template class="${floatingLabel ? 'form-floating' : ''}">
|
|
2
2
|
<label for="${id}" if.bind="label && !floatingLabel" class="form-label">${label}</label>
|
|
3
|
-
<fieldset class="${classes}"
|
|
4
|
-
<input
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<input type="number" min="0" value.bind="duration.
|
|
13
|
-
|
|
14
|
-
<input type="number" min="0" value.bind="duration.
|
|
15
|
-
|
|
16
|
-
<input
|
|
3
|
+
<fieldset class="${classes}" disabled.bind="disabled">
|
|
4
|
+
<input
|
|
5
|
+
type="text"
|
|
6
|
+
id="${id}"
|
|
7
|
+
required.bind="required"
|
|
8
|
+
value.bind="value"
|
|
9
|
+
form.bind="form & attr"
|
|
10
|
+
focus.trigger="focus()"
|
|
11
|
+
/>
|
|
12
|
+
<input type="number" min="0" value.bind="duration.years" placeholder="--" />
|
|
13
|
+
<span>${labels.years}</span>
|
|
14
|
+
<input type="number" min="0" value.bind="duration.months" placeholder="--" />
|
|
15
|
+
<span>${labels.months}</span>
|
|
16
|
+
<input type="number" min="0" value.bind="duration.days" placeholder="--" />
|
|
17
|
+
<span>${labels.days}</span>
|
|
18
|
+
<input type="number" min="0" value.bind="duration.hours" placeholder="--" />
|
|
19
|
+
<span>${labels.hours}</span>
|
|
20
|
+
<input type="number" min="0" value.bind="duration.minutes" placeholder="--" />
|
|
21
|
+
<span>${labels.minutes}</span>
|
|
22
|
+
<input type="number" min="0" value.bind="duration.seconds" placeholder="--" />
|
|
23
|
+
<span>${labels.seconds}</span>
|
|
17
24
|
</fieldset>
|
|
18
25
|
<label for="${id}" if.bind="label && floatingLabel"><span>${label}</span></label>
|
|
19
26
|
<div class="invalid-feedback" if.bind="invalidFeedback">${invalidFeedback}</div>
|
|
@@ -24,6 +24,10 @@ bs-duration-input {
|
|
|
24
24
|
box-shadow: $input-focus-box-shadow;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
+
|
|
28
|
+
span {
|
|
29
|
+
user-select: none;
|
|
30
|
+
}
|
|
27
31
|
}
|
|
28
32
|
|
|
29
33
|
input[type='number'] {
|
|
@@ -33,6 +37,7 @@ bs-duration-input {
|
|
|
33
37
|
outline: 0;
|
|
34
38
|
text-align: right;
|
|
35
39
|
field-sizing: content;
|
|
40
|
+
background: transparent;
|
|
36
41
|
|
|
37
42
|
&::-webkit-outer-spin-button,
|
|
38
43
|
&::-webkit-inner-spin-button {
|
|
@@ -41,7 +46,7 @@ bs-duration-input {
|
|
|
41
46
|
}
|
|
42
47
|
}
|
|
43
48
|
|
|
44
|
-
input[
|
|
49
|
+
input[type='text'] {
|
|
45
50
|
position: absolute;
|
|
46
51
|
height: 100%;
|
|
47
52
|
width: 100%;
|
|
@@ -89,6 +89,10 @@ export class BsDurationInput extends BaseField implements EventListenerObject {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
focus() {
|
|
93
|
+
this.controls.item(0).focus();
|
|
94
|
+
}
|
|
95
|
+
|
|
92
96
|
private parseDuration(value: string) {
|
|
93
97
|
const match = value?.match(/^P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/);
|
|
94
98
|
|