toggle-components-library 1.25.19 → 1.25.21

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": "toggle-components-library",
3
- "version": "1.25.19",
3
+ "version": "1.25.21",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -5,7 +5,10 @@
5
5
  <div>
6
6
  <span class="toggle-input-checkbox-check-element "></span>
7
7
  <span :class="[ 'toggle-input-checkbox-label', label_style ]" >{{label}}</span>
8
- </div>
8
+
9
+ <img v-if="iconUrl" v-bind:src="iconUrl" :alt="iconAlt" class="toggle-input-checkbox-icon"/>
10
+ </div>
11
+
9
12
  </label>
10
13
 
11
14
  </template>
@@ -17,6 +20,13 @@ import { mixins } from '../mixins/mixins'
17
20
  export default {
18
21
  mixins:[mixins],
19
22
  props: {
23
+ iconUrl: {
24
+ type: String,
25
+ },
26
+
27
+ iconAlt: {
28
+ type: String,
29
+ },
20
30
  value: {
21
31
  type: [Boolean, Array]
22
32
  },
@@ -1,13 +1,23 @@
1
1
  <template>
2
2
  <div class="toggle-formbuilder-input-outer-container">
3
3
  <div class="toggle-formbuilder-input-container">
4
- <div class="toggle-formbuilder-input-label">
4
+ <div class="toggle-formbuilder-input-label" :class="labelClasses">
5
5
  <p v-if="label" class="toggle-formbuilder-label-text">{{label}}</p>
6
6
  </div>
7
+
8
+ <!-- 'Normal' input with label and single input -->
7
9
  <div v-if="!multipleInputs" class="inner-input-container">
8
10
  <slot ></slot>
9
11
  <ToggleInfoText v-if="infoText" class="info">{{infoText}}</ToggleInfoText>
10
12
  </div>
13
+
14
+ <!-- Label with multiple inputs, with the inputs aligned vertically eg. multiple email addresses -->
15
+ <div v-else-if="multipleInputs && vertical" class="multiple-inputs-vertical-container">
16
+ <slot ></slot>
17
+ <ToggleInfoText v-if="infoText" class="info">{{infoText}}</ToggleInfoText>
18
+ </div>
19
+
20
+ <!-- Label with multiple inputs, with the inputs aligned horizontally eg. redirect url which needs two inputs -->
11
21
  <div v-else class="inner-input-container">
12
22
  <div class="multiple-inputs-container">
13
23
  <slot></slot>
@@ -41,6 +51,19 @@ export default {
41
51
  default: false,
42
52
  required: false,
43
53
  description: "Set to true if more than one input is required per line. Inputs will be rendered horizontally"
54
+ },
55
+ vertical: {
56
+ type: Boolean,
57
+ default: false,
58
+ required: false,
59
+ description: "When passed with multipleInputs set to true, stacks multiple inputs vertically instead of horizontally"
60
+ }
61
+ },
62
+ computed: {
63
+ labelClasses() {
64
+ return {
65
+ 'toggle-formbuilder-input-label-align-top': this.multipleInputs && this.vertical
66
+ }
44
67
  }
45
68
  }
46
69
 
@@ -70,6 +93,10 @@ export default {
70
93
  margin-bottom: 20px;
71
94
  }
72
95
 
96
+ .toggle-formbuilder-input-label-align-top {
97
+ justify-content: flex-start;
98
+ }
99
+
73
100
  .toggle-formbuilder-label-text {
74
101
  font-size: 16px;
75
102
  color: #202C38;
@@ -87,4 +114,10 @@ export default {
87
114
  flex-direction: row;
88
115
  column-gap: 0.875rem;
89
116
  }
117
+
118
+ .multiple-inputs-vertical-container {
119
+ width: 100%;
120
+ display: flex;
121
+ flex-direction: column;
122
+ }
90
123
  </style>
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
 
3
- <div class="toggle-input-container" :class="{'toggle-input-is-invalid':isInvalid }" v-on:click="focusClosestInput">
3
+ <div class="toggle-input-container" :class="{'toggle-input-is-invalid':isInvalid, 'toggle-input-is-disabled':disabled}" v-on:click="focusClosestInput">
4
4
  <label
5
5
  v-if="label"
6
6
  :for="name ? name : 'ToggleInputSelect' "
@@ -15,6 +15,7 @@
15
15
  v-model="inputVal"
16
16
  :autocomplete="autocomplete ? 'on' : 'off' "
17
17
  :required="required"
18
+ :disabled="disabled"
18
19
  :style="`${fontFamily ? 'font-family: ' + fontFamily : ''}`"
19
20
  >
20
21
  <option value="">Select an option</option>
@@ -77,6 +78,11 @@ export default {
77
78
  fontFamily: {
78
79
  type: String,
79
80
  required: false
81
+ },
82
+ disabled: {
83
+ type: Boolean,
84
+ required: false,
85
+ default: false
80
86
  }
81
87
  },
82
88
 
@@ -301,6 +301,10 @@
301
301
  .toggle-input-radio-button-img{
302
302
  margin-left: 1rem;
303
303
  }
304
+ .toggle-input-checkbox-icon {
305
+ height: 2rem;
306
+ margin-left: auto ;
307
+ }
304
308
 
305
309
  }
306
310
 
@@ -91,7 +91,7 @@
91
91
  height: 1px;
92
92
  margin: 10px;
93
93
  }
94
- &:nth-of-type(2){
94
+ &:nth-of-type(1){
95
95
  hr{
96
96
  display: none;
97
97
  }
package/src/.DS_Store DELETED
Binary file