@radiantabyss/vue-components 1.4.8 → 1.5.0

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@radiantabyss/vue-components",
3
- "version": "1.4.8",
3
+ "version": "1.5.0",
4
4
  "author": "radiantabyss.com",
5
5
  "license": "ISC",
6
6
  "eslintConfig": {
@@ -61,11 +61,6 @@ export default {
61
61
  required: false,
62
62
  default: false,
63
63
  },
64
- css_class: {
65
- type: String,
66
- required: false,
67
- default: '',
68
- },
69
64
  create: {
70
65
  type: Boolean,
71
66
  required: false,
@@ -164,16 +159,6 @@ export default {
164
159
  if ( this.term == '' && this.autosearch ) {
165
160
  this.search(true);
166
161
  }
167
-
168
- for ( let css_class of this.$el.classList ) {
169
- if ( ['autocomplete', 'autocomplete--inline'].includes(css_class) ) {
170
- continue;
171
- }
172
-
173
- this.$refs.input.classList.add(css_class);
174
- }
175
-
176
- this.$el.className = `autocomplete ${this.css_class}`;
177
162
  },
178
163
  watch: {
179
164
  modelValue() {
@@ -17,16 +17,6 @@ export default {
17
17
  methods: {
18
18
  mount() {
19
19
  this.value = this.modelValue;
20
-
21
- for ( let css_class of this.$el.classList ) {
22
- if ( ['censored'].includes(css_class) ) {
23
- continue;
24
- }
25
-
26
- this.$refs.input.classList.add(css_class);
27
- }
28
-
29
- this.$el.className = `censored`;
30
20
  },
31
21
 
32
22
  handleInput() {
@@ -37,17 +37,6 @@ export default {
37
37
  }, 200);
38
38
  },
39
39
  },
40
- mounted() {
41
- for ( let css_class of this.$el.classList ) {
42
- if ( ['clearable', 'clearable--area'].includes(css_class) ) {
43
- continue;
44
- }
45
-
46
- this.$refs.input.classList.add(css_class);
47
- }
48
-
49
- this.$el.className = `clearable clearable--area`;
50
- },
51
40
  watch: {
52
41
  modelValue() {
53
42
  this.term = this.modelValue;
@@ -32,17 +32,6 @@ export default {
32
32
  }, 200);
33
33
  },
34
34
  },
35
- mounted() {
36
- for ( let css_class of this.$el.classList ) {
37
- if ( ['clearable'].includes(css_class) ) {
38
- continue;
39
- }
40
-
41
- this.$refs.input.classList.add(css_class);
42
- }
43
-
44
- this.$el.className = `clearable`;
45
- },
46
35
  watch: {
47
36
  modelValue() {
48
37
  this.term = this.modelValue;
@@ -6,10 +6,6 @@ export default {
6
6
  type: [String, Number],
7
7
  required: false,
8
8
  },
9
- css_class: {
10
- type: String,
11
- required: false,
12
- },
13
9
  },
14
10
  emits: ['submit'],
15
11
  data() {
@@ -47,7 +43,7 @@ export default {
47
43
  </script>
48
44
 
49
45
  <template>
50
- <div class="edit-live" :class="css_class" v-closable="{exclude:['edit'], handler: 'hide'}" @keydown.esc="hide">
46
+ <div class="edit-live" v-closable="{exclude:['edit'], handler: 'hide'}" @keydown.esc="hide">
51
47
  <span v-show="!is_visible" @click="show">{{ value }}</span>
52
48
  <a @click="show" v-show="!is_visible" ref="edit">
53
49
  <sprite id="edit" />
@@ -6,10 +6,6 @@ export default {
6
6
  type: [String, Number],
7
7
  required: false,
8
8
  },
9
- css_class: {
10
- type: String,
11
- required: false,
12
- },
13
9
  },
14
10
  emits: ['submit'],
15
11
  data() {
@@ -44,7 +40,7 @@ export default {
44
40
  </script>
45
41
 
46
42
  <template>
47
- <div class="edit-live" :class="css_class" v-closable="{exclude:['edit'], handler: 'hide'}" @keydown.esc="hide">
43
+ <div class="edit-live" v-closable="{exclude:['edit'], handler: 'hide'}" @keydown.esc="hide">
48
44
  <span v-show="!is_visible" @click="show">{{ value }}</span>
49
45
  <a @click="show" v-show="!is_visible" ref="edit">
50
46
  <sprite id="edit" class="tiny" />
@@ -10,10 +10,6 @@ export default {
10
10
  type: [Array, Object],
11
11
  required: true,
12
12
  },
13
- css_class: {
14
- type: String,
15
- required: false,
16
- },
17
13
  },
18
14
  emits: ['submit'],
19
15
  data() {
@@ -51,7 +47,7 @@ export default {
51
47
  </script>
52
48
 
53
49
  <template>
54
- <div class="edit-live" :class="css_class" v-closable="{exclude:['edit'], handler: 'hide'}" @keydown.esc="hide">
50
+ <div class="edit-live" v-closable="{exclude:['edit'], handler: 'hide'}" @keydown.esc="hide">
55
51
  <span v-show="!is_visible" @click="show">{{ Array.isArray(options) ? value : options[value] }}</span>
56
52
  <a @click="show" v-show="!is_visible" ref="edit">
57
53
  <sprite id="edit" />
@@ -84,19 +84,6 @@ export default {
84
84
  this.$emit('update:modelValue', this.leading_zero ? Str.leading_zero(i) : i);
85
85
  },
86
86
  },
87
- mounted() {
88
- this.mount();
89
-
90
- for ( let css_class of this.$el.classList ) {
91
- if ( ['numberpicker', `numberpicker--${this.type}`].includes(css_class) ) {
92
- continue;
93
- }
94
-
95
- this.$refs.input.classList.add(css_class);
96
- }
97
-
98
- this.$el.className = `numberpicker numberpicker--${this.type}`;
99
- },
100
87
  watch: {
101
88
  modelValue() {
102
89
  this.mount();
@@ -18,16 +18,6 @@ export default {
18
18
  methods: {
19
19
  mount() {
20
20
  this.value = this.modelValue;
21
-
22
- for ( let css_class of this.$el.classList ) {
23
- if ( ['password'].includes(css_class) ) {
24
- continue;
25
- }
26
-
27
- this.$el.getElementsByTagName('input')[0].classList.add(css_class);
28
- }
29
-
30
- this.$el.className = `password`;
31
21
  },
32
22
 
33
23
  handleInput() {
@@ -62,24 +62,14 @@ export default {
62
62
  this.hour = isNaN(parseFloat(split[0])) ? date.getHours() : parseFloat(split[0]);
63
63
  this.minute = isNaN(parseFloat(split[1])) ? date.getMinutes() : parseFloat(split[1]);
64
64
  this.$emit('update:modelValue', this.value);
65
-
66
- for ( let css_class of this.$el.classList ) {
67
- if ( ['timepicker'].includes(css_class) ) {
68
- continue;
69
- }
70
-
71
- this.$refs.input.classList.add(css_class);
72
- }
73
-
74
- this.$el.className = `timepicker`;
75
65
  }
76
66
  }
77
67
  </script>
78
68
 
79
69
  <template>
80
70
  <div class="timepicker" @keydown.esc="hide">
81
- <input type="text" :placeholder="placeholder" autocomplete="off" readonly
82
- @click="show('time')" ref="input" :value="value"
71
+ <input type="text" class="input" :placeholder="placeholder" autocomplete="off"
72
+ @click="show('time')" ref="input" :value="value" readonly
83
73
  />
84
74
 
85
75
  <div class="timepicker__time" ref="time"
@@ -10,26 +10,20 @@
10
10
  }
11
11
  }
12
12
 
13
- .datepicker__content {
14
- max-width: 230px;
15
- padding: 3px;
16
- background: $bg-light;
17
-
18
- @include theme() {
19
- background: $bg-light--dark;
20
- }
21
- }
22
-
23
13
  .datepicker__content {
24
14
  position: absolute;
25
- top: 36px;
15
+ top: 100%;
26
16
  left: 0;
27
17
  z-index: 100;
18
+ max-width: 230px;
19
+ padding: 3px;
28
20
  border: 1px solid $primary;
29
21
  border-radius: 4px;
22
+ background: $bg-light;
30
23
 
31
24
  @include theme() {
32
25
  border-color: $primary--dark;
26
+ background: $bg-light--dark;
33
27
  }
34
28
  }
35
29
 
@@ -13,22 +13,18 @@
13
13
  justify-content: space-around;
14
14
  align-items: center;
15
15
  position: absolute;
16
- top: 43px;
16
+ top: 100%;
17
17
  left: 0;
18
18
  z-index: 10;
19
19
  width: 130px;
20
20
  padding: 10px;
21
- border-radius: 5px;
22
- box-shadow: 1px 0 0 $lightgrey2, -1px 0 0 $lightgrey2,
23
- 0 1px 0 $lightgrey2, 0 -1px 0 $lightgrey2,
24
- 0 3px 13px rgba($black, 0.08);
21
+ border: 1px solid $primary;
22
+ border-radius: 4px;
25
23
  background: $bg-light;
26
24
  user-select: none;
27
25
 
28
26
  @include theme() {
29
- box-shadow: 1px 0 0 $lightgrey2--dark, -1px 0 0 $lightgrey2--dark,
30
- 0 1px 0 $lightgrey2--dark, 0 -1px 0 $lightgrey2--dark,
31
- 0 3px 13px rgba($white, 0.08);
27
+ border-color: $primary--dark;
32
28
  background: $bg-light--dark;
33
29
  }
34
30