inertia-bootstrap-forms 1.0.11 → 1.0.13

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": "inertia-bootstrap-forms",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "description": "Create bootstrap forms with inertia and twitter bootstrap",
5
5
  "main": "dist/inertia-bootstrap-forms.cjs.js",
6
6
  "module": "dist/inertia-bootstrap-forms.es.js",
@@ -42,9 +42,9 @@
42
42
  "vue3-persian-datetime-picker": "^1.2.2"
43
43
  },
44
44
  "peerDependencies": {
45
- "vue": "^3.0.0",
46
45
  "@inertiajs/vue3": "^2.0.3",
47
- "vue3-bootstrap-components": "^1.0"
46
+ "vue": "^3.0.0",
47
+ "vue3-bootstrap-components": "file:../novinvision-vue-bootstrap-components"
48
48
  },
49
49
  "devDependencies": {
50
50
  "sass-embedded": "^1.89.2",
@@ -93,10 +93,10 @@ export default {
93
93
  this.$refs.input.removeEventListener('search', this.searchHandle);
94
94
  this.choices.destroy();
95
95
  },
96
- searchHandle(event){
96
+ searchHandle(event) {
97
97
  this.doSearch(event.detail.value);
98
98
  },
99
- async setLoading(){
99
+ async setLoading() {
100
100
  this.loading = true;
101
101
  this.choices.clearChoices();
102
102
  await this.choices.setChoices(
@@ -111,7 +111,7 @@ export default {
111
111
  true
112
112
  );
113
113
  },
114
- async doSearch(searchTerm){
114
+ async doSearch(searchTerm) {
115
115
  await this.setLoading();
116
116
 
117
117
  if (this.searchController) {
@@ -148,7 +148,7 @@ export default {
148
148
  }
149
149
  },
150
150
  mounted() {
151
- if(this.locale === 'en' && document.dir === 'rtl'){
151
+ if (this.locale === 'en' && document.dir === 'rtl') {
152
152
  this.currentLocale = 'fa';
153
153
  }
154
154
 
@@ -164,7 +164,7 @@ export default {
164
164
  searchController: null,
165
165
  currentLocale: this.locale,
166
166
  localeTranslates: {
167
- 'fa' : {
167
+ 'fa': {
168
168
  placeholderValue: 'انتخاب کنید...',
169
169
  searchPlaceholderValue: 'برای جستجو تایپ کنید...',
170
170
  searchingPlaceholder: 'در حال جستجو...',
@@ -178,13 +178,22 @@ export default {
178
178
  }
179
179
  </script>
180
180
  <template>
181
- <select
182
- :name="name"
183
- v-model="modelValue"
184
- class="form-control-select"
185
- :class="{'form-control-select--loading': loading}"
186
- :placeholder="placeholder"
187
- ref="input">
188
- <option :value="item.id" v-for="(item, key) in options">{{item.name}}</option>
189
- </select>
181
+ <div class="select2-controller" :class="{
182
+ 'is-invalid': form.errors[name]
183
+ }">
184
+ <select
185
+ v-bind="$props"
186
+ :name="name"
187
+ v-model="modelValue"
188
+ class="form-control-select"
189
+ :class="{
190
+ 'form-control-select--loading': loading,
191
+ 'is-invalid': form.errors[name]
192
+ }"
193
+ :placeholder="placeholder"
194
+ ref="input">
195
+ <option :value="item.id" v-for="(item, key) in options" :selected="modelValue === item.id">{{ item.name }}
196
+ </option>
197
+ </select>
198
+ </div>
190
199
  </template>
@@ -144,6 +144,10 @@
144
144
  overflow: hidden
145
145
  }
146
146
 
147
+ .is-invalid .choices__inner{
148
+ border-color: var(--bs-danger, #de0021);
149
+ }
150
+
147
151
  .is-focused .choices__inner, .is-open .choices__inner {
148
152
  border-color: #b7b7b7
149
153
  }
@@ -219,7 +223,7 @@
219
223
 
220
224
  .choices__list--dropdown, .choices__list[aria-expanded] {
221
225
  display: none;
222
- z-index: 3;
226
+ z-index: 9;
223
227
  position: absolute;
224
228
  width: 100%;
225
229
  background-color: #fff;