@westartcom/bread-quasar-fields 0.1.11 → 0.1.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.
@@ -1,52 +1,20 @@
1
1
  <template>
2
2
  <div class="field-wrap" :id="id">
3
- <div class="field-wrap-inner">
4
- <div class="field-label-wrap">
5
- <label v-if="field.label">
6
- {{ field.label }}<span class="required-asterix" v-if="field.required"> *</span>
7
- </label>
8
- </div>
9
-
10
- <template v-if="stylingFormat === 'buttons' || stylingFormat === 'toggle'">
11
- <div :class="stylingFormat">
12
- <button
13
- v-for="(label, optionValue) in allOptions"
14
- :key="id + '-' + optionValue + '-radio-input'"
15
- type="button"
16
- class="btn expand"
17
- :disabled="disable"
18
- @click="internalValue = optionValue"
19
- :class="{
20
- 'normal-filled': (internalValue === optionValue && !invalid),
21
- 'hollow-danger': (internalValue === optionValue && invalid),
22
- 'hollow': (internalValue !== optionValue)
23
- }">
24
- {{ label }}
25
- </button>
26
- </div>
27
- </template>
28
-
29
- <template v-else>
30
- <div class="field">
31
- <label
32
- v-for="(label, optionValue) in allOptions"
33
- :key="id + '-' + optionValue + '-radio-input'"
34
- :for="id + '-' + optionValue + '-radio-input'">
35
- <input
36
- :id="id + '-' + optionValue + '-radio-input'"
37
- type="radio"
38
- :value="optionValue"
39
- :disabled="disable"
40
- v-model="internalValue">
41
-
42
- {{ label }}
43
- </label>
44
- </div>
3
+ <div class="field-wrap-inner row q-gutter-sm">
4
+ <template
5
+ v-for="(label, optionValue) in allOptions"
6
+ :key="id + '-' + optionValue + '-radio-input'"
7
+ :for="id + '-' + optionValue + '-radio-input'"
8
+ >
9
+ <q-radio
10
+ class="bg-white q-px-md"
11
+ v-model="internalValue"
12
+ :disable="disable"
13
+ :val="optionValue"
14
+ :label="label" />
45
15
  </template>
46
16
  </div>
47
17
 
48
- <div class="field-description" v-if="field.description">{{ field.description }}</div>
49
-
50
18
  <div class="validation-errors" v-if="invalid && internalErrors && internalErrors.length">
51
19
  <span class="error danger-txt-color" v-for="(error, index) in internalErrors" :key="index + 'error'">{{ error }}</span>
52
20
  </div>
@@ -11,7 +11,6 @@
11
11
  ['undo', 'redo']
12
12
  ]"
13
13
  min-height="10rem"
14
- :label="(showLabel) ? field.label + ((field.required) ? ' *' : '') : undefined"
15
14
  :name="field.name"
16
15
  :id="id + '-input'"
17
16
  :placeholder="field.placeholder"
@@ -20,27 +19,28 @@
20
19
  :minlength="(field.extra_data && field.extra_data.min) ? field.extra_data.min : null"
21
20
  v-model="internalValue"
22
21
  :disable="disable"
22
+ :show-label="false"
23
23
  :error-message="''"
24
- :hint="field.description"
24
+ :hint="field.extra_data.hint"
25
25
  @keydown="$emit('keydown', $event)"
26
26
  @blur="$emit('blur', $event)"
27
27
  outlined
28
28
  />
29
29
  <q-input
30
30
  v-else
31
- :label="(showLabel) ? field.label + ((field.required) ? ' *' : '') : undefined"
32
31
  :name="field.name"
33
32
  :id="id + '-input'"
34
33
  :placeholder="field.placeholder"
35
34
  type="textarea"
36
35
  class="field"
36
+ :show-label="false"
37
37
  :class="{'invalid': (invalid && internalErrors && internalErrors.length)}"
38
38
  :maxlength="(field.extra_data && field.extra_data.max) ? field.extra_data.max : null"
39
39
  :minlength="(field.extra_data && field.extra_data.min) ? field.extra_data.min : null"
40
40
  v-model="internalValue"
41
41
  :disable="disable"
42
42
  :error-message="''"
43
- :hint="field.description"
43
+ :hint="field.extra_data.hint"
44
44
  @keydown="$emit('keydown', $event)"
45
45
  @blur="$emit('blur', $event)"
46
46
  outlined>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@westartcom/bread-quasar-fields",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "description": "Quasar compatible fields for bread package",
5
5
  "main": "index.js",
6
6
  "scripts": {