toggle-components-library 1.14.0 → 1.14.1

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.14.0",
3
+ "version": "1.14.1",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -1,9 +1,27 @@
1
1
  <template>
2
- <hr class="toggle-line-break"/>
2
+ <hr :class="classes"/>
3
3
  </template>
4
4
 
5
5
  <script>
6
6
  export default {
7
- name: "LineBreak"
7
+ name: "LineBreak",
8
+ props: {
9
+ colour: {
10
+ type: String,
11
+ default: 'blue',
12
+ validator: (value) => [
13
+ 'blue',
14
+ 'grey'
15
+ ].includes(value.toLowerCase())
16
+ },
17
+ },
18
+ computed: {
19
+ classes() {
20
+ return {
21
+ 'toggle-line-break': this.colour == 'blue',
22
+ 'toggle-line-break-grey': this.colour == 'grey'
23
+ };
24
+ },
25
+ }
8
26
  }
9
27
  </script>
@@ -22,6 +22,10 @@ export default {
22
22
  type: String,
23
23
  default: "Expandable",
24
24
  },
25
+ startOpen: {
26
+ type: Boolean,
27
+ default: false
28
+ }
25
29
  },
26
30
  data: function() {
27
31
  return {
@@ -29,8 +33,13 @@ export default {
29
33
  updated: false,
30
34
  }
31
35
  },
36
+ mounted() {
37
+ if (this.startOpen) {
38
+ this.visible = true;
39
+ }
40
+ },
32
41
  beforeUpdate: function() {
33
- this.updated = true
42
+ this.updated = true;
34
43
  }
35
44
  };
36
45
  </script>
@@ -0,0 +1,65 @@
1
+ <template>
2
+ <div class="toggle-formbuilder-input-outer-container">
3
+ <div class="toggle-formbuilder-input-container">
4
+ <div class="toggle-formbuilder-input-label">
5
+ <p v-if="label" class="toggle-formbuilder-label-text">{{label}}</p>
6
+ </div>
7
+ <slot></slot>
8
+ </div>
9
+ <ToggleInfoText v-if="infoText" class="info">{{infoText}}</ToggleInfoText>
10
+ </div>
11
+ </template>
12
+
13
+ <script>
14
+ import ToggleInfoText from '../text/ToggleInfoText.vue';
15
+
16
+ export default {
17
+ name: 'ToggleInputLabelLeft',
18
+ components: {
19
+ ToggleInfoText
20
+ },
21
+ props: {
22
+ label: {
23
+ type: String,
24
+ required: true,
25
+ default: 'Label'
26
+ },
27
+ infoText: {
28
+ type: String,
29
+ required: false
30
+ }
31
+ }
32
+
33
+ }
34
+ </script>
35
+
36
+ <style>
37
+ .toggle-formbuilder-input-outer-container {
38
+ margin-bottom: 20px;
39
+ width: 100%;
40
+ }
41
+ .toggle-formbuilder-input-container {
42
+ display: flex;
43
+ flex-direction: row;
44
+ width: 100%;
45
+ }
46
+
47
+ .toggle-formbuilder-input-label {
48
+ display: flex;
49
+ flex-direction: column;
50
+ width: 300px;
51
+ justify-content: center;
52
+ }
53
+
54
+ .toggle-formbuilder-label-text {
55
+ font-size: 16px;
56
+ color: #202C38;
57
+ font-family: "Lato", sans-serif;
58
+ font-weight: normal;
59
+ }
60
+
61
+ .info {
62
+ width: 230px;
63
+ margin: 0 !important;
64
+ }
65
+ </style>
package/src/index.js CHANGED
@@ -52,6 +52,7 @@ import ToggleInfoText from "./components/text/ToggleInfoText.vue";
52
52
  import ToggleFontPicker from "./components/forms/ToggleFontPicker.vue";
53
53
 
54
54
  import ToggleInputNumberUnit from "./components/forms/ToggleInputNumberUnit.vue";
55
+ import ToggleInputLabelLeft from "./components/forms/ToggleInputLabelLeft.vue";
55
56
 
56
57
  import './sass/main.scss';
57
58
 
@@ -98,7 +99,8 @@ const Components = {
98
99
  ToggleInfoText,
99
100
  ToggleInternationalPhoneInputSelect,
100
101
  ToggleFontPicker,
101
- ToggleInputNumberUnit
102
+ ToggleInputNumberUnit,
103
+ ToggleInputLabelLeft
102
104
  }
103
105
 
104
106
  Object.keys(Components).forEach(name => {
@@ -1,11 +1,15 @@
1
1
  .toggle-line-break {
2
2
  border-bottom: 1px solid $toggle-blue;
3
3
  }
4
+ .toggle-line-break-grey {
5
+ border-bottom: 1px solid #D1D1D1;
6
+ }
4
7
  .toggle-section-collapse {
5
8
  .toggle-section-collapse-header {
6
9
  width: 100%;
7
10
  min-height: 25px;
8
11
  padding: 1em 0;
12
+ cursor: pointer;
9
13
  }
10
14
  .toggle-section-collapse-title {
11
15
  max-width: 80%;
@@ -43,6 +43,7 @@
43
43
  height:1.5rem;
44
44
  right:1rem;
45
45
  cursor: pointer;
46
+ z-index: 99;
46
47
  opacity : 0.5;
47
48
  &:hover{
48
49
  opacity: 1;