toggle-components-library 1.27.2 → 1.27.3
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/dist/toggle-components-library.common.js +137 -108
- package/dist/toggle-components-library.common.js.map +1 -1
- package/dist/toggle-components-library.css +1 -1
- package/dist/toggle-components-library.umd.js +137 -108
- package/dist/toggle-components-library.umd.js.map +1 -1
- package/dist/toggle-components-library.umd.min.js +2 -2
- package/dist/toggle-components-library.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/forms/ToggleDateRangePicker.vue +4 -3
- package/src/components/forms/ToggleInputCheckbox.vue +2 -2
- package/src/components/forms/ToggleInputLabelLeft.vue +34 -1
- package/src/components/forms/ToggleInputPercentage.vue +9 -1
- package/src/components/modals/ToggleModal.vue +1 -1
- package/src/sass/includes/_as_inputs.scss +6 -1
- package/src/sass/includes/_as_threedots.scss +1 -1
package/package.json
CHANGED
|
@@ -144,6 +144,7 @@ export default {
|
|
|
144
144
|
},
|
|
145
145
|
set: function(modifiedValue) {
|
|
146
146
|
if(modifiedValue.start) {
|
|
147
|
+
|
|
147
148
|
//if modifiedValue.start is present, set selectedDateToEmit.start to it. If there is already an end date stored,
|
|
148
149
|
// set selectedDateToEmit.end to it, otherwise use the start date.
|
|
149
150
|
let isoDate = new Date(new Date(modifiedValue.start+' 00:00:00').toISOString())
|
|
@@ -166,9 +167,9 @@ export default {
|
|
|
166
167
|
|
|
167
168
|
methods: {
|
|
168
169
|
|
|
169
|
-
clearDate()
|
|
170
|
-
|
|
171
|
-
this
|
|
170
|
+
clearDate() {
|
|
171
|
+
let blankDate = {start: '', end: ''};
|
|
172
|
+
this.$emit('input', blankDate);
|
|
172
173
|
},
|
|
173
174
|
|
|
174
175
|
toggleDatePickerState(state,emit){
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
<span class="toggle-input-checkbox-check-element "></span>
|
|
7
7
|
<span :class="[ 'toggle-input-checkbox-label', label_style ]" >{{label}}</span>
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
</div>
|
|
10
|
+
<img v-if="iconUrl" v-bind:src="iconUrl" :alt="iconAlt" class="toggle-input-checkbox-icon"/>
|
|
11
11
|
|
|
12
12
|
</label>
|
|
13
13
|
|
|
@@ -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>
|
|
@@ -73,6 +73,10 @@ export default {
|
|
|
73
73
|
errorMessage: {
|
|
74
74
|
type: String,
|
|
75
75
|
required: false
|
|
76
|
+
},
|
|
77
|
+
allowFloat: {
|
|
78
|
+
type: Boolean,
|
|
79
|
+
default: false
|
|
76
80
|
}
|
|
77
81
|
},
|
|
78
82
|
|
|
@@ -108,7 +112,11 @@ export default {
|
|
|
108
112
|
// Recalculate value after ignoring "%" and "," in user input
|
|
109
113
|
let newValue = parseFloat(modifiedValue.replace(/[^\d.]/g, ""));
|
|
110
114
|
if(newValue)
|
|
111
|
-
|
|
115
|
+
if(this.allowFloat){
|
|
116
|
+
newValue = parseFloat(newValue);
|
|
117
|
+
} else {
|
|
118
|
+
newValue = parseInt(newValue);
|
|
119
|
+
}
|
|
112
120
|
else
|
|
113
121
|
newValue = 0;
|
|
114
122
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<transition name="toggle-modal">
|
|
3
|
-
<div class="toggle-modal-mask toggle-modal-close" v-if="showModal" @
|
|
3
|
+
<div class="toggle-modal-mask toggle-modal-close" v-if="showModal" @mousedown="backgroundClick">
|
|
4
4
|
<div class="toggle-modal-wrapper toggle-modal-close" >
|
|
5
5
|
<div class="toggle-modal-container" :style="{'max-width':maxwidth}" >
|
|
6
6
|
|
|
@@ -302,7 +302,7 @@
|
|
|
302
302
|
margin-left: 1rem;
|
|
303
303
|
}
|
|
304
304
|
.toggle-input-checkbox-icon {
|
|
305
|
-
height:
|
|
305
|
+
height: 2.5rem;
|
|
306
306
|
margin-left: auto ;
|
|
307
307
|
}
|
|
308
308
|
|
|
@@ -420,6 +420,11 @@
|
|
|
420
420
|
.toggle-input-label, .toggle-input{
|
|
421
421
|
opacity: 0.5;
|
|
422
422
|
}
|
|
423
|
+
.toggle-input-select-container{
|
|
424
|
+
&:after{
|
|
425
|
+
opacity: 0.3;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
423
428
|
}
|
|
424
429
|
|
|
425
430
|
.toggle-input-radio-label, .toggle-input-checkbox-label{
|