@kizmann/nano-ui 0.8.32 → 0.8.34

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,6 +4,14 @@ export default {
4
4
 
5
5
  name: 'NSelect',
6
6
 
7
+ inject: {
8
+
9
+ NFormItem: {
10
+ default: undefined
11
+ }
12
+
13
+ },
14
+
7
15
  props: {
8
16
 
9
17
  modelValue: {
@@ -152,6 +160,11 @@ export default {
152
160
 
153
161
  computed: {
154
162
 
163
+ deepDisabled() {
164
+ return this.NFormItem ? this.NFormItem.disabled(this.disabled) :
165
+ this.disabled;
166
+ },
167
+
155
168
  empty()
156
169
  {
157
170
  return Any.isEmpty(this.tempValue);
@@ -494,7 +507,7 @@ export default {
494
507
 
495
508
  let props = {};
496
509
 
497
- if ( ! this.disabled ) {
510
+ if ( ! this.deepDisabled ) {
498
511
  props.onMousedown = this.clear;
499
512
  }
500
513
 
@@ -524,7 +537,7 @@ export default {
524
537
  class: nano.Icons.times,
525
538
  };
526
539
 
527
- if ( ! this.disabled ) {
540
+ if ( ! this.deepDisabled ) {
528
541
  props.onMousedown = (event) => this.toggleOption(value, event);
529
542
  }
530
543
 
@@ -589,7 +602,7 @@ export default {
589
602
  let props = {
590
603
  value: this.search,
591
604
  placeholder: this.placeholder,
592
- disabled: this.disabled,
605
+ disabled: this.deepDisabled,
593
606
  onFocus: this.onFocusInput,
594
607
  onInput: this.onInputInput,
595
608
  onKeydown: this.onKeydownInput
@@ -635,7 +648,7 @@ export default {
635
648
  let props = {
636
649
  value: this.search,
637
650
  placeholder: this.placeholder,
638
- disabled: this.disabled,
651
+ disabled: this.deepDisabled,
639
652
  onFocus: this.onFocusInput,
640
653
  onInput: this.onInputInput,
641
654
  onKeydown: this.onKeydownInput
@@ -721,7 +734,7 @@ export default {
721
734
  listen: true,
722
735
  size: this.size,
723
736
  scrollClose: true,
724
- disabled: this.disabled,
737
+ disabled: this.deepDisabled,
725
738
  onClose: this.resetInput
726
739
  };
727
740
 
@@ -774,7 +787,7 @@ export default {
774
787
  classList.push('n-focus');
775
788
  }
776
789
 
777
- if ( this.disabled ) {
790
+ if ( this.deepDisabled ) {
778
791
  classList.push('n-disabled');
779
792
  }
780
793
 
@@ -4,6 +4,14 @@ export default {
4
4
 
5
5
  name: 'NSwitch',
6
6
 
7
+ inject: {
8
+
9
+ NFormItem: {
10
+ default: undefined
11
+ }
12
+
13
+ },
14
+
7
15
  props: {
8
16
 
9
17
  modelValue: {
@@ -58,6 +66,15 @@ export default {
58
66
 
59
67
  },
60
68
 
69
+ computed: {
70
+
71
+ deepDisabled() {
72
+ return this.NFormItem ? this.NFormItem.disabled(this.disabled) :
73
+ this.disabled;
74
+ }
75
+
76
+ },
77
+
61
78
  data()
62
79
  {
63
80
  return {
@@ -99,7 +116,7 @@ export default {
99
116
 
100
117
  let props = {};
101
118
 
102
- if ( ! this.disabled ) {
119
+ if ( ! this.deepDisabled ) {
103
120
  props.onMousedown = this.eventClick;
104
121
  }
105
122
 
@@ -122,7 +139,7 @@ export default {
122
139
 
123
140
  let props = {};
124
141
 
125
- if ( ! this.disabled ) {
142
+ if ( ! this.deepDisabled ) {
126
143
  props.onMousedown = this.eventClick;
127
144
  }
128
145
 
@@ -156,7 +173,7 @@ export default {
156
173
  classList.push('n-off');
157
174
  }
158
175
 
159
- if ( this.disabled ) {
176
+ if ( this.deepDisabled ) {
160
177
  classList.push('n-disabled');
161
178
  }
162
179
 
@@ -1,5 +1,25 @@
1
1
  @import "../../../root/vars";
2
2
 
3
+ .n-form-item__condition span {
4
+ color: $color-gray-50;
5
+ }
6
+
7
+ .n-form-item.is-disabled .n-form-item__condition {
8
+ background: rgba($color-primary, 0.1);
9
+ }
10
+
11
+ .n-form-item.is-disabled .n-form-item__condition span {
12
+ color: rgba($color-primary, 0.75);
13
+ }
14
+
15
+ .n-form-item.is-disabled .n-form-item__condition:hover {
16
+ background: rgba($color-primary, 0.15);
17
+ }
18
+
19
+ .n-form-item.is-disabled .n-form-item__condition:hover span {
20
+ color: rgba($color-primary, 0.85);
21
+ }
22
+
3
23
  .n-form-item__label label {
4
24
  color: $color-gray-60;
5
25
  }
package/webservy.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "hostname": "nano-ui.local",
3
+ "webroot": "",
4
+ "engine": "apache",
5
+ "version": "php-8.2.8"
6
+ }