aloha-vue 1.0.285 → 1.0.287

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.
@@ -8,6 +8,7 @@ div
8
8
  label="Input 1"
9
9
  :required="true"
10
10
  :step="0.1"
11
+ errors="not valid"
11
12
  )
12
13
  div model1: {{ model1 }}
13
14
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aloha-vue",
3
3
  "description": "Project aloha",
4
- "version": "1.0.285",
4
+ "version": "1.0.287",
5
5
  "author": "Ilia Brykin",
6
6
  "scripts": {
7
7
  "build-icons": "node scriptsNode/iconsSvgToJs.js bootstrap3 && node scriptsNode/iconsSvgToJs.js bootstrap-1-9-1"
@@ -1,23 +1,3 @@
1
- export default `<svg
2
- xmlns="http://www.w3.org/2000/svg"
3
- viewBox="0 0 18 18"
4
- height="18"
5
- width="18"
6
- >
7
- <g
8
- transform="matrix(0.79646021,-0.79646021,0.79646021,0.79646021,-5.3362832,9.0000003)"
9
- >
10
- <rect
11
- width="4.599999"
12
- height="18"
13
- x="6.7000003"
14
- y="-5e-07"
15
- />
16
- <rect
17
- width="17.999996"
18
- height="4.5999999"
19
- x="5e-07"
20
- y="6.6999998"
21
- />
22
- </g>
1
+ export default `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-lg" viewBox="0 0 16 16">
2
+ <path d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z"/>
23
3
  </svg>`;
@@ -1,14 +1,3 @@
1
- export default `<svg
2
- xmlns="http://www.w3.org/2000/svg"
3
- width="18"
4
- height="18"
5
- viewBox="0 0 18 18"
6
- >
7
- <g
8
- transform="matrix(0.01757812,0,0,0.01757812,-1.7577055e-5,7.5671054e-6)"
9
- >
10
- <path
11
- d="m 56.889,341.333 h 910.224 q 23.893,0 40.391,16.497 16.498,16.497 16.497,40.391 v 227.556 q 0,23.893 -16.497,40.391 -16.497,16.498 -40.391,16.497 H 56.889 q -23.893,0 -40.391,-16.497 Q 0,649.671 0.001,625.777 V 398.221 q 0,-23.893 16.497,-40.391 16.497,-16.498 40.391,-16.497 z"
12
- />
13
- </g>
1
+ export default `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-dash-lg" viewBox="0 0 16 16">
2
+ <path fill-rule="evenodd" d="M2 8a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11A.5.5 0 0 1 2 8Z"/>
14
3
  </svg>`;
@@ -1,14 +1,3 @@
1
- export default `<svg
2
- xmlns="http://www.w3.org/2000/svg"
3
- width="18"
4
- height="18"
5
- viewBox="0 0 18 18"
6
- >
7
- <g
8
- transform="matrix(0.01757811,0,0,0.01757811,0,-1.757811e-5)"
9
- >
10
- <path
11
- d="m 418.909,0.001 h 186.183 q 19.549,0 33.047,13.498 13.498,13.498 13.498,33.047 v 325.819 h 325.819 q 19.549,0 33.047,13.498 13.498,13.498 13.498,33.047 v 186.183 q 0,19.549 -13.498,33.047 -13.498,13.498 -33.047,13.498 H 651.637 v 325.819 q 0,19.549 -13.498,33.047 -13.498,13.498 -33.047,13.498 H 418.909 q -19.549,0 -33.047,-13.498 -13.498,-13.498 -13.498,-33.047 V 651.638 H 46.545 q -19.549,0 -33.047,-13.498 Q 0,624.642 0,605.093 V 418.91 Q 0,399.361 13.498,385.863 26.996,372.365 46.545,372.365 H 372.364 V 46.546 q 0,-19.549 13.498,-33.047 Q 399.36,0.001 418.909,0.001 Z"
12
- />
13
- </g>
1
+ export default `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-plus-lg" viewBox="0 0 16 16">
2
+ <path fill-rule="evenodd" d="M8 2a.5.5 0 0 1 .5.5v5h5a.5.5 0 0 1 0 1h-5v5a.5.5 0 0 1-1 0v-5h-5a.5.5 0 0 1 0-1h5v-5A.5.5 0 0 1 8 2Z"/>
14
3
  </svg>`;
@@ -1,6 +1,9 @@
1
1
  .a_form_element_number_controls {
2
- display: inline-flex;
2
+ display: flex;
3
3
  align-items: stretch;
4
+ .a_form_element {
5
+ width: 100%;
6
+ }
4
7
  .a_btn_group {
5
8
  border-top-left-radius: 0;
6
9
  border-bottom-left-radius: 0;
@@ -21,6 +24,12 @@
21
24
  }
22
25
  }
23
26
 
27
+ .a_form_element__parent_invalid {
28
+ .a_form_element_number_controls .a_btn_group > .aloha_btn {
29
+ --a_btn_border_color: var(--a_form_element_error_color);
30
+ }
31
+ }
32
+
24
33
  .a_input_number {
25
34
  height: 100%;
26
35
  -webkit-appearance: none;
@@ -217,6 +217,7 @@ export default {
217
217
  a_form_element__parent_float: this.isLabelFloat,
218
218
  a_form_element__parent_not_empty: this.isModel || this.isAutofill,
219
219
  a_form_element__parent_float_has_icon_prepend: this.iconPrepend,
220
+ a_form_element__parent_invalid: this.isErrors,
220
221
  }],
221
222
  }, [
222
223
  this.label && h(ALabel, {
@@ -16,6 +16,7 @@ export default function InputEventsAPI(props, {
16
16
  onBlur = () => {},
17
17
  setCurrentValue = () => {},
18
18
  userInput = ref(null),
19
+ currentValue = ref(undefined),
19
20
  displayValue = computed(() => ""),
20
21
  }) {
21
22
  const eAllowed = toRef(props, "eAllowed");
@@ -58,7 +59,6 @@ export default function InputEventsAPI(props, {
58
59
 
59
60
  const handleInput = $event => {
60
61
  const value = $event.target.value;
61
- console.log("value", value);
62
62
  userInput.value = value;
63
63
  const newVal = value === "" ? null : Number(value);
64
64
  setCurrentValue(newVal, false);
@@ -102,8 +102,10 @@ export default function InputEventsAPI(props, {
102
102
  };
103
103
 
104
104
  const onBlurNumber = $event => {
105
- console.log("onBlurNumber");
106
- if (!modelValue.value && modelValue.value !== 0) {
105
+ if (userInput.value !== null ||
106
+ (!modelValue.value && modelValue.value !== 0)) {
107
+ userInput.value = null;
108
+ currentValue.value = modelValue.value;
107
109
  inputRef.value.value = displayValue.value;
108
110
  }
109
111
  onBlur($event);